Skip to content

Commit 788bb89

Browse files
committed
fixup! Add DataFrame.require API for typed selector validation
1 parent d0ef8e6 commit 788bb89

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

  • core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/impl/api
  • docs/StardustDocs/topics

core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/impl/api/require.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import kotlin.reflect.KType
1111
internal fun <T, C> DataFrame<T>.requireImpl(column: ColumnSelector<T, C>, type: KType): DataFrame<T> {
1212
val resolvedColumn = getColumnWithPath(column)
1313
val actualType = resolvedColumn.data.type
14-
kotlin.require(resolvedColumn.data.isSubtypeOf(type)) {
14+
require(resolvedColumn.data.isSubtypeOf(type)) {
1515
"Column '${resolvedColumn.path.joinToString()}' has type '$actualType', which is not subtype of required '$type' type."
1616
}
1717
return this

docs/StardustDocs/topics/require.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Throws an exception if the specified column is missing or its type is not subtyp
55
From the compiler plugin perspective, a new column will appear in the compile-time schema as a result of this operation.
66
The aim here is to help incrementally migrate workflows to extension properties API.
77

8-
However, this operation is new and will work in compiler plugin starting from IntelliJ IDEA 2026.2 and Kotlin 2.4.0
8+
Will work in compiler plugin starting from IntelliJ IDEA 2026.2 and Kotlin 2.4.0.
99

1010
```text
1111
require { column }

0 commit comments

Comments
 (0)