From 5297fa1e34d6f3f7ae8bb2be5407cb59efbc06dd Mon Sep 17 00:00:00 2001 From: Jolan Rensen Date: Mon, 27 May 2024 20:21:27 +0200 Subject: [PATCH] K2 compatibility: removed `KProperty>.func {}` overloads from DSLs due to no viable workaround for https://youtrack.jetbrains.com/issue/KT-64092/OVERLOADRESOLUTIONAMBIGUITY-caused-by-lambda-argument --- .../dataframe/api/ColumnsSelectionDsl.kt | 54 --- .../jetbrains/kotlinx/dataframe/api/all.kt | 424 +----------------- .../kotlinx/dataframe/api/allExcept.kt | 138 ------ .../jetbrains/kotlinx/dataframe/api/select.kt | 55 --- .../jetbrains/kotlinx/dataframe/api/all.kt | 8 +- .../kotlinx/dataframe/api/allExcept.kt | 17 +- .../jetbrains/kotlinx/dataframe/api/select.kt | 4 +- .../dataframe/api/ColumnsSelectionDsl.kt | 20 - .../jetbrains/kotlinx/dataframe/api/all.kt | 64 --- .../kotlinx/dataframe/api/allExcept.kt | 33 -- .../jetbrains/kotlinx/dataframe/api/select.kt | 21 - .../jetbrains/kotlinx/dataframe/api/all.kt | 8 +- .../kotlinx/dataframe/api/allExcept.kt | 17 +- .../jetbrains/kotlinx/dataframe/api/select.kt | 4 +- 14 files changed, 50 insertions(+), 817 deletions(-) diff --git a/core/generated-sources/src/main/kotlin/org/jetbrains/kotlinx/dataframe/api/ColumnsSelectionDsl.kt b/core/generated-sources/src/main/kotlin/org/jetbrains/kotlinx/dataframe/api/ColumnsSelectionDsl.kt index 4ca1eacd8..596790ba1 100644 --- a/core/generated-sources/src/main/kotlin/org/jetbrains/kotlinx/dataframe/api/ColumnsSelectionDsl.kt +++ b/core/generated-sources/src/main/kotlin/org/jetbrains/kotlinx/dataframe/api/ColumnsSelectionDsl.kt @@ -494,58 +494,6 @@ public interface ColumnsSelectionDsl : /* SingleColumn> */ public operator fun SingleColumn>.invoke(selector: ColumnsSelector): ColumnSet = select(selector) - /** - * ## Select from [ColumnGroup][org.jetbrains.kotlinx.dataframe.columns.ColumnGroup] - * - * Perform a selection of columns using the [Columns Selection DSL][org.jetbrains.kotlinx.dataframe.api.ColumnsSelectionDsl] on - * any [ColumnGroup][org.jetbrains.kotlinx.dataframe.columns.ColumnGroup]. This is more powerful than the [cols][org.jetbrains.kotlinx.dataframe.api.ColumnsSelectionDsl.cols] filter, because now all - * operations of the DSL are at your disposal. - * - * The scope of the new DSL instance is relative to - * the [ColumnGroup][org.jetbrains.kotlinx.dataframe.columns.ColumnGroup] you are selecting from. - * - * The [invoke][org.jetbrains.kotlinx.dataframe.api.ColumnsSelectionDsl.invoke] operator is overloaded to work as a shortcut for this method. - * - * ### Check out: [Grammar][org.jetbrains.kotlinx.dataframe.api.SelectColumnsSelectionDsl.Grammar] - * - * #### For example: - * - * `df.`[select][org.jetbrains.kotlinx.dataframe.DataFrame.select]` { myColGroup.`[select][org.jetbrains.kotlinx.dataframe.columns.SingleColumn.select]` { someCol `[and][org.jetbrains.kotlinx.dataframe.api.AndColumnsSelectionDsl.and]` `[colsOf][org.jetbrains.kotlinx.dataframe.columns.SingleColumn.colsOf]`<`[String][String]`>() } }` - * - * `df.`[select][org.jetbrains.kotlinx.dataframe.DataFrame.select]` { "myGroupCol" `[{][kotlin.String.select]` "colA" and `[expr][org.jetbrains.kotlinx.dataframe.api.ColumnsSelectionDsl.expr]` { 0 } `[}][kotlin.String.select]` }` - * - * `df.`[select][org.jetbrains.kotlinx.dataframe.DataFrame.select]` { "pathTo"["myGroupCol"].`[select][org.jetbrains.kotlinx.dataframe.columns.ColumnPath.select]` { "colA" and "colB" } }` - * - * `df.`[select][org.jetbrains.kotlinx.dataframe.DataFrame.select]` { it["myGroupCol"].`[asColumnGroup][org.jetbrains.kotlinx.dataframe.DataColumn.asColumnGroup]`()`[() {][org.jetbrains.kotlinx.dataframe.columns.SingleColumn.select]` "colA" and "colB" `[}][org.jetbrains.kotlinx.dataframe.columns.SingleColumn.select]` }` - * - * #### Examples for this overload: - * - * `df.`[select][DataFrame.select]` { Type::myColGroup.`[`select`][KProperty.select]` { someCol `[`and`][ColumnsSelectionDsl.and]` `[`colsOf`][SingleColumn.colsOf]`<`[`String`][String]`>() } }` - * - * `df.`[select][DataFrame.select]` { DataSchemaType::myColGroup `[`{`][KProperty.select]` colA `[`and`][ColumnsSelectionDsl.and]` colB `[`}`][KProperty.select]` }` - * - * ## NOTE: - * If you get a warning `CANDIDATE_CHOSEN_USING_OVERLOAD_RESOLUTION_BY_LAMBDA_ANNOTATION`, you - * can safely ignore this. It is caused by a workaround for a bug in the Kotlin compiler - * ([KT-64092](https://youtrack.jetbrains.com/issue/KT-64092/OVERLOADRESOLUTIONAMBIGUITY-caused-by-lambda-argument)). - * - * - *      - * - * - * See also [except][org.jetbrains.kotlinx.dataframe.api.ColumnsSelectionDsl.except]/[allExcept][org.jetbrains.kotlinx.dataframe.api.AllExceptColumnsSelectionDsl.allColsExcept] for the inverted operation of this function. - * - * @param [selector] The [ColumnsSelector][org.jetbrains.kotlinx.dataframe.ColumnsSelector] to use for the selection. - * @receiver The [ColumnGroup][org.jetbrains.kotlinx.dataframe.columns.ColumnGroup] to select from. - * @throws [IllegalArgumentException] If [this] is not a [ColumnGroup][org.jetbrains.kotlinx.dataframe.columns.ColumnGroup]. - * @return A [ColumnSet][org.jetbrains.kotlinx.dataframe.columns.ColumnSet] containing the columns selected by [selector]. - * @see [SingleColumn.except] - */ - @Suppress("INAPPLICABLE_JVM_NAME") - @JvmName("KPropertyDataRowInvoke") - public operator fun KProperty>.invoke(selector: ColumnsSelector): ColumnSet = - select(selector) - /** * ## Select from [ColumnGroup][org.jetbrains.kotlinx.dataframe.columns.ColumnGroup] * @@ -588,8 +536,6 @@ public interface ColumnsSelectionDsl : /* SingleColumn> */ * @return A [ColumnSet][org.jetbrains.kotlinx.dataframe.columns.ColumnSet] containing the columns selected by [selector]. * @see [SingleColumn.except] */ - @OptIn(ExperimentalTypeInference::class) - @OverloadResolutionByLambdaReturnType public operator fun KProperty.invoke(selector: ColumnsSelector): ColumnSet = columnGroup(this).select(selector) diff --git a/core/generated-sources/src/main/kotlin/org/jetbrains/kotlinx/dataframe/api/all.kt b/core/generated-sources/src/main/kotlin/org/jetbrains/kotlinx/dataframe/api/all.kt index b9f54f52d..cc6cb89a2 100644 --- a/core/generated-sources/src/main/kotlin/org/jetbrains/kotlinx/dataframe/api/all.kt +++ b/core/generated-sources/src/main/kotlin/org/jetbrains/kotlinx/dataframe/api/all.kt @@ -1838,12 +1838,7 @@ public interface AllColumnsSelectionDsl { * * #### Examples for this overload: * - * `df.`[select][org.jetbrains.kotlinx.dataframe.DataFrame.select]` { DataSchemaType::myColGroup.`[allColsAfter][kotlin.reflect.KProperty.allColsAfter]` { myColumn } }` - * - * ## NOTE: - * If you get a warning `CANDIDATE_CHOSEN_USING_OVERLOAD_RESOLUTION_BY_LAMBDA_ANNOTATION`, you - * can safely ignore this. It is caused by a workaround for a bug in the Kotlin compiler - * ([KT-64092](https://youtrack.jetbrains.com/issue/KT-64092/OVERLOADRESOLUTIONAMBIGUITY-caused-by-lambda-argument)). + * `df.`[select][org.jetbrains.kotlinx.dataframe.DataFrame.select]` { DataSchemaType::myColGroup.`[allColsAfter][kotlin.reflect.KProperty.allColsAfter]` { myColumn } }` * * #### Flavors of All (Cols): * @@ -1873,80 +1868,9 @@ public interface AllColumnsSelectionDsl { * @param [column] The specified column after which all columns should be taken. This column can be referenced * to both relatively to the current [ColumnsResolver][org.jetbrains.kotlinx.dataframe.columns.ColumnsResolver] and absolutely. */ - @OptIn(ExperimentalTypeInference::class) - @OverloadResolutionByLambdaReturnType - // TODO: [KT-64092](https://youtrack.jetbrains.com/issue/KT-64092/OVERLOADRESOLUTIONAMBIGUITY-caused-by-lambda-argument) public fun KProperty.allColsAfter(column: ColumnSelector): ColumnSet<*> = columnGroup(this).allColsAfter(column) - /** - * ## All (Cols) After - * - * Creates a new [ColumnSet][org.jetbrains.kotlinx.dataframe.columns.ColumnSet] that contains a subset of columns from [this], - * containing all columns after [column], excluding [column] itself. - * - * [column] can be specified both relative to the current [ColumnGroup][org.jetbrains.kotlinx.dataframe.columns.ColumnGroup] or the outer scope and - * can be referenced using any [Access API][org.jetbrains.kotlinx.dataframe.documentation.AccessApi]. - * - * If [column] does not exist, the function will return an empty [ColumnSet][org.jetbrains.kotlinx.dataframe.columns.ColumnSet]. - * - *      - * - * NOTE: Using the `{}` overloads of these functions requires a [ColumnSelector][org.jetbrains.kotlinx.dataframe.ColumnSelector] to be used - * in the Plain DSL, and on [column groups][org.jetbrains.kotlinx.dataframe.columns.ColumnGroup] and a [ColumnFilter][org.jetbrains.kotlinx.dataframe.ColumnFilter] on [ColumnSets][org.jetbrains.kotlinx.dataframe.columns.ColumnSet]. - * - * ### Check out: [Grammar][org.jetbrains.kotlinx.dataframe.api.AllColumnsSelectionDsl.Grammar] - * - * #### For example: - * - * `df.`[select][org.jetbrains.kotlinx.dataframe.DataFrame.select]` { `[allAfter][ColumnsSelectionDsl.allAfter]`("someColumn") }` - * - * `df.`[select][org.jetbrains.kotlinx.dataframe.DataFrame.select]` { `[colGroup][org.jetbrains.kotlinx.dataframe.api.ColumnsSelectionDsl.colGroup]`(Type::myColGroup).`[allColsAfter][SingleColumn.allColsAfter]`(someColumn) }` - * - * `df.`[select][org.jetbrains.kotlinx.dataframe.DataFrame.select]` { `[colsOf][org.jetbrains.kotlinx.dataframe.api.ColumnsSelectionDsl.colsOf]`<`[Int][Int]`>().`[allAfter][ColumnSet.allAfter]`(Type::someColumn) }` - * - * #### Examples for this overload: - * - * `df.`[select][org.jetbrains.kotlinx.dataframe.DataFrame.select]` { DataSchemaType::myColGroup.`[allColsAfter][kotlin.reflect.KProperty.allColsAfter]` { myColumn } }` - * - * ## NOTE: - * If you get a warning `CANDIDATE_CHOSEN_USING_OVERLOAD_RESOLUTION_BY_LAMBDA_ANNOTATION`, you - * can safely ignore this. It is caused by a workaround for a bug in the Kotlin compiler - * ([KT-64092](https://youtrack.jetbrains.com/issue/KT-64092/OVERLOADRESOLUTIONAMBIGUITY-caused-by-lambda-argument)). - * - * #### Flavors of All (Cols): - * - * - [`all(Cols)`][org.jetbrains.kotlinx.dataframe.api.AllColumnsSelectionDsl.allCols]`()`: - * All columns - * - * - [`all(Cols)Before`][org.jetbrains.kotlinx.dataframe.api.AllColumnsSelectionDsl.allColsBefore]`(column)`: - * All columns before the specified column, excluding that column - * - * - [`all(Cols)After`][org.jetbrains.kotlinx.dataframe.api.AllColumnsSelectionDsl.allColsAfter]`(column)`: - * All columns after the specified column, excluding that column - * - * - [`all(Cols)From`][org.jetbrains.kotlinx.dataframe.api.AllColumnsSelectionDsl.allColsFrom]`(column)`: - * All columns from the specified column, including that column - * - * - [`all(Cols)UpTo`][org.jetbrains.kotlinx.dataframe.api.AllColumnsSelectionDsl.allColsUpTo]`(column)`: - * All columns up to the specified column, including that column - * - * @return A new [ColumnSet][org.jetbrains.kotlinx.dataframe.columns.ColumnSet] containing all columns after [column], excluding [column] itself. - * @see [allBefore] - * @see [allAfter] - * @see [allFrom] - * @see [allUpTo] - * @see [ColumnsSelectionDsl.allExcept] - * @see [all] - * @see [cols] - * @param [column] The specified column after which all columns should be taken. This column can be referenced - * to both relatively to the current [ColumnsResolver][org.jetbrains.kotlinx.dataframe.columns.ColumnsResolver] and absolutely. - */ - @Suppress("INAPPLICABLE_JVM_NAME") - @JvmName("KPropertyDataRowAllColsAfter") - public fun KProperty>.allColsAfter(column: ColumnSelector): ColumnSet<*> = - columnGroup(this).allColsAfter(column) - /** ## All (Cols) After * * Creates a new [ColumnSet][org.jetbrains.kotlinx.dataframe.columns.ColumnSet] that contains a subset of columns from [this], @@ -1974,12 +1898,7 @@ public interface AllColumnsSelectionDsl { * * #### Examples for this overload: * - * `df.`[select][org.jetbrains.kotlinx.dataframe.DataFrame.select]` { DataSchemaType::myColGroup.`[allColsAfter][kotlin.reflect.KProperty.allColsAfter]`("pathTo"["myColumn"]) }` - * - * ## NOTE: - * If you get a warning `CANDIDATE_CHOSEN_USING_OVERLOAD_RESOLUTION_BY_LAMBDA_ANNOTATION`, you - * can safely ignore this. It is caused by a workaround for a bug in the Kotlin compiler - * ([KT-64092](https://youtrack.jetbrains.com/issue/KT-64092/OVERLOADRESOLUTIONAMBIGUITY-caused-by-lambda-argument)). + * `df.`[select][org.jetbrains.kotlinx.dataframe.DataFrame.select]` { DataSchemaType::myColGroup.`[allColsAfter][kotlin.reflect.KProperty.allColsAfter]`("pathTo"["myColumn"]) }` * * #### Flavors of All (Cols): * @@ -2039,12 +1958,7 @@ public interface AllColumnsSelectionDsl { * * #### Examples for this overload: * - * `df.`[select][org.jetbrains.kotlinx.dataframe.DataFrame.select]` { DataSchemaType::myColGroup.`[allColsAfter][kotlin.reflect.KProperty.allColsAfter]`("myColumn") }` - * - * ## NOTE: - * If you get a warning `CANDIDATE_CHOSEN_USING_OVERLOAD_RESOLUTION_BY_LAMBDA_ANNOTATION`, you - * can safely ignore this. It is caused by a workaround for a bug in the Kotlin compiler - * ([KT-64092](https://youtrack.jetbrains.com/issue/KT-64092/OVERLOADRESOLUTIONAMBIGUITY-caused-by-lambda-argument)). + * `df.`[select][org.jetbrains.kotlinx.dataframe.DataFrame.select]` { DataSchemaType::myColGroup.`[allColsAfter][kotlin.reflect.KProperty.allColsAfter]`("myColumn") }` * * #### Flavors of All (Cols): * @@ -2104,12 +2018,7 @@ public interface AllColumnsSelectionDsl { * * #### Examples for this overload: * - * `df.`[select][org.jetbrains.kotlinx.dataframe.DataFrame.select]` { DataSchemaType::myColGroup.`[allColsAfter][kotlin.reflect.KProperty.allColsAfter]`(myColumn) }` - * - * ## NOTE: - * If you get a warning `CANDIDATE_CHOSEN_USING_OVERLOAD_RESOLUTION_BY_LAMBDA_ANNOTATION`, you - * can safely ignore this. It is caused by a workaround for a bug in the Kotlin compiler - * ([KT-64092](https://youtrack.jetbrains.com/issue/KT-64092/OVERLOADRESOLUTIONAMBIGUITY-caused-by-lambda-argument)). + * `df.`[select][org.jetbrains.kotlinx.dataframe.DataFrame.select]` { DataSchemaType::myColGroup.`[allColsAfter][kotlin.reflect.KProperty.allColsAfter]`(myColumn) }` * * #### Flavors of All (Cols): * @@ -2169,12 +2078,7 @@ public interface AllColumnsSelectionDsl { * * #### Examples for this overload: * - * `df.`[select][org.jetbrains.kotlinx.dataframe.DataFrame.select]` { DataSchemaType::myColGroup.`[allColsAfter][kotlin.reflect.KProperty.allColsAfter]`(Type::myColumn) }` - * - * ## NOTE: - * If you get a warning `CANDIDATE_CHOSEN_USING_OVERLOAD_RESOLUTION_BY_LAMBDA_ANNOTATION`, you - * can safely ignore this. It is caused by a workaround for a bug in the Kotlin compiler - * ([KT-64092](https://youtrack.jetbrains.com/issue/KT-64092/OVERLOADRESOLUTIONAMBIGUITY-caused-by-lambda-argument)). + * `df.`[select][org.jetbrains.kotlinx.dataframe.DataFrame.select]` { DataSchemaType::myColGroup.`[allColsAfter][kotlin.reflect.KProperty.allColsAfter]`(Type::myColumn) }` * * #### Flavors of All (Cols): * @@ -3826,12 +3730,7 @@ public interface AllColumnsSelectionDsl { * * #### Examples for this overload: * - * `df.`[select][org.jetbrains.kotlinx.dataframe.DataFrame.select]` { DataSchemaType::someColGroup.`[allColsFrom][kotlin.reflect.KProperty.allColsFrom]` { myColumn } }` - * - * ## NOTE: - * If you get a warning `CANDIDATE_CHOSEN_USING_OVERLOAD_RESOLUTION_BY_LAMBDA_ANNOTATION`, you - * can safely ignore this. It is caused by a workaround for a bug in the Kotlin compiler - * ([KT-64092](https://youtrack.jetbrains.com/issue/KT-64092/OVERLOADRESOLUTIONAMBIGUITY-caused-by-lambda-argument)). + * `df.`[select][org.jetbrains.kotlinx.dataframe.DataFrame.select]` { DataSchemaType::someColGroup.`[allColsFrom][kotlin.reflect.KProperty.allColsFrom]` { myColumn } }` * * #### Flavors of All (Cols): * @@ -3861,80 +3760,9 @@ public interface AllColumnsSelectionDsl { * @param [column] The specified column from which all columns should be taken. This column can be referenced * to both relatively to the current [ColumnsResolver][org.jetbrains.kotlinx.dataframe.columns.ColumnsResolver] and absolutely. */ - @OptIn(ExperimentalTypeInference::class) - @OverloadResolutionByLambdaReturnType - // TODO: [KT-64092](https://youtrack.jetbrains.com/issue/KT-64092/OVERLOADRESOLUTIONAMBIGUITY-caused-by-lambda-argument) public fun KProperty.allColsFrom(column: ColumnSelector): ColumnSet<*> = columnGroup(this).allColsFrom(column) - /** - * ## All (Cols) From - * - * Creates a new [ColumnSet][org.jetbrains.kotlinx.dataframe.columns.ColumnSet] that contains a subset of columns from [this], - * containing all columns from [column], including [column] itself. - * - * [column] can be specified both relative to the current [ColumnGroup][org.jetbrains.kotlinx.dataframe.columns.ColumnGroup] or the outer scope and - * can be referenced using any [Access API][org.jetbrains.kotlinx.dataframe.documentation.AccessApi]. - * - * If [column] does not exist, the function will return an empty [ColumnSet][org.jetbrains.kotlinx.dataframe.columns.ColumnSet]. - * - *      - * - * NOTE: Using the `{}` overloads of these functions requires a [ColumnSelector][org.jetbrains.kotlinx.dataframe.ColumnSelector] to be used - * in the Plain DSL, and on [column groups][org.jetbrains.kotlinx.dataframe.columns.ColumnGroup] and a [ColumnFilter][org.jetbrains.kotlinx.dataframe.ColumnFilter] on [ColumnSets][org.jetbrains.kotlinx.dataframe.columns.ColumnSet]. - * - * ### Check out: [Grammar][org.jetbrains.kotlinx.dataframe.api.AllColumnsSelectionDsl.Grammar] - * - * #### For example: - * - * `df.`[select][org.jetbrains.kotlinx.dataframe.DataFrame.select]` { `[allFrom][ColumnsSelectionDsl.allFrom]`("someColumn") }` - * - * `df.`[select][org.jetbrains.kotlinx.dataframe.DataFrame.select]` { `[colGroup][org.jetbrains.kotlinx.dataframe.api.ColumnsSelectionDsl.colGroup]`(Type::myColGroup).`[allColsFrom][SingleColumn.allColsFrom]`(someColumn) }` - * - * `df.`[select][org.jetbrains.kotlinx.dataframe.DataFrame.select]` { `[colsOf][org.jetbrains.kotlinx.dataframe.api.ColumnsSelectionDsl.colsOf]`<`[Int][Int]`>().`[allFrom][ColumnSet.allFrom]`(Type::someColumn) }` - * - * #### Examples for this overload: - * - * `df.`[select][org.jetbrains.kotlinx.dataframe.DataFrame.select]` { DataSchemaType::someColGroup.`[allColsFrom][kotlin.reflect.KProperty.allColsFrom]` { myColumn } }` - * - * ## NOTE: - * If you get a warning `CANDIDATE_CHOSEN_USING_OVERLOAD_RESOLUTION_BY_LAMBDA_ANNOTATION`, you - * can safely ignore this. It is caused by a workaround for a bug in the Kotlin compiler - * ([KT-64092](https://youtrack.jetbrains.com/issue/KT-64092/OVERLOADRESOLUTIONAMBIGUITY-caused-by-lambda-argument)). - * - * #### Flavors of All (Cols): - * - * - [`all(Cols)`][org.jetbrains.kotlinx.dataframe.api.AllColumnsSelectionDsl.allCols]`()`: - * All columns - * - * - [`all(Cols)Before`][org.jetbrains.kotlinx.dataframe.api.AllColumnsSelectionDsl.allColsBefore]`(column)`: - * All columns before the specified column, excluding that column - * - * - [`all(Cols)After`][org.jetbrains.kotlinx.dataframe.api.AllColumnsSelectionDsl.allColsAfter]`(column)`: - * All columns after the specified column, excluding that column - * - * - [`all(Cols)From`][org.jetbrains.kotlinx.dataframe.api.AllColumnsSelectionDsl.allColsFrom]`(column)`: - * All columns from the specified column, including that column - * - * - [`all(Cols)UpTo`][org.jetbrains.kotlinx.dataframe.api.AllColumnsSelectionDsl.allColsUpTo]`(column)`: - * All columns up to the specified column, including that column - * - * @return A new [ColumnSet][org.jetbrains.kotlinx.dataframe.columns.ColumnSet] containing all columns from [column], including [column] itself. - * @see [allBefore] - * @see [allAfter] - * @see [allFrom] - * @see [allUpTo] - * @see [ColumnsSelectionDsl.allExcept] - * @see [all] - * @see [cols] - * @param [column] The specified column from which all columns should be taken. This column can be referenced - * to both relatively to the current [ColumnsResolver][org.jetbrains.kotlinx.dataframe.columns.ColumnsResolver] and absolutely. - */ - @Suppress("INAPPLICABLE_JVM_NAME") - @JvmName("KPropertyDataRowAllColsFrom") - public fun KProperty>.allColsFrom(column: ColumnSelector): ColumnSet<*> = - columnGroup(this).allColsFrom(column) - /** ## All (Cols) From * * Creates a new [ColumnSet][org.jetbrains.kotlinx.dataframe.columns.ColumnSet] that contains a subset of columns from [this], @@ -3962,12 +3790,7 @@ public interface AllColumnsSelectionDsl { * * #### Examples for this overload: * - * `df.`[select][org.jetbrains.kotlinx.dataframe.DataFrame.select]` { DataSchemaType::someColGroup.`[allColsFrom][kotlin.reflect.KProperty.allColsFrom]`("pathTo"["myColumn"]) }` - * - * ## NOTE: - * If you get a warning `CANDIDATE_CHOSEN_USING_OVERLOAD_RESOLUTION_BY_LAMBDA_ANNOTATION`, you - * can safely ignore this. It is caused by a workaround for a bug in the Kotlin compiler - * ([KT-64092](https://youtrack.jetbrains.com/issue/KT-64092/OVERLOADRESOLUTIONAMBIGUITY-caused-by-lambda-argument)). + * `df.`[select][org.jetbrains.kotlinx.dataframe.DataFrame.select]` { DataSchemaType::someColGroup.`[allColsFrom][kotlin.reflect.KProperty.allColsFrom]`("pathTo"["myColumn"]) }` * * #### Flavors of All (Cols): * @@ -4027,12 +3850,7 @@ public interface AllColumnsSelectionDsl { * * #### Examples for this overload: * - * `df.`[select][org.jetbrains.kotlinx.dataframe.DataFrame.select]` { DataSchemaType::someColGroup.`[allColsFrom][kotlin.reflect.KProperty.allColsFrom]`("myColumn") }` - * - * ## NOTE: - * If you get a warning `CANDIDATE_CHOSEN_USING_OVERLOAD_RESOLUTION_BY_LAMBDA_ANNOTATION`, you - * can safely ignore this. It is caused by a workaround for a bug in the Kotlin compiler - * ([KT-64092](https://youtrack.jetbrains.com/issue/KT-64092/OVERLOADRESOLUTIONAMBIGUITY-caused-by-lambda-argument)). + * `df.`[select][org.jetbrains.kotlinx.dataframe.DataFrame.select]` { DataSchemaType::someColGroup.`[allColsFrom][kotlin.reflect.KProperty.allColsFrom]`("myColumn") }` * * #### Flavors of All (Cols): * @@ -4092,12 +3910,7 @@ public interface AllColumnsSelectionDsl { * * #### Examples for this overload: * - * `df.`[select][org.jetbrains.kotlinx.dataframe.DataFrame.select]` { DataSchemaType::someColGroup.`[allColsFrom][kotlin.reflect.KProperty.allColsFrom]`(myColumn) }` - * - * ## NOTE: - * If you get a warning `CANDIDATE_CHOSEN_USING_OVERLOAD_RESOLUTION_BY_LAMBDA_ANNOTATION`, you - * can safely ignore this. It is caused by a workaround for a bug in the Kotlin compiler - * ([KT-64092](https://youtrack.jetbrains.com/issue/KT-64092/OVERLOADRESOLUTIONAMBIGUITY-caused-by-lambda-argument)). + * `df.`[select][org.jetbrains.kotlinx.dataframe.DataFrame.select]` { DataSchemaType::someColGroup.`[allColsFrom][kotlin.reflect.KProperty.allColsFrom]`(myColumn) }` * * #### Flavors of All (Cols): * @@ -4157,12 +3970,7 @@ public interface AllColumnsSelectionDsl { * * #### Examples for this overload: * - * `df.`[select][org.jetbrains.kotlinx.dataframe.DataFrame.select]` { DataSchemaType::someColGroup.`[allColsFrom][kotlin.reflect.KProperty.allColsFrom]`(Type::myColumn) }` - * - * ## NOTE: - * If you get a warning `CANDIDATE_CHOSEN_USING_OVERLOAD_RESOLUTION_BY_LAMBDA_ANNOTATION`, you - * can safely ignore this. It is caused by a workaround for a bug in the Kotlin compiler - * ([KT-64092](https://youtrack.jetbrains.com/issue/KT-64092/OVERLOADRESOLUTIONAMBIGUITY-caused-by-lambda-argument)). + * `df.`[select][org.jetbrains.kotlinx.dataframe.DataFrame.select]` { DataSchemaType::someColGroup.`[allColsFrom][kotlin.reflect.KProperty.allColsFrom]`(Type::myColumn) }` * * #### Flavors of All (Cols): * @@ -5811,12 +5619,7 @@ public interface AllColumnsSelectionDsl { * * #### Examples for this overload: * - * `df.`[select][org.jetbrains.kotlinx.dataframe.DataFrame.select]` { DataSchemaType::someColGroup.`[allColsBefore][kotlin.reflect.KProperty.allColsBefore]` { myColumn } }` - * - * ## NOTE: - * If you get a warning `CANDIDATE_CHOSEN_USING_OVERLOAD_RESOLUTION_BY_LAMBDA_ANNOTATION`, you - * can safely ignore this. It is caused by a workaround for a bug in the Kotlin compiler - * ([KT-64092](https://youtrack.jetbrains.com/issue/KT-64092/OVERLOADRESOLUTIONAMBIGUITY-caused-by-lambda-argument)). + * `df.`[select][org.jetbrains.kotlinx.dataframe.DataFrame.select]` { DataSchemaType::someColGroup.`[allColsBefore][kotlin.reflect.KProperty.allColsBefore]` { myColumn } }` * * #### Flavors of All (Cols): * @@ -5846,80 +5649,9 @@ public interface AllColumnsSelectionDsl { * @param [column] The specified column before which all columns should be taken. This column can be referenced * to both relatively to the current [ColumnsResolver][org.jetbrains.kotlinx.dataframe.columns.ColumnsResolver] and absolutely. */ - @OptIn(ExperimentalTypeInference::class) - @OverloadResolutionByLambdaReturnType - // TODO: [KT-64092](https://youtrack.jetbrains.com/issue/KT-64092/OVERLOADRESOLUTIONAMBIGUITY-caused-by-lambda-argument) public fun KProperty.allColsBefore(column: ColumnSelector): ColumnSet<*> = columnGroup(this).allColsBefore(column) - /** - * ## All (Cols) Before - * - * Creates a new [ColumnSet][org.jetbrains.kotlinx.dataframe.columns.ColumnSet] that contains a subset of columns from [this], - * containing all columns before [column], excluding [column] itself. - * - * [column] can be specified both relative to the current [ColumnGroup][org.jetbrains.kotlinx.dataframe.columns.ColumnGroup] or the outer scope and - * can be referenced using any [Access API][org.jetbrains.kotlinx.dataframe.documentation.AccessApi]. - * - * If [column] does not exist, the function will return a [ColumnSet][org.jetbrains.kotlinx.dataframe.columns.ColumnSet] containing all columns. - * - *      - * - * NOTE: Using the `{}` overloads of these functions requires a [ColumnSelector][org.jetbrains.kotlinx.dataframe.ColumnSelector] to be used - * in the Plain DSL, and on [column groups][org.jetbrains.kotlinx.dataframe.columns.ColumnGroup] and a [ColumnFilter][org.jetbrains.kotlinx.dataframe.ColumnFilter] on [ColumnSets][org.jetbrains.kotlinx.dataframe.columns.ColumnSet]. - * - * ### Check out: [Grammar][org.jetbrains.kotlinx.dataframe.api.AllColumnsSelectionDsl.Grammar] - * - * #### For example: - * - * `df.`[select][org.jetbrains.kotlinx.dataframe.DataFrame.select]` { `[allBefore][ColumnsSelectionDsl.allBefore]`("someColumn") }` - * - * `df.`[select][org.jetbrains.kotlinx.dataframe.DataFrame.select]` { `[colGroup][org.jetbrains.kotlinx.dataframe.api.ColumnsSelectionDsl.colGroup]`(Type::myColGroup).`[allColsBefore][SingleColumn.allColsBefore]`(someColumn) }` - * - * `df.`[select][org.jetbrains.kotlinx.dataframe.DataFrame.select]` { `[colsOf][org.jetbrains.kotlinx.dataframe.api.ColumnsSelectionDsl.colsOf]`<`[Int][Int]`>().`[allBefore][ColumnSet.allBefore]`(Type::someColumn) }` - * - * #### Examples for this overload: - * - * `df.`[select][org.jetbrains.kotlinx.dataframe.DataFrame.select]` { DataSchemaType::someColGroup.`[allColsBefore][kotlin.reflect.KProperty.allColsBefore]` { myColumn } }` - * - * ## NOTE: - * If you get a warning `CANDIDATE_CHOSEN_USING_OVERLOAD_RESOLUTION_BY_LAMBDA_ANNOTATION`, you - * can safely ignore this. It is caused by a workaround for a bug in the Kotlin compiler - * ([KT-64092](https://youtrack.jetbrains.com/issue/KT-64092/OVERLOADRESOLUTIONAMBIGUITY-caused-by-lambda-argument)). - * - * #### Flavors of All (Cols): - * - * - [`all(Cols)`][org.jetbrains.kotlinx.dataframe.api.AllColumnsSelectionDsl.allCols]`()`: - * All columns - * - * - [`all(Cols)Before`][org.jetbrains.kotlinx.dataframe.api.AllColumnsSelectionDsl.allColsBefore]`(column)`: - * All columns before the specified column, excluding that column - * - * - [`all(Cols)After`][org.jetbrains.kotlinx.dataframe.api.AllColumnsSelectionDsl.allColsAfter]`(column)`: - * All columns after the specified column, excluding that column - * - * - [`all(Cols)From`][org.jetbrains.kotlinx.dataframe.api.AllColumnsSelectionDsl.allColsFrom]`(column)`: - * All columns from the specified column, including that column - * - * - [`all(Cols)UpTo`][org.jetbrains.kotlinx.dataframe.api.AllColumnsSelectionDsl.allColsUpTo]`(column)`: - * All columns up to the specified column, including that column - * - * @return A new [ColumnSet][org.jetbrains.kotlinx.dataframe.columns.ColumnSet] containing all columns before [column], excluding [column] itself. - * @see [allBefore] - * @see [allAfter] - * @see [allFrom] - * @see [allUpTo] - * @see [ColumnsSelectionDsl.allExcept] - * @see [all] - * @see [cols] - * @param [column] The specified column before which all columns should be taken. This column can be referenced - * to both relatively to the current [ColumnsResolver][org.jetbrains.kotlinx.dataframe.columns.ColumnsResolver] and absolutely. - */ - @Suppress("INAPPLICABLE_JVM_NAME") - @JvmName("KPropertyDataRowAllColsBefore") - public fun KProperty>.allColsBefore(column: ColumnSelector): ColumnSet<*> = - columnGroup(this).allColsBefore(column) - /** ## All (Cols) Before * * Creates a new [ColumnSet][org.jetbrains.kotlinx.dataframe.columns.ColumnSet] that contains a subset of columns from [this], @@ -5947,12 +5679,7 @@ public interface AllColumnsSelectionDsl { * * #### Examples for this overload: * - * `df.`[select][org.jetbrains.kotlinx.dataframe.DataFrame.select]` { DataSchemaType::someColGroup.`[allColsBefore][kotlin.reflect.KProperty.allColsBefore]`("pathTo"["myColumn"]) }` - * - * ## NOTE: - * If you get a warning `CANDIDATE_CHOSEN_USING_OVERLOAD_RESOLUTION_BY_LAMBDA_ANNOTATION`, you - * can safely ignore this. It is caused by a workaround for a bug in the Kotlin compiler - * ([KT-64092](https://youtrack.jetbrains.com/issue/KT-64092/OVERLOADRESOLUTIONAMBIGUITY-caused-by-lambda-argument)). + * `df.`[select][org.jetbrains.kotlinx.dataframe.DataFrame.select]` { DataSchemaType::someColGroup.`[allColsBefore][kotlin.reflect.KProperty.allColsBefore]`("pathTo"["myColumn"]) }` * * #### Flavors of All (Cols): * @@ -6012,12 +5739,7 @@ public interface AllColumnsSelectionDsl { * * #### Examples for this overload: * - * `df.`[select][org.jetbrains.kotlinx.dataframe.DataFrame.select]` { DataSchemaType::someColGroup.`[allColsBefore][kotlin.reflect.KProperty.allColsBefore]`("myColumn") }` - * - * ## NOTE: - * If you get a warning `CANDIDATE_CHOSEN_USING_OVERLOAD_RESOLUTION_BY_LAMBDA_ANNOTATION`, you - * can safely ignore this. It is caused by a workaround for a bug in the Kotlin compiler - * ([KT-64092](https://youtrack.jetbrains.com/issue/KT-64092/OVERLOADRESOLUTIONAMBIGUITY-caused-by-lambda-argument)). + * `df.`[select][org.jetbrains.kotlinx.dataframe.DataFrame.select]` { DataSchemaType::someColGroup.`[allColsBefore][kotlin.reflect.KProperty.allColsBefore]`("myColumn") }` * * #### Flavors of All (Cols): * @@ -6077,12 +5799,7 @@ public interface AllColumnsSelectionDsl { * * #### Examples for this overload: * - * `df.`[select][org.jetbrains.kotlinx.dataframe.DataFrame.select]` { DataSchemaType::someColGroup.`[allColsBefore][kotlin.reflect.KProperty.allColsBefore]`(myColumn) }` - * - * ## NOTE: - * If you get a warning `CANDIDATE_CHOSEN_USING_OVERLOAD_RESOLUTION_BY_LAMBDA_ANNOTATION`, you - * can safely ignore this. It is caused by a workaround for a bug in the Kotlin compiler - * ([KT-64092](https://youtrack.jetbrains.com/issue/KT-64092/OVERLOADRESOLUTIONAMBIGUITY-caused-by-lambda-argument)). + * `df.`[select][org.jetbrains.kotlinx.dataframe.DataFrame.select]` { DataSchemaType::someColGroup.`[allColsBefore][kotlin.reflect.KProperty.allColsBefore]`(myColumn) }` * * #### Flavors of All (Cols): * @@ -6142,12 +5859,7 @@ public interface AllColumnsSelectionDsl { * * #### Examples for this overload: * - * `df.`[select][org.jetbrains.kotlinx.dataframe.DataFrame.select]` { DataSchemaType::someColGroup.`[allColsBefore][kotlin.reflect.KProperty.allColsBefore]`(Type::myColumn) }` - * - * ## NOTE: - * If you get a warning `CANDIDATE_CHOSEN_USING_OVERLOAD_RESOLUTION_BY_LAMBDA_ANNOTATION`, you - * can safely ignore this. It is caused by a workaround for a bug in the Kotlin compiler - * ([KT-64092](https://youtrack.jetbrains.com/issue/KT-64092/OVERLOADRESOLUTIONAMBIGUITY-caused-by-lambda-argument)). + * `df.`[select][org.jetbrains.kotlinx.dataframe.DataFrame.select]` { DataSchemaType::someColGroup.`[allColsBefore][kotlin.reflect.KProperty.allColsBefore]`(Type::myColumn) }` * * #### Flavors of All (Cols): * @@ -7799,12 +7511,7 @@ public interface AllColumnsSelectionDsl { * * #### Examples for this overload: * - * `df.`[select][org.jetbrains.kotlinx.dataframe.DataFrame.select]` { DataSchemaType::someColGroup.`[allColsUpTo][kotlin.reflect.KProperty.allColsUpTo]` { myColumn } }` - * - * ## NOTE: - * If you get a warning `CANDIDATE_CHOSEN_USING_OVERLOAD_RESOLUTION_BY_LAMBDA_ANNOTATION`, you - * can safely ignore this. It is caused by a workaround for a bug in the Kotlin compiler - * ([KT-64092](https://youtrack.jetbrains.com/issue/KT-64092/OVERLOADRESOLUTIONAMBIGUITY-caused-by-lambda-argument)). + * `df.`[select][org.jetbrains.kotlinx.dataframe.DataFrame.select]` { DataSchemaType::someColGroup.`[allColsUpTo][kotlin.reflect.KProperty.allColsUpTo]` { myColumn } }` * * #### Flavors of All (Cols): * @@ -7834,80 +7541,9 @@ public interface AllColumnsSelectionDsl { * @param [column] The specified column up to which all columns should be taken. This column can be referenced * to both relatively to the current [ColumnsResolver][org.jetbrains.kotlinx.dataframe.columns.ColumnsResolver] and absolutely. */ - @OptIn(ExperimentalTypeInference::class) - @OverloadResolutionByLambdaReturnType - // TODO: [KT-64092](https://youtrack.jetbrains.com/issue/KT-64092/OVERLOADRESOLUTIONAMBIGUITY-caused-by-lambda-argument) public fun KProperty.allColsUpTo(column: ColumnSelector): ColumnSet<*> = columnGroup(this).allColsUpTo(column) - /** - * ## All (Cols) Up To - * - * Creates a new [ColumnSet][org.jetbrains.kotlinx.dataframe.columns.ColumnSet] that contains a subset of columns from [this], - * containing all columns up to [column], including [column] itself. - * - * [column] can be specified both relative to the current [ColumnGroup][org.jetbrains.kotlinx.dataframe.columns.ColumnGroup] or the outer scope and - * can be referenced using any [Access API][org.jetbrains.kotlinx.dataframe.documentation.AccessApi]. - * - * If [column] does not exist, the function will return a [ColumnSet][org.jetbrains.kotlinx.dataframe.columns.ColumnSet] containing all columns. - * - *      - * - * NOTE: Using the `{}` overloads of these functions requires a [ColumnSelector][org.jetbrains.kotlinx.dataframe.ColumnSelector] to be used - * in the Plain DSL, and on [column groups][org.jetbrains.kotlinx.dataframe.columns.ColumnGroup] and a [ColumnFilter][org.jetbrains.kotlinx.dataframe.ColumnFilter] on [ColumnSets][org.jetbrains.kotlinx.dataframe.columns.ColumnSet]. - * - * ### Check out: [Grammar][org.jetbrains.kotlinx.dataframe.api.AllColumnsSelectionDsl.Grammar] - * - * #### For example: - * - * `df.`[select][org.jetbrains.kotlinx.dataframe.DataFrame.select]` { `[allUpTo][ColumnsSelectionDsl.allUpTo]`("someColumn") }` - * - * `df.`[select][org.jetbrains.kotlinx.dataframe.DataFrame.select]` { `[colGroup][org.jetbrains.kotlinx.dataframe.api.ColumnsSelectionDsl.colGroup]`(Type::myColGroup).`[allColsUpTo][SingleColumn.allColsUpTo]`(someColumn) }` - * - * `df.`[select][org.jetbrains.kotlinx.dataframe.DataFrame.select]` { `[colsOf][org.jetbrains.kotlinx.dataframe.api.ColumnsSelectionDsl.colsOf]`<`[Int][Int]`>().`[allUpTo][ColumnSet.allUpTo]`(Type::someColumn) }` - * - * #### Examples for this overload: - * - * `df.`[select][org.jetbrains.kotlinx.dataframe.DataFrame.select]` { DataSchemaType::someColGroup.`[allColsUpTo][kotlin.reflect.KProperty.allColsUpTo]` { myColumn } }` - * - * ## NOTE: - * If you get a warning `CANDIDATE_CHOSEN_USING_OVERLOAD_RESOLUTION_BY_LAMBDA_ANNOTATION`, you - * can safely ignore this. It is caused by a workaround for a bug in the Kotlin compiler - * ([KT-64092](https://youtrack.jetbrains.com/issue/KT-64092/OVERLOADRESOLUTIONAMBIGUITY-caused-by-lambda-argument)). - * - * #### Flavors of All (Cols): - * - * - [`all(Cols)`][org.jetbrains.kotlinx.dataframe.api.AllColumnsSelectionDsl.allCols]`()`: - * All columns - * - * - [`all(Cols)Before`][org.jetbrains.kotlinx.dataframe.api.AllColumnsSelectionDsl.allColsBefore]`(column)`: - * All columns before the specified column, excluding that column - * - * - [`all(Cols)After`][org.jetbrains.kotlinx.dataframe.api.AllColumnsSelectionDsl.allColsAfter]`(column)`: - * All columns after the specified column, excluding that column - * - * - [`all(Cols)From`][org.jetbrains.kotlinx.dataframe.api.AllColumnsSelectionDsl.allColsFrom]`(column)`: - * All columns from the specified column, including that column - * - * - [`all(Cols)UpTo`][org.jetbrains.kotlinx.dataframe.api.AllColumnsSelectionDsl.allColsUpTo]`(column)`: - * All columns up to the specified column, including that column - * - * @return A new [ColumnSet][org.jetbrains.kotlinx.dataframe.columns.ColumnSet] containing all columns up to [column], including [column] itself. - * @see [allBefore] - * @see [allAfter] - * @see [allFrom] - * @see [allUpTo] - * @see [ColumnsSelectionDsl.allExcept] - * @see [all] - * @see [cols] - * @param [column] The specified column up to which all columns should be taken. This column can be referenced - * to both relatively to the current [ColumnsResolver][org.jetbrains.kotlinx.dataframe.columns.ColumnsResolver] and absolutely. - */ - @Suppress("INAPPLICABLE_JVM_NAME") - @JvmName("KPropertyDataRowAllColsUpTo") - public fun KProperty>.allColsUpTo(column: ColumnSelector): ColumnSet<*> = - columnGroup(this).allColsUpTo(column) - /** ## All (Cols) Up To * * Creates a new [ColumnSet][org.jetbrains.kotlinx.dataframe.columns.ColumnSet] that contains a subset of columns from [this], @@ -7935,12 +7571,7 @@ public interface AllColumnsSelectionDsl { * * #### Examples for this overload: * - * `df.`[select][org.jetbrains.kotlinx.dataframe.DataFrame.select]` { DataSchemaType::someColGroup.`[allColsUpTo][kotlin.reflect.KProperty.allColsUpTo]`("pathTo"["myColumn"]) }` - * - * ## NOTE: - * If you get a warning `CANDIDATE_CHOSEN_USING_OVERLOAD_RESOLUTION_BY_LAMBDA_ANNOTATION`, you - * can safely ignore this. It is caused by a workaround for a bug in the Kotlin compiler - * ([KT-64092](https://youtrack.jetbrains.com/issue/KT-64092/OVERLOADRESOLUTIONAMBIGUITY-caused-by-lambda-argument)). + * `df.`[select][org.jetbrains.kotlinx.dataframe.DataFrame.select]` { DataSchemaType::someColGroup.`[allColsUpTo][kotlin.reflect.KProperty.allColsUpTo]`("pathTo"["myColumn"]) }` * * #### Flavors of All (Cols): * @@ -8000,12 +7631,7 @@ public interface AllColumnsSelectionDsl { * * #### Examples for this overload: * - * `df.`[select][org.jetbrains.kotlinx.dataframe.DataFrame.select]` { DataSchemaType::someColGroup.`[allColsUpTo][kotlin.reflect.KProperty.allColsUpTo]`("myColumn") }` - * - * ## NOTE: - * If you get a warning `CANDIDATE_CHOSEN_USING_OVERLOAD_RESOLUTION_BY_LAMBDA_ANNOTATION`, you - * can safely ignore this. It is caused by a workaround for a bug in the Kotlin compiler - * ([KT-64092](https://youtrack.jetbrains.com/issue/KT-64092/OVERLOADRESOLUTIONAMBIGUITY-caused-by-lambda-argument)). + * `df.`[select][org.jetbrains.kotlinx.dataframe.DataFrame.select]` { DataSchemaType::someColGroup.`[allColsUpTo][kotlin.reflect.KProperty.allColsUpTo]`("myColumn") }` * * #### Flavors of All (Cols): * @@ -8065,12 +7691,7 @@ public interface AllColumnsSelectionDsl { * * #### Examples for this overload: * - * `df.`[select][org.jetbrains.kotlinx.dataframe.DataFrame.select]` { DataSchemaType::someColGroup.`[allColsUpTo][kotlin.reflect.KProperty.allColsUpTo]`(myColumn) }` - * - * ## NOTE: - * If you get a warning `CANDIDATE_CHOSEN_USING_OVERLOAD_RESOLUTION_BY_LAMBDA_ANNOTATION`, you - * can safely ignore this. It is caused by a workaround for a bug in the Kotlin compiler - * ([KT-64092](https://youtrack.jetbrains.com/issue/KT-64092/OVERLOADRESOLUTIONAMBIGUITY-caused-by-lambda-argument)). + * `df.`[select][org.jetbrains.kotlinx.dataframe.DataFrame.select]` { DataSchemaType::someColGroup.`[allColsUpTo][kotlin.reflect.KProperty.allColsUpTo]`(myColumn) }` * * #### Flavors of All (Cols): * @@ -8130,12 +7751,7 @@ public interface AllColumnsSelectionDsl { * * #### Examples for this overload: * - * `df.`[select][org.jetbrains.kotlinx.dataframe.DataFrame.select]` { DataSchemaType::someColGroup.`[allColsUpTo][kotlin.reflect.KProperty.allColsUpTo]`(Type::myColumn) }` - * - * ## NOTE: - * If you get a warning `CANDIDATE_CHOSEN_USING_OVERLOAD_RESOLUTION_BY_LAMBDA_ANNOTATION`, you - * can safely ignore this. It is caused by a workaround for a bug in the Kotlin compiler - * ([KT-64092](https://youtrack.jetbrains.com/issue/KT-64092/OVERLOADRESOLUTIONAMBIGUITY-caused-by-lambda-argument)). + * `df.`[select][org.jetbrains.kotlinx.dataframe.DataFrame.select]` { DataSchemaType::someColGroup.`[allColsUpTo][kotlin.reflect.KProperty.allColsUpTo]`(Type::myColumn) }` * * #### Flavors of All (Cols): * diff --git a/core/generated-sources/src/main/kotlin/org/jetbrains/kotlinx/dataframe/api/allExcept.kt b/core/generated-sources/src/main/kotlin/org/jetbrains/kotlinx/dataframe/api/allExcept.kt index 0fae38844..75ff30fc6 100644 --- a/core/generated-sources/src/main/kotlin/org/jetbrains/kotlinx/dataframe/api/allExcept.kt +++ b/core/generated-sources/src/main/kotlin/org/jetbrains/kotlinx/dataframe/api/allExcept.kt @@ -2858,10 +2858,6 @@ public interface AllExceptColumnsSelectionDsl { * `df.`[select][org.jetbrains.kotlinx.dataframe.api.SelectColumnsSelectionDsl.select]` { ``DataSchemaPerson::userData.`[allColsExcept][KProperty.allColsExcept]` { "age" `[and][org.jetbrains.kotlinx.dataframe.api.AndColumnsSelectionDsl.and]` height }`` }` * * `df.`[select][org.jetbrains.kotlinx.dataframe.api.SelectColumnsSelectionDsl.select]` { city `[and][org.jetbrains.kotlinx.dataframe.api.AndColumnsSelectionDsl.and]` ``Person::name.`[allColsExcept][KProperty.allColsExcept]` { firstName }`` }` - * ## NOTE: - * If you get a warning `CANDIDATE_CHOSEN_USING_OVERLOAD_RESOLUTION_BY_LAMBDA_ANNOTATION`, you - * can safely ignore this. It is caused by a workaround for a bug in the Kotlin compiler - * ([KT-64092](https://youtrack.jetbrains.com/issue/KT-64092/OVERLOADRESOLUTIONAMBIGUITY-caused-by-lambda-argument)). * * @param [selector] A lambda in which you specify the columns that need to be * excluded from the current selection in [this] column group. The other columns will be included in the selection @@ -2874,112 +2870,9 @@ public interface AllExceptColumnsSelectionDsl { * @see ColumnsSelectionDsl.allUpTo * @see ColumnsSelectionDsl.allFrom */ - @OptIn(ExperimentalTypeInference::class) - @OverloadResolutionByLambdaReturnType - // TODO: [KT-64092](https://youtrack.jetbrains.com/issue/KT-64092/OVERLOADRESOLUTIONAMBIGUITY-caused-by-lambda-argument) public fun KProperty.allColsExcept(selector: ColumnsSelector): ColumnSet<*> = columnGroup(this).allColsExcept(selector) - /** - * ## (All) (Cols) Except - * - * Perform a selection of columns using the [Columns Selection DSL][org.jetbrains.kotlinx.dataframe.api.ColumnsSelectionDsl] to - * exclude from the current selection. - * - * ### Check out: [Grammar][org.jetbrains.kotlinx.dataframe.api.AllExceptColumnsSelectionDsl.Grammar] - * - * ### On [ColumnSets][org.jetbrains.kotlinx.dataframe.columns.ColumnSet] - * This function can be explained the easiest with [ColumnSets][org.jetbrains.kotlinx.dataframe.columns.ColumnSet]. Let's say we want all - * [Int] columns apart from `age` and `height`. - * - * We can do: - * - * `df.`[select][org.jetbrains.kotlinx.dataframe.DataFrame.select]` { `[colsOf][org.jetbrains.kotlinx.dataframe.api.colsOf]`<`[Int][Int]`>() `[except][org.jetbrains.kotlinx.dataframe.columns.ColumnSet.except]` (age `[and][org.jetbrains.kotlinx.dataframe.api.AndColumnsSelectionDsl.and]` height) }` - * - * which will 'subtract' the [ColumnSet][org.jetbrains.kotlinx.dataframe.columns.ColumnSet] created by `age `[and][org.jetbrains.kotlinx.dataframe.api.AndColumnsSelectionDsl.and]` height` from the [ColumnSet][org.jetbrains.kotlinx.dataframe.columns.ColumnSet] created by [colsOf][org.jetbrains.kotlinx.dataframe.api.colsOf]`<`[Int][Int]`>()`. - * - * - *      - * - * This operation can also be used to exclude columns from [Column Groups][org.jetbrains.kotlinx.dataframe.columns.ColumnGroup]. - * - * For instance: - * - * `df.`[select][org.jetbrains.kotlinx.dataframe.DataFrame.select]` { `[colsAtAnyDepth][org.jetbrains.kotlinx.dataframe.api.ColumnsSelectionDsl.colsAtAnyDepth]` { "a" `[in][String.contains]` it.`[name][org.jetbrains.kotlinx.dataframe.DataColumn.name]`() } `[except][org.jetbrains.kotlinx.dataframe.columns.ColumnSet.except]` userData.age }` - * - *      - * - * - * Note that the selection of columns to exclude from [column sets][org.jetbrains.kotlinx.dataframe.columns.ColumnSet] is always done relative to the outer - * scope. Use the [Extension Properties API][org.jetbrains.kotlinx.dataframe.documentation.AccessApi.ExtensionPropertiesApi] to prevent scoping issues if possible. - * - *      - * - * Special case: If a column that needs to be removed appears multiple times in the [ColumnSet][org.jetbrains.kotlinx.dataframe.columns.ColumnSet], it is excepted - * each time it is encountered (including inside [ColumnGroups][org.jetbrains.kotlinx.dataframe.columns.ColumnGroup]). You could say the receiver [ColumnSet][org.jetbrains.kotlinx.dataframe.columns.ColumnSet] - * is [simplified][org.jetbrains.kotlinx.dataframe.api.SimplifyColumnsSelectionDsl.simplify] before the operation is performed: - * - * [cols][org.jetbrains.kotlinx.dataframe.api.ColumnsSelectionDsl.cols]`(a, a, a.b, a.b).`[except][org.jetbrains.kotlinx.dataframe.columns.ColumnSet.except]`(a.b)` - * - * `== `[cols][org.jetbrains.kotlinx.dataframe.api.ColumnsSelectionDsl.cols]`(a).`[except][org.jetbrains.kotlinx.dataframe.columns.ColumnSet.except]`(a.b)` - * - * ### In the [ColumnsSelectionDsl][org.jetbrains.kotlinx.dataframe.api.ColumnsSelectionDsl] - * Instead of having to write [all][org.jetbrains.kotlinx.dataframe.api.ColumnsSelectionDsl.all]`() `[except][org.jetbrains.kotlinx.dataframe.api.ColumnsSelectionDsl.except]` { ... }` in the DSL, - * you can use [allExcept][org.jetbrains.kotlinx.dataframe.api.ColumnsSelectionDsl.allExcept]` { ... }` to achieve the same result. - * - * For example: - * - * `df.`[select][org.jetbrains.kotlinx.dataframe.DataFrame.select]` { `[allExcept][org.jetbrains.kotlinx.dataframe.api.ColumnsSelectionDsl.allExcept]` { userData.age `[and][org.jetbrains.kotlinx.dataframe.api.AndColumnsSelectionDsl.and]` height } }` - * - * ### On [ColumnGroups][org.jetbrains.kotlinx.dataframe.columns.ColumnGroup] - * The variant of this function on [ColumnGroups][org.jetbrains.kotlinx.dataframe.columns.ColumnGroup] is a bit different as it changes the scope relative to - * the column group. - * - *      - * - * In other words: - * - * `df.`[select][org.jetbrains.kotlinx.dataframe.DataFrame.select]` { myColGroup.`[allColsExcept][org.jetbrains.kotlinx.dataframe.columns.SingleColumn.allColsExcept]` { colA `[and][org.jetbrains.kotlinx.dataframe.api.AndColumnsSelectionDsl.and]` colB } }` - * - * is shorthand for - * - * `df.`[select][org.jetbrains.kotlinx.dataframe.DataFrame.select]` { myColGroup.`[select][org.jetbrains.kotlinx.dataframe.api.SelectColumnsSelectionDsl.select]` { `[all][org.jetbrains.kotlinx.dataframe.api.ColumnsSelectionDsl.all]`() `[except][org.jetbrains.kotlinx.dataframe.columns.ColumnSet.except]` { colA `[and][org.jetbrains.kotlinx.dataframe.api.AndColumnsSelectionDsl.and]` colB } } }` - * - * or - * - * `df.`[select][org.jetbrains.kotlinx.dataframe.DataFrame.select]` { myColGroup.`[allCols][org.jetbrains.kotlinx.dataframe.api.AllColumnsSelectionDsl.allCols]`() `[except][org.jetbrains.kotlinx.dataframe.columns.ColumnSet.except]` { myColGroup.colA `[and][org.jetbrains.kotlinx.dataframe.api.AndColumnsSelectionDsl.and]` myColGroup.colB } }` - * - *      - * - * Also note the name change, similar to [allCols][org.jetbrains.kotlinx.dataframe.api.AllColumnsSelectionDsl.allCols], this makes it clearer that you're selecting - * columns inside the group, 'lifting' them out. - * - * ### Examples for this overload - * - * `df.`[select][org.jetbrains.kotlinx.dataframe.api.SelectColumnsSelectionDsl.select]` { ``DataSchemaPerson::userData.`[allColsExcept][KProperty.allColsExcept]` { "age" `[and][org.jetbrains.kotlinx.dataframe.api.AndColumnsSelectionDsl.and]` height }`` }` - * - * `df.`[select][org.jetbrains.kotlinx.dataframe.api.SelectColumnsSelectionDsl.select]` { city `[and][org.jetbrains.kotlinx.dataframe.api.AndColumnsSelectionDsl.and]` ``Person::name.`[allColsExcept][KProperty.allColsExcept]` { firstName }`` }` - * ## NOTE: - * If you get a warning `CANDIDATE_CHOSEN_USING_OVERLOAD_RESOLUTION_BY_LAMBDA_ANNOTATION`, you - * can safely ignore this. It is caused by a workaround for a bug in the Kotlin compiler - * ([KT-64092](https://youtrack.jetbrains.com/issue/KT-64092/OVERLOADRESOLUTIONAMBIGUITY-caused-by-lambda-argument)). - * - * @param [selector] A lambda in which you specify the columns that need to be - * excluded from the current selection in [this] column group. The other columns will be included in the selection - * by default. The scope of the selector is relative to the column group. - * @return A [ColumnSet][org.jetbrains.kotlinx.dataframe.columns.ColumnSet] containing all columns in [this] except the specified ones. - * @see ColumnsSelectionDsl.select - * @see ColumnsSelectionDsl.all - * @see ColumnsSelectionDsl.allBefore - * @see ColumnsSelectionDsl.allAfter - * @see ColumnsSelectionDsl.allUpTo - * @see ColumnsSelectionDsl.allFrom - */ - @Suppress("INAPPLICABLE_JVM_NAME") - @JvmName("KPropertyDataRowAllColsExcept") - public fun KProperty>.allColsExcept(selector: ColumnsSelector): ColumnSet<*> = - columnGroup(this).allColsExcept(selector) - @Deprecated( message = ALL_COLS_EXCEPT, replaceWith = ReplaceWith(ALL_COLS_REPLACE), @@ -4125,40 +4018,9 @@ public interface AllExceptColumnsSelectionDsl { * are deleted. */ @ExperimentalExceptCsDsl - @OptIn(ExperimentalTypeInference::class) - @OverloadResolutionByLambdaReturnType - // TODO: [KT-64092](https://youtrack.jetbrains.com/issue/KT-64092/OVERLOADRESOLUTIONAMBIGUITY-caused-by-lambda-argument) public infix fun KProperty.exceptNew(selector: ColumnsSelector): SingleColumn> = columnGroup(this).exceptExperimentalInternal(selector.toColumns()) - /** - * ## EXPERIMENTAL: Except on Column Group - * - * Selects the current column group itself, except for the specified columns. This is different from - * [allColsExcept][org.jetbrains.kotlinx.dataframe.api.AllExceptColumnsSelectionDsl.allColsExcept] in that it does not 'lift' the columns out of the group, but instead selects the group itself. - * - * As usual, all overloads for each [Access API][org.jetbrains.kotlinx.dataframe.documentation.AccessApi] are available. - * - * These produce the same result: - * - * `df.`[select][org.jetbrains.kotlinx.dataframe.DataFrame.select]` { `[cols][org.jetbrains.kotlinx.dataframe.api.ColumnsSelectionDsl.cols]`(colGroup) `[except][org.jetbrains.kotlinx.dataframe.columns.ColumnSet.except]` colGroup.col }` - * - * `df.`[select][org.jetbrains.kotlinx.dataframe.DataFrame.select]` { colGroup `[exceptNew][org.jetbrains.kotlinx.dataframe.columns.SingleColumn.except]` { col } }` - * - * These functions are experimental and may be removed or changed in the future. - * - * Trying these functions requires you to `@`[`OptIn`][OptIn]`(`[ExperimentalExceptCsDsl][org.jetbrains.kotlinx.dataframe.api.ExperimentalExceptCsDsl]`::class)` first. - * - * ## NOTE: - * `exceptNew` will likely be renamed to `except` when the deprecated [SingleColumn.except][org.jetbrains.kotlinx.dataframe.columns.SingleColumn.except] functions - * are deleted. - */ - @ExperimentalExceptCsDsl - @Suppress("INAPPLICABLE_JVM_NAME") - @JvmName("KPropertyDataRowExceptNew") - public infix fun KProperty>.exceptNew(selector: ColumnsSelector): SingleColumn> = - columnGroup(this).exceptExperimentalInternal(selector.toColumns()) - @ExperimentalExceptCsDsl @Deprecated( message = ALL_COLS_EXCEPT, diff --git a/core/generated-sources/src/main/kotlin/org/jetbrains/kotlinx/dataframe/api/select.kt b/core/generated-sources/src/main/kotlin/org/jetbrains/kotlinx/dataframe/api/select.kt index 9e112c1eb..48decfea4 100644 --- a/core/generated-sources/src/main/kotlin/org/jetbrains/kotlinx/dataframe/api/select.kt +++ b/core/generated-sources/src/main/kotlin/org/jetbrains/kotlinx/dataframe/api/select.kt @@ -435,64 +435,9 @@ public interface SelectColumnsSelectionDsl { * @return A [ColumnSet][org.jetbrains.kotlinx.dataframe.columns.ColumnSet] containing the columns selected by [selector]. * @see [SingleColumn.except] */ - @OptIn(ExperimentalTypeInference::class) - @OverloadResolutionByLambdaReturnType - // TODO: [KT-64092](https://youtrack.jetbrains.com/issue/KT-64092/OVERLOADRESOLUTIONAMBIGUITY-caused-by-lambda-argument) public fun KProperty.select(selector: ColumnsSelector): ColumnSet = columnGroup(this).select(selector) - /** - * ## Select from [ColumnGroup][org.jetbrains.kotlinx.dataframe.columns.ColumnGroup] - * - * Perform a selection of columns using the [Columns Selection DSL][org.jetbrains.kotlinx.dataframe.api.ColumnsSelectionDsl] on - * any [ColumnGroup][org.jetbrains.kotlinx.dataframe.columns.ColumnGroup]. This is more powerful than the [cols][org.jetbrains.kotlinx.dataframe.api.ColumnsSelectionDsl.cols] filter, because now all - * operations of the DSL are at your disposal. - * - * The scope of the new DSL instance is relative to - * the [ColumnGroup][org.jetbrains.kotlinx.dataframe.columns.ColumnGroup] you are selecting from. - * - * The [invoke][org.jetbrains.kotlinx.dataframe.api.ColumnsSelectionDsl.invoke] operator is overloaded to work as a shortcut for this method. - * - * ### Check out: [Grammar][org.jetbrains.kotlinx.dataframe.api.SelectColumnsSelectionDsl.Grammar] - * - * #### For example: - * - * `df.`[select][org.jetbrains.kotlinx.dataframe.DataFrame.select]` { myColGroup.`[select][org.jetbrains.kotlinx.dataframe.columns.SingleColumn.select]` { someCol `[and][org.jetbrains.kotlinx.dataframe.api.AndColumnsSelectionDsl.and]` `[colsOf][org.jetbrains.kotlinx.dataframe.columns.SingleColumn.colsOf]`<`[String][String]`>() } }` - * - * `df.`[select][org.jetbrains.kotlinx.dataframe.DataFrame.select]` { "myGroupCol" `[{][kotlin.String.select]` "colA" and `[expr][org.jetbrains.kotlinx.dataframe.api.ColumnsSelectionDsl.expr]` { 0 } `[}][kotlin.String.select]` }` - * - * `df.`[select][org.jetbrains.kotlinx.dataframe.DataFrame.select]` { "pathTo"["myGroupCol"].`[select][org.jetbrains.kotlinx.dataframe.columns.ColumnPath.select]` { "colA" and "colB" } }` - * - * `df.`[select][org.jetbrains.kotlinx.dataframe.DataFrame.select]` { it["myGroupCol"].`[asColumnGroup][org.jetbrains.kotlinx.dataframe.DataColumn.asColumnGroup]`()`[() {][org.jetbrains.kotlinx.dataframe.columns.SingleColumn.select]` "colA" and "colB" `[}][org.jetbrains.kotlinx.dataframe.columns.SingleColumn.select]` }` - * - * #### Examples for this overload: - * - * `df.`[select][DataFrame.select]` { Type::myColGroup.`[select][KProperty.select]` { someCol `[and][ColumnsSelectionDsl.and]` `[colsOf][SingleColumn.colsOf]`<`[String][String]`>() } }` - * - * `df.`[select][DataFrame.select]` { DataSchemaType::myColGroup `[`{`][KProperty.select]` colA `[and][ColumnsSelectionDsl.and]` colB `[`}`][KProperty.select]` }` - * - * ## NOTE: - * If you get a warning `CANDIDATE_CHOSEN_USING_OVERLOAD_RESOLUTION_BY_LAMBDA_ANNOTATION`, you - * can safely ignore this. It is caused by a workaround for a bug in the Kotlin compiler - * ([KT-64092](https://youtrack.jetbrains.com/issue/KT-64092/OVERLOADRESOLUTIONAMBIGUITY-caused-by-lambda-argument)). - * - * - *      - * - * - * See also [except][org.jetbrains.kotlinx.dataframe.api.ColumnsSelectionDsl.except]/[allExcept][org.jetbrains.kotlinx.dataframe.api.AllExceptColumnsSelectionDsl.allColsExcept] for the inverted operation of this function. - * - * @param [selector] The [ColumnsSelector][org.jetbrains.kotlinx.dataframe.ColumnsSelector] to use for the selection. - * @receiver The [ColumnGroup][org.jetbrains.kotlinx.dataframe.columns.ColumnGroup] to select from. - * @throws [IllegalArgumentException] If [this] is not a [ColumnGroup][org.jetbrains.kotlinx.dataframe.columns.ColumnGroup]. - * @return A [ColumnSet][org.jetbrains.kotlinx.dataframe.columns.ColumnSet] containing the columns selected by [selector]. - * @see [SingleColumn.except] - */ - @Suppress("INAPPLICABLE_JVM_NAME") - @JvmName("KPropertyDataRowSelect") - public fun KProperty>.select(selector: ColumnsSelector): ColumnSet = - columnGroup(this).select(selector) - /** * ## Select from [ColumnGroup][org.jetbrains.kotlinx.dataframe.columns.ColumnGroup] * diff --git a/core/generated-sources/src/test/kotlin/org/jetbrains/kotlinx/dataframe/api/all.kt b/core/generated-sources/src/test/kotlin/org/jetbrains/kotlinx/dataframe/api/all.kt index 31719b6b2..294df44e1 100644 --- a/core/generated-sources/src/test/kotlin/org/jetbrains/kotlinx/dataframe/api/all.kt +++ b/core/generated-sources/src/test/kotlin/org/jetbrains/kotlinx/dataframe/api/all.kt @@ -183,7 +183,7 @@ class AllTests : ColumnsSelectionDslTests() { df.select { "name".allColsAfter(pathOf("firstName")) }, df.select { "name".allColsAfter(pathOf("name", "firstName")) }, - df.select { Person::name.allColsAfter { firstName } }, + // df.select { Person::name.allColsAfter { firstName } }, https://youtrack.jetbrains.com/issue/KT-64092/OVERLOADRESOLUTIONAMBIGUITY-caused-by-lambda-argument df.select { Person::name.allColsAfter { firstNameAccessor } }, df.select { Person::name.allColsAfter(name.firstName) }, df.select { Person::name.allColsAfter(firstNameAccessor) }, @@ -226,7 +226,7 @@ class AllTests : ColumnsSelectionDslTests() { df.select { "name".allColsFrom(pathOf("lastName")) }, df.select { "name".allColsFrom(pathOf("name", "lastName")) }, - df.select { Person::name.allColsFrom { lastName } }, +// df.select { Person::name.allColsFrom { lastName } }, https://youtrack.jetbrains.com/issue/KT-64092/OVERLOADRESOLUTIONAMBIGUITY-caused-by-lambda-argument df.select { Person::name.allColsFrom { lastNameAccessor } }, df.select { Person::name.allColsFrom(name.lastName) }, df.select { Person::name.allColsFrom(lastNameAccessor) }, @@ -280,7 +280,7 @@ class AllTests : ColumnsSelectionDslTests() { df.select { "name".allColsBefore(pathOf("lastName")) }, df.select { "name".allColsBefore(pathOf("name", "lastName")) }, - df.select { Person::name.allColsBefore { lastName } }, +// df.select { Person::name.allColsBefore { lastName } }, https://youtrack.jetbrains.com/issue/KT-64092/OVERLOADRESOLUTIONAMBIGUITY-caused-by-lambda-argument df.select { Person::name.allColsBefore { lastNameAccessor } }, df.select { Person::name.allColsBefore(name.lastName) }, df.select { Person::name.allColsBefore(lastNameAccessor) }, @@ -323,7 +323,7 @@ class AllTests : ColumnsSelectionDslTests() { df.select { "name".allColsUpTo(pathOf("firstName")) }, df.select { "name".allColsUpTo(pathOf("name", "firstName")) }, - df.select { Person::name.allColsUpTo { firstName } }, +// df.select { Person::name.allColsUpTo { firstName } }, https://youtrack.jetbrains.com/issue/KT-64092/OVERLOADRESOLUTIONAMBIGUITY-caused-by-lambda-argument df.select { Person::name.allColsUpTo { firstNameAccessor } }, df.select { Person::name.allColsUpTo(name.firstName) }, df.select { Person::name.allColsUpTo(firstNameAccessor) }, diff --git a/core/generated-sources/src/test/kotlin/org/jetbrains/kotlinx/dataframe/api/allExcept.kt b/core/generated-sources/src/test/kotlin/org/jetbrains/kotlinx/dataframe/api/allExcept.kt index 6b37c03ac..8a9ccbdf8 100644 --- a/core/generated-sources/src/test/kotlin/org/jetbrains/kotlinx/dataframe/api/allExcept.kt +++ b/core/generated-sources/src/test/kotlin/org/jetbrains/kotlinx/dataframe/api/allExcept.kt @@ -176,8 +176,8 @@ class AllExceptTests : ColumnsSelectionDslTests() { // df.select { "name".allColsExcept(pathOf("name", "lastName")) }, // breaks df.select { "name".allColsExcept { cols { "last" in it.name } } }, - df.select { Person::name.allColsExcept { lastName } }, - df.select { Person::name.allColsExcept { lastNameAccessor } }, +// df.select { Person::name.allColsExcept { lastName } }, https://youtrack.jetbrains.com/issue/KT-64092/OVERLOADRESOLUTIONAMBIGUITY-caused-by-lambda-argument +// df.select { Person::name.allColsExcept { lastNameAccessor } }, https://youtrack.jetbrains.com/issue/KT-64092/OVERLOADRESOLUTIONAMBIGUITY-caused-by-lambda-argument // df.select { Person::name.allColsExcept(name.lastName) }, // blocked // df.select { Person::name.allColsExcept(lastNameAccessor) }, // blocked df.select { Person::name.allColsExcept("lastName") }, @@ -336,12 +336,13 @@ class AllExceptTests : ColumnsSelectionDslTests() { df.select { "name".exceptNew(pathOf("firstName")) }, df.select { "name".exceptNew(pathOf("firstName"), pathOf("firstName")) }, - df.select { Person::name exceptNew { cols { "first" in it.name } } }, - df.select { Person::name.exceptNew { cols { "first" in it.name } and cols { "first" in it.name } } }, - df.select { Person::name exceptNew { firstName } }, - df.select { Person::name.exceptNew { firstNameAccessor } }, - df.select { Person::name exceptNew { firstName and firstName } }, - df.select { Person::name.exceptNew { firstNameAccessor and firstNameAccessor } }, + // https://youtrack.jetbrains.com/issue/KT-64092/OVERLOADRESOLUTIONAMBIGUITY-caused-by-lambda-argument +// df.select { Person::name exceptNew { cols { "first" in it.name } } }, +// df.select { Person::name.exceptNew { cols { "first" in it.name } and cols { "first" in it.name } } }, +// df.select { Person::name exceptNew { firstName } }, +// df.select { Person::name.exceptNew { firstNameAccessor } }, +// df.select { Person::name exceptNew { firstName and firstName } }, +// df.select { Person::name.exceptNew { firstNameAccessor and firstNameAccessor } }, // df.select { Person::name exceptNew name.firstName }, // not allowed // df.select { Person::name.exceptNew(name.firstName and name.firstName) }, // not allowed // df.select { Person::name exceptNew firstNameAccessor }, // not allowed diff --git a/core/generated-sources/src/test/kotlin/org/jetbrains/kotlinx/dataframe/api/select.kt b/core/generated-sources/src/test/kotlin/org/jetbrains/kotlinx/dataframe/api/select.kt index efa31d19e..2577260d9 100644 --- a/core/generated-sources/src/test/kotlin/org/jetbrains/kotlinx/dataframe/api/select.kt +++ b/core/generated-sources/src/test/kotlin/org/jetbrains/kotlinx/dataframe/api/select.kt @@ -38,11 +38,11 @@ class SelectTests : ColumnsSelectionDslTests() { df.select { (it["name"].asColumnGroup()) { colsOf() } }, // TODO: remove warning due to [KT-64092](https://youtrack.jetbrains.com/issue/KT-64092/OVERLOADRESOLUTIONAMBIGUITY-caused-by-lambda-argument) - df.select { Person::name.select { firstName and lastName } }, +// df.select { Person::name.select { firstName and lastName } }, df.select { NonDataSchemaPerson::name.select { firstName and lastName } }, // TODO: remove warning due to [KT-64092](https://youtrack.jetbrains.com/issue/KT-64092/OVERLOADRESOLUTIONAMBIGUITY-caused-by-lambda-argument) - df.select { Person::name { firstName and lastName } }, +// df.select { Person::name { firstName and lastName } }, df.select { NonDataSchemaPerson::name { firstName and lastName } }, df.select { "name">().select { colsOf() } }, diff --git a/core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/api/ColumnsSelectionDsl.kt b/core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/api/ColumnsSelectionDsl.kt index ed4fd06c7..6c0a1dd81 100644 --- a/core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/api/ColumnsSelectionDsl.kt +++ b/core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/api/ColumnsSelectionDsl.kt @@ -388,24 +388,6 @@ public interface ColumnsSelectionDsl : /* SingleColumn> */ public operator fun SingleColumn>.invoke(selector: ColumnsSelector): ColumnSet = select(selector) - /** - * @include [SelectColumnsSelectionDsl.CommonSelectDocs] - * @set [SelectColumnsSelectionDsl.CommonSelectDocs.ExampleArg] - * - * `df.`[select][DataFrame.select]` { Type::myColGroup.`[`select`][KProperty.select]` { someCol `[`and`][ColumnsSelectionDsl.and]` `[`colsOf`][SingleColumn.colsOf]`<`[`String`][String]`>() } }` - * - * `df.`[select][DataFrame.select]` { DataSchemaType::myColGroup `[`{`][KProperty.select]` colA `[`and`][ColumnsSelectionDsl.and]` colB `[`}`][KProperty.select]` }` - * - * ## NOTE: {@comment TODO fix warning} - * If you get a warning `CANDIDATE_CHOSEN_USING_OVERLOAD_RESOLUTION_BY_LAMBDA_ANNOTATION`, you - * can safely ignore this. It is caused by a workaround for a bug in the Kotlin compiler - * ([KT-64092](https://youtrack.jetbrains.com/issue/KT-64092/OVERLOADRESOLUTIONAMBIGUITY-caused-by-lambda-argument)). - */ - @Suppress("INAPPLICABLE_JVM_NAME") - @JvmName("KPropertyDataRowInvoke") - public operator fun KProperty>.invoke(selector: ColumnsSelector): ColumnSet = - select(selector) - /** * @include [SelectColumnsSelectionDsl.CommonSelectDocs] * @set [SelectColumnsSelectionDsl.CommonSelectDocs.ExampleArg] @@ -414,8 +396,6 @@ public interface ColumnsSelectionDsl : /* SingleColumn> */ * * `df.`[select][DataFrame.select]` { DataSchemaType::myColGroup `[`{`][KProperty.select]` colA `[`and`][ColumnsSelectionDsl.and]` colB `[`}`][KProperty.select]` }` */ - @OptIn(ExperimentalTypeInference::class) - @OverloadResolutionByLambdaReturnType public operator fun KProperty.invoke(selector: ColumnsSelector): ColumnSet = columnGroup(this).select(selector) diff --git a/core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/api/all.kt b/core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/api/all.kt index 3866bfae8..b16fc003d 100644 --- a/core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/api/all.kt +++ b/core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/api/all.kt @@ -506,11 +506,6 @@ public interface AllColumnsSelectionDsl { * @set [CommonAllSubsetDocs.ExampleArg] * * `df.`[select][DataFrame.select]` { DataSchemaType::myColGroup.`[allColsAfter][KProperty.allColsAfter]`{@get [KPropertyAllAfterDocs.Arg]} }` - * - * ## NOTE: {@comment TODO fix warning} - * If you get a warning `CANDIDATE_CHOSEN_USING_OVERLOAD_RESOLUTION_BY_LAMBDA_ANNOTATION`, you - * can safely ignore this. It is caused by a workaround for a bug in the Kotlin compiler - * ([KT-64092](https://youtrack.jetbrains.com/issue/KT-64092/OVERLOADRESOLUTIONAMBIGUITY-caused-by-lambda-argument)). */ @ExcludeFromSources private interface KPropertyAllAfterDocs { @@ -522,20 +517,9 @@ public interface AllColumnsSelectionDsl { /** * @include [KPropertyAllAfterDocs] {@set [KPropertyAllAfterDocs.Arg] \ \{ myColumn \}} */ - @OptIn(ExperimentalTypeInference::class) - @OverloadResolutionByLambdaReturnType - // TODO: [KT-64092](https://youtrack.jetbrains.com/issue/KT-64092/OVERLOADRESOLUTIONAMBIGUITY-caused-by-lambda-argument) public fun KProperty.allColsAfter(column: ColumnSelector): ColumnSet<*> = columnGroup(this).allColsAfter(column) - /** - * @include [KPropertyAllAfterDocs] {@set [KPropertyAllAfterDocs.Arg] \ \{ myColumn \}} - */ - @Suppress("INAPPLICABLE_JVM_NAME") - @JvmName("KPropertyDataRowAllColsAfter") - public fun KProperty>.allColsAfter(column: ColumnSelector): ColumnSet<*> = - columnGroup(this).allColsAfter(column) - /** @include [KPropertyAllAfterDocs] {@set [KPropertyAllAfterDocs.Arg] ("pathTo"["myColumn"])} */ public fun KProperty<*>.allColsAfter(column: ColumnPath): ColumnSet<*> = columnGroup(this).allColsAfter(column) @@ -753,11 +737,6 @@ public interface AllColumnsSelectionDsl { * @set [CommonAllSubsetDocs.ExampleArg] * * `df.`[select][DataFrame.select]` { DataSchemaType::someColGroup.`[allColsFrom][KProperty.allColsFrom]`{@get [KPropertyAllFromDocs.Arg]} }` - * - * ## NOTE: {@comment TODO fix warning} - * If you get a warning `CANDIDATE_CHOSEN_USING_OVERLOAD_RESOLUTION_BY_LAMBDA_ANNOTATION`, you - * can safely ignore this. It is caused by a workaround for a bug in the Kotlin compiler - * ([KT-64092](https://youtrack.jetbrains.com/issue/KT-64092/OVERLOADRESOLUTIONAMBIGUITY-caused-by-lambda-argument)). */ @ExcludeFromSources private interface KPropertyAllFromDocs { @@ -769,20 +748,9 @@ public interface AllColumnsSelectionDsl { /** * @include [KPropertyAllFromDocs] {@set [KPropertyAllFromDocs.Arg] \ \{ myColumn \}} */ - @OptIn(ExperimentalTypeInference::class) - @OverloadResolutionByLambdaReturnType - // TODO: [KT-64092](https://youtrack.jetbrains.com/issue/KT-64092/OVERLOADRESOLUTIONAMBIGUITY-caused-by-lambda-argument) public fun KProperty.allColsFrom(column: ColumnSelector): ColumnSet<*> = columnGroup(this).allColsFrom(column) - /** - * @include [KPropertyAllFromDocs] {@set [KPropertyAllFromDocs.Arg] \ \{ myColumn \}} - */ - @Suppress("INAPPLICABLE_JVM_NAME") - @JvmName("KPropertyDataRowAllColsFrom") - public fun KProperty>.allColsFrom(column: ColumnSelector): ColumnSet<*> = - columnGroup(this).allColsFrom(column) - /** @include [KPropertyAllFromDocs] {@set [KPropertyAllFromDocs.Arg] ("pathTo"["myColumn"])} */ public fun KProperty<*>.allColsFrom(column: ColumnPath): ColumnSet<*> = columnGroup(this).allColsFrom(column) @@ -997,11 +965,6 @@ public interface AllColumnsSelectionDsl { * @set [CommonAllSubsetDocs.ExampleArg] * * `df.`[select][DataFrame.select]` { DataSchemaType::someColGroup.`[allColsBefore][KProperty.allColsBefore]`{@get [KPropertyAllBeforeDocs.Arg]} }` - * - * ## NOTE: {@comment TODO fix warning} - * If you get a warning `CANDIDATE_CHOSEN_USING_OVERLOAD_RESOLUTION_BY_LAMBDA_ANNOTATION`, you - * can safely ignore this. It is caused by a workaround for a bug in the Kotlin compiler - * ([KT-64092](https://youtrack.jetbrains.com/issue/KT-64092/OVERLOADRESOLUTIONAMBIGUITY-caused-by-lambda-argument)). */ @ExcludeFromSources private interface KPropertyAllBeforeDocs { @@ -1013,20 +976,9 @@ public interface AllColumnsSelectionDsl { /** * @include [KPropertyAllBeforeDocs] {@set [KPropertyAllBeforeDocs.Arg] \ \{ myColumn \}} */ - @OptIn(ExperimentalTypeInference::class) - @OverloadResolutionByLambdaReturnType - // TODO: [KT-64092](https://youtrack.jetbrains.com/issue/KT-64092/OVERLOADRESOLUTIONAMBIGUITY-caused-by-lambda-argument) public fun KProperty.allColsBefore(column: ColumnSelector): ColumnSet<*> = columnGroup(this).allColsBefore(column) - /** - * @include [KPropertyAllBeforeDocs] {@set [KPropertyAllBeforeDocs.Arg] \ \{ myColumn \}} - */ - @Suppress("INAPPLICABLE_JVM_NAME") - @JvmName("KPropertyDataRowAllColsBefore") - public fun KProperty>.allColsBefore(column: ColumnSelector): ColumnSet<*> = - columnGroup(this).allColsBefore(column) - /** @include [KPropertyAllBeforeDocs] {@set [KPropertyAllBeforeDocs.Arg] ("pathTo"["myColumn"])} */ public fun KProperty<*>.allColsBefore(column: ColumnPath): ColumnSet<*> = columnGroup(this).allColsBefore(column) @@ -1244,11 +1196,6 @@ public interface AllColumnsSelectionDsl { * @set [CommonAllSubsetDocs.ExampleArg] * * `df.`[select][DataFrame.select]` { DataSchemaType::someColGroup.`[allColsUpTo][KProperty.allColsUpTo]`{@get [KPropertyAllUpToDocs.Arg]} }` - * - * ## NOTE: {@comment TODO fix warning} - * If you get a warning `CANDIDATE_CHOSEN_USING_OVERLOAD_RESOLUTION_BY_LAMBDA_ANNOTATION`, you - * can safely ignore this. It is caused by a workaround for a bug in the Kotlin compiler - * ([KT-64092](https://youtrack.jetbrains.com/issue/KT-64092/OVERLOADRESOLUTIONAMBIGUITY-caused-by-lambda-argument)). */ @ExcludeFromSources private interface KPropertyAllUpToDocs { @@ -1260,20 +1207,9 @@ public interface AllColumnsSelectionDsl { /** * @include [KPropertyAllUpToDocs] {@set [KPropertyAllUpToDocs.Arg] \ \{ myColumn \}} */ - @OptIn(ExperimentalTypeInference::class) - @OverloadResolutionByLambdaReturnType - // TODO: [KT-64092](https://youtrack.jetbrains.com/issue/KT-64092/OVERLOADRESOLUTIONAMBIGUITY-caused-by-lambda-argument) public fun KProperty.allColsUpTo(column: ColumnSelector): ColumnSet<*> = columnGroup(this).allColsUpTo(column) - /** - * @include [KPropertyAllUpToDocs] {@set [KPropertyAllUpToDocs.Arg] \ \{ myColumn \}} - */ - @Suppress("INAPPLICABLE_JVM_NAME") - @JvmName("KPropertyDataRowAllColsUpTo") - public fun KProperty>.allColsUpTo(column: ColumnSelector): ColumnSet<*> = - columnGroup(this).allColsUpTo(column) - /** @include [KPropertyAllUpToDocs] {@set [KPropertyAllUpToDocs.Arg] ("pathTo"["myColumn"])} */ public fun KProperty<*>.allColsUpTo(column: ColumnPath): ColumnSet<*> = columnGroup(this).allColsUpTo(column) diff --git a/core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/api/allExcept.kt b/core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/api/allExcept.kt index 2ef996e0c..1400cfe10 100644 --- a/core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/api/allExcept.kt +++ b/core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/api/allExcept.kt @@ -581,33 +581,12 @@ public interface AllExceptColumnsSelectionDsl { /** * @include [ColumnGroupDocs] - * ## NOTE: {@comment TODO fix warning} - * If you get a warning `CANDIDATE_CHOSEN_USING_OVERLOAD_RESOLUTION_BY_LAMBDA_ANNOTATION`, you - * can safely ignore this. It is caused by a workaround for a bug in the Kotlin compiler - * ([KT-64092](https://youtrack.jetbrains.com/issue/KT-64092/OVERLOADRESOLUTIONAMBIGUITY-caused-by-lambda-argument)). * @include [ColumnGroupDocs.KPropertyReceiverArgs] * @include [ColumnGroupDocs.SelectorArgs] */ - @OptIn(ExperimentalTypeInference::class) - @OverloadResolutionByLambdaReturnType - // TODO: [KT-64092](https://youtrack.jetbrains.com/issue/KT-64092/OVERLOADRESOLUTIONAMBIGUITY-caused-by-lambda-argument) public fun KProperty.allColsExcept(selector: ColumnsSelector): ColumnSet<*> = columnGroup(this).allColsExcept(selector) - /** - * @include [ColumnGroupDocs] - * ## NOTE: {@comment TODO fix warning} - * If you get a warning `CANDIDATE_CHOSEN_USING_OVERLOAD_RESOLUTION_BY_LAMBDA_ANNOTATION`, you - * can safely ignore this. It is caused by a workaround for a bug in the Kotlin compiler - * ([KT-64092](https://youtrack.jetbrains.com/issue/KT-64092/OVERLOADRESOLUTIONAMBIGUITY-caused-by-lambda-argument)). - * @include [ColumnGroupDocs.KPropertyReceiverArgs] - * @include [ColumnGroupDocs.SelectorArgs] - */ - @Suppress("INAPPLICABLE_JVM_NAME") - @JvmName("KPropertyDataRowAllColsExcept") - public fun KProperty>.allColsExcept(selector: ColumnsSelector): ColumnSet<*> = - columnGroup(this).allColsExcept(selector) - @Deprecated( message = ALL_COLS_EXCEPT, replaceWith = ReplaceWith(ALL_COLS_REPLACE), @@ -866,21 +845,9 @@ public interface AllExceptColumnsSelectionDsl { * @include [ExperimentalExceptDocs] */ @ExperimentalExceptCsDsl - @OptIn(ExperimentalTypeInference::class) - @OverloadResolutionByLambdaReturnType - // TODO: [KT-64092](https://youtrack.jetbrains.com/issue/KT-64092/OVERLOADRESOLUTIONAMBIGUITY-caused-by-lambda-argument) public infix fun KProperty.exceptNew(selector: ColumnsSelector): SingleColumn> = columnGroup(this).exceptExperimentalInternal(selector.toColumns()) - /** - * @include [ExperimentalExceptDocs] - */ - @ExperimentalExceptCsDsl - @Suppress("INAPPLICABLE_JVM_NAME") - @JvmName("KPropertyDataRowExceptNew") - public infix fun KProperty>.exceptNew(selector: ColumnsSelector): SingleColumn> = - columnGroup(this).exceptExperimentalInternal(selector.toColumns()) - @ExperimentalExceptCsDsl @Deprecated( message = ALL_COLS_EXCEPT, diff --git a/core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/api/select.kt b/core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/api/select.kt index 68dc26a6c..2d55ec550 100644 --- a/core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/api/select.kt +++ b/core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/api/select.kt @@ -183,30 +183,9 @@ public interface SelectColumnsSelectionDsl { * * `df.`[select][DataFrame.select]` { DataSchemaType::myColGroup `[`{`][KProperty.select]` colA `[and][ColumnsSelectionDsl.and]` colB `[`}`][KProperty.select]` }` */ - @OptIn(ExperimentalTypeInference::class) - @OverloadResolutionByLambdaReturnType - // TODO: [KT-64092](https://youtrack.jetbrains.com/issue/KT-64092/OVERLOADRESOLUTIONAMBIGUITY-caused-by-lambda-argument) public fun KProperty.select(selector: ColumnsSelector): ColumnSet = columnGroup(this).select(selector) - /** - * @include [CommonSelectDocs] - * @set [CommonSelectDocs.ExampleArg] - * - * `df.`[select][DataFrame.select]` { Type::myColGroup.`[select][KProperty.select]` { someCol `[and][ColumnsSelectionDsl.and]` `[colsOf][SingleColumn.colsOf]`<`[String][String]`>() } }` - * - * `df.`[select][DataFrame.select]` { DataSchemaType::myColGroup `[`{`][KProperty.select]` colA `[and][ColumnsSelectionDsl.and]` colB `[`}`][KProperty.select]` }` - * - * ## NOTE: {@comment TODO fix warning} - * If you get a warning `CANDIDATE_CHOSEN_USING_OVERLOAD_RESOLUTION_BY_LAMBDA_ANNOTATION`, you - * can safely ignore this. It is caused by a workaround for a bug in the Kotlin compiler - * ([KT-64092](https://youtrack.jetbrains.com/issue/KT-64092/OVERLOADRESOLUTIONAMBIGUITY-caused-by-lambda-argument)). - */ - @Suppress("INAPPLICABLE_JVM_NAME") - @JvmName("KPropertyDataRowSelect") - public fun KProperty>.select(selector: ColumnsSelector): ColumnSet = - columnGroup(this).select(selector) - /** * @include [SelectColumnsSelectionDsl.CommonSelectDocs] * @set [SelectColumnsSelectionDsl.CommonSelectDocs.ExampleArg] diff --git a/core/src/test/kotlin/org/jetbrains/kotlinx/dataframe/api/all.kt b/core/src/test/kotlin/org/jetbrains/kotlinx/dataframe/api/all.kt index 31719b6b2..294df44e1 100644 --- a/core/src/test/kotlin/org/jetbrains/kotlinx/dataframe/api/all.kt +++ b/core/src/test/kotlin/org/jetbrains/kotlinx/dataframe/api/all.kt @@ -183,7 +183,7 @@ class AllTests : ColumnsSelectionDslTests() { df.select { "name".allColsAfter(pathOf("firstName")) }, df.select { "name".allColsAfter(pathOf("name", "firstName")) }, - df.select { Person::name.allColsAfter { firstName } }, + // df.select { Person::name.allColsAfter { firstName } }, https://youtrack.jetbrains.com/issue/KT-64092/OVERLOADRESOLUTIONAMBIGUITY-caused-by-lambda-argument df.select { Person::name.allColsAfter { firstNameAccessor } }, df.select { Person::name.allColsAfter(name.firstName) }, df.select { Person::name.allColsAfter(firstNameAccessor) }, @@ -226,7 +226,7 @@ class AllTests : ColumnsSelectionDslTests() { df.select { "name".allColsFrom(pathOf("lastName")) }, df.select { "name".allColsFrom(pathOf("name", "lastName")) }, - df.select { Person::name.allColsFrom { lastName } }, +// df.select { Person::name.allColsFrom { lastName } }, https://youtrack.jetbrains.com/issue/KT-64092/OVERLOADRESOLUTIONAMBIGUITY-caused-by-lambda-argument df.select { Person::name.allColsFrom { lastNameAccessor } }, df.select { Person::name.allColsFrom(name.lastName) }, df.select { Person::name.allColsFrom(lastNameAccessor) }, @@ -280,7 +280,7 @@ class AllTests : ColumnsSelectionDslTests() { df.select { "name".allColsBefore(pathOf("lastName")) }, df.select { "name".allColsBefore(pathOf("name", "lastName")) }, - df.select { Person::name.allColsBefore { lastName } }, +// df.select { Person::name.allColsBefore { lastName } }, https://youtrack.jetbrains.com/issue/KT-64092/OVERLOADRESOLUTIONAMBIGUITY-caused-by-lambda-argument df.select { Person::name.allColsBefore { lastNameAccessor } }, df.select { Person::name.allColsBefore(name.lastName) }, df.select { Person::name.allColsBefore(lastNameAccessor) }, @@ -323,7 +323,7 @@ class AllTests : ColumnsSelectionDslTests() { df.select { "name".allColsUpTo(pathOf("firstName")) }, df.select { "name".allColsUpTo(pathOf("name", "firstName")) }, - df.select { Person::name.allColsUpTo { firstName } }, +// df.select { Person::name.allColsUpTo { firstName } }, https://youtrack.jetbrains.com/issue/KT-64092/OVERLOADRESOLUTIONAMBIGUITY-caused-by-lambda-argument df.select { Person::name.allColsUpTo { firstNameAccessor } }, df.select { Person::name.allColsUpTo(name.firstName) }, df.select { Person::name.allColsUpTo(firstNameAccessor) }, diff --git a/core/src/test/kotlin/org/jetbrains/kotlinx/dataframe/api/allExcept.kt b/core/src/test/kotlin/org/jetbrains/kotlinx/dataframe/api/allExcept.kt index 6b37c03ac..8a9ccbdf8 100644 --- a/core/src/test/kotlin/org/jetbrains/kotlinx/dataframe/api/allExcept.kt +++ b/core/src/test/kotlin/org/jetbrains/kotlinx/dataframe/api/allExcept.kt @@ -176,8 +176,8 @@ class AllExceptTests : ColumnsSelectionDslTests() { // df.select { "name".allColsExcept(pathOf("name", "lastName")) }, // breaks df.select { "name".allColsExcept { cols { "last" in it.name } } }, - df.select { Person::name.allColsExcept { lastName } }, - df.select { Person::name.allColsExcept { lastNameAccessor } }, +// df.select { Person::name.allColsExcept { lastName } }, https://youtrack.jetbrains.com/issue/KT-64092/OVERLOADRESOLUTIONAMBIGUITY-caused-by-lambda-argument +// df.select { Person::name.allColsExcept { lastNameAccessor } }, https://youtrack.jetbrains.com/issue/KT-64092/OVERLOADRESOLUTIONAMBIGUITY-caused-by-lambda-argument // df.select { Person::name.allColsExcept(name.lastName) }, // blocked // df.select { Person::name.allColsExcept(lastNameAccessor) }, // blocked df.select { Person::name.allColsExcept("lastName") }, @@ -336,12 +336,13 @@ class AllExceptTests : ColumnsSelectionDslTests() { df.select { "name".exceptNew(pathOf("firstName")) }, df.select { "name".exceptNew(pathOf("firstName"), pathOf("firstName")) }, - df.select { Person::name exceptNew { cols { "first" in it.name } } }, - df.select { Person::name.exceptNew { cols { "first" in it.name } and cols { "first" in it.name } } }, - df.select { Person::name exceptNew { firstName } }, - df.select { Person::name.exceptNew { firstNameAccessor } }, - df.select { Person::name exceptNew { firstName and firstName } }, - df.select { Person::name.exceptNew { firstNameAccessor and firstNameAccessor } }, + // https://youtrack.jetbrains.com/issue/KT-64092/OVERLOADRESOLUTIONAMBIGUITY-caused-by-lambda-argument +// df.select { Person::name exceptNew { cols { "first" in it.name } } }, +// df.select { Person::name.exceptNew { cols { "first" in it.name } and cols { "first" in it.name } } }, +// df.select { Person::name exceptNew { firstName } }, +// df.select { Person::name.exceptNew { firstNameAccessor } }, +// df.select { Person::name exceptNew { firstName and firstName } }, +// df.select { Person::name.exceptNew { firstNameAccessor and firstNameAccessor } }, // df.select { Person::name exceptNew name.firstName }, // not allowed // df.select { Person::name.exceptNew(name.firstName and name.firstName) }, // not allowed // df.select { Person::name exceptNew firstNameAccessor }, // not allowed diff --git a/core/src/test/kotlin/org/jetbrains/kotlinx/dataframe/api/select.kt b/core/src/test/kotlin/org/jetbrains/kotlinx/dataframe/api/select.kt index efa31d19e..2577260d9 100644 --- a/core/src/test/kotlin/org/jetbrains/kotlinx/dataframe/api/select.kt +++ b/core/src/test/kotlin/org/jetbrains/kotlinx/dataframe/api/select.kt @@ -38,11 +38,11 @@ class SelectTests : ColumnsSelectionDslTests() { df.select { (it["name"].asColumnGroup()) { colsOf() } }, // TODO: remove warning due to [KT-64092](https://youtrack.jetbrains.com/issue/KT-64092/OVERLOADRESOLUTIONAMBIGUITY-caused-by-lambda-argument) - df.select { Person::name.select { firstName and lastName } }, +// df.select { Person::name.select { firstName and lastName } }, df.select { NonDataSchemaPerson::name.select { firstName and lastName } }, // TODO: remove warning due to [KT-64092](https://youtrack.jetbrains.com/issue/KT-64092/OVERLOADRESOLUTIONAMBIGUITY-caused-by-lambda-argument) - df.select { Person::name { firstName and lastName } }, +// df.select { Person::name { firstName and lastName } }, df.select { NonDataSchemaPerson::name { firstName and lastName } }, df.select { "name">().select { colsOf() } },