Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
Jolanrensen committed Jan 28, 2025
2 parents 8d1a684 + d12549b commit 61d45c9
Show file tree
Hide file tree
Showing 34 changed files with 153 additions and 1,206 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ public interface DataColumn<out T> : BaseColumn<T> {
@Deprecated(
message = CREATE_FRAME_COLUMN,
replaceWith = ReplaceWith(CREATE_FRAME_COLUMN_REPLACE, CHUNKED_IMPL_IMPORT),
level = DeprecationLevel.WARNING,
level = DeprecationLevel.ERROR,
)
public fun <T> createFrameColumn(name: String, df: DataFrame<T>, startIndices: Iterable<Int>): FrameColumn<T> =
df.chunkedImpl(startIndices = startIndices, name = name)
Expand All @@ -236,7 +236,7 @@ public interface DataColumn<out T> : BaseColumn<T> {
CREATE_BY_INFERENCE_IMPORT,
TYPE_SUGGESTION_IMPORT,
),
level = DeprecationLevel.WARNING,
level = DeprecationLevel.ERROR,
)
public fun <T> createWithTypeInference(
name: String,
Expand All @@ -253,7 +253,7 @@ public interface DataColumn<out T> : BaseColumn<T> {
@Deprecated(
message = CREATE,
replaceWith = ReplaceWith(CREATE_REPLACE, CREATE_BY_TYPE_IMPORT),
level = DeprecationLevel.WARNING,
level = DeprecationLevel.ERROR,
)
public fun <T> create(
name: String,
Expand All @@ -271,7 +271,7 @@ public interface DataColumn<out T> : BaseColumn<T> {
@Deprecated(
message = CREATE,
replaceWith = ReplaceWith(CREATE_INLINE_REPLACE, CREATE_BY_TYPE_IMPORT),
level = DeprecationLevel.WARNING,
level = DeprecationLevel.ERROR,
)
public inline fun <reified T> create(name: String, values: List<T>, infer: Infer = Infer.None): DataColumn<T> =
createByType(name = name, values = values, type = typeOf<T>(), infer = infer)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,16 @@ public interface DataRow<out T> {

public operator fun <R> get(expression: RowExpression<T, R>): R = expression(this, this)

@AccessApiOverload
public operator fun <R> get(column: ColumnReference<R>): R

@AccessApiOverload
public operator fun <R> get(columns: List<ColumnReference<R>>): List<R> = columns.map { get(it) }

@AccessApiOverload
public operator fun <R> get(property: KProperty<R>): R = get(property.columnName) as R

@AccessApiOverload
public operator fun get(first: AnyColumnReference, vararg other: AnyColumnReference): DataRow<T> =
owner.get(first, *other)[index]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -363,10 +363,6 @@ public interface ColumnsSelectionDsl<out T> : // SingleColumn<DataRow<T>>
*
* &nbsp;&nbsp;&nbsp;&nbsp;`| `__`.`__[**`drop`**][org.jetbrains.kotlinx.dataframe.api.DropColumnsSelectionDsl.dropColsWhile]`(`[**`Last`**][org.jetbrains.kotlinx.dataframe.api.DropColumnsSelectionDsl.dropLastColsWhile]`)`[**`ColsWhile`**][org.jetbrains.kotlinx.dataframe.api.DropColumnsSelectionDsl.dropColsWhile]**` { `**[`condition`][org.jetbrains.kotlinx.dataframe.documentation.DslGrammarTemplateColumnsSelectionDsl.DslGrammarTemplate.ConditionDef]**` }`**
*
* &nbsp;&nbsp;&nbsp;&nbsp;`| `[**`exceptNew`**][org.jetbrains.kotlinx.dataframe.api.AllExceptColumnsSelectionDsl.exceptNew]**` { `**[`colsSelector`][org.jetbrains.kotlinx.dataframe.documentation.DslGrammarTemplateColumnsSelectionDsl.DslGrammarTemplate.ColumnsSelectorDef]**` } EXPERIMENTAL!`**
*
* &nbsp;&nbsp;&nbsp;&nbsp;`| `[**`exceptNew`**][org.jetbrains.kotlinx.dataframe.api.AllExceptColumnsSelectionDsl.exceptNew]**`(`**[`columnNoAccessor`][org.jetbrains.kotlinx.dataframe.documentation.DslGrammarTemplateColumnsSelectionDsl.DslGrammarTemplate.ColumnNoAccessorDef]**`,`**` ..`**`) EXPERIMENTAL!`**
*
* &nbsp;&nbsp;&nbsp;&nbsp;`| (`__`.`__[**`firstCol`**][org.jetbrains.kotlinx.dataframe.api.FirstColumnsSelectionDsl.firstCol]`| `__`.`__[**`lastCol`**][org.jetbrains.kotlinx.dataframe.api.LastColumnsSelectionDsl.lastCol]`| `__`.`__[**`singleCol`**][org.jetbrains.kotlinx.dataframe.api.SingleColumnsSelectionDsl.singleCol]`) [ `**`{ `**[`condition`][org.jetbrains.kotlinx.dataframe.documentation.DslGrammarTemplateColumnsSelectionDsl.DslGrammarTemplate.ConditionDef]**` }`**` ]`
*
* &nbsp;&nbsp;&nbsp;&nbsp;`| `__`.`__[**`select`**][org.jetbrains.kotlinx.dataframe.api.SelectColumnsSelectionDsl.select]**` { `**[`colsSelector`][org.jetbrains.kotlinx.dataframe.documentation.DslGrammarTemplateColumnsSelectionDsl.DslGrammarTemplate.ColumnsSelectorDef]**` }`**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public fun AnyCol.isList(): Boolean = typeClass == List::class
@Deprecated(
message = IS_COMPARABLE,
replaceWith = ReplaceWith(IS_COMPARABLE_REPLACE, IS_INTER_COMPARABLE_IMPORT),
level = DeprecationLevel.WARNING,
level = DeprecationLevel.ERROR,
)
public fun AnyCol.isComparable(): Boolean = valuesAreComparable()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ public fun AnyRow.namedValues(): List<NameValuePair<Any?>> =

public fun <T> AnyRow.getValue(columnName: String): T = get(columnName) as T

@AccessApiOverload
public fun <T> AnyRow.getValue(column: ColumnReference<T>): T = get(column)

@AccessApiOverload
Expand All @@ -75,6 +76,7 @@ public fun <T> AnyRow.getValueOrNull(column: KProperty<T>): T? = getValueOrNull<

public fun AnyRow.containsKey(columnName: String): Boolean = owner.containsColumn(columnName)

@AccessApiOverload
public fun AnyRow.containsKey(column: AnyColumnReference): Boolean = owner.containsColumn(column)

@AccessApiOverload
Expand Down
Loading

0 comments on commit 61d45c9

Please sign in to comment.