From 5e01d8635a0c5eefce13e3b66dc9b1c3609b8ea7 Mon Sep 17 00:00:00 2001 From: Jolan Rensen Date: Tue, 30 Jul 2024 16:19:43 +0200 Subject: [PATCH] fixup! Fixed one failing test for #713: convertTo can create a temporary non-nullable column with nulls in it. This is now avoided and the behavior has been simplified/stabilized --- .../org/jetbrains/kotlinx/dataframe/impl/api/convertTo.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/impl/api/convertTo.kt b/core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/impl/api/convertTo.kt index 5bade30f0..da419ec11 100644 --- a/core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/impl/api/convertTo.kt +++ b/core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/impl/api/convertTo.kt @@ -276,8 +276,8 @@ internal fun AnyFrame.convertToImpl( dsl.fillers.forEach { filler -> val paths = result.getColumnPaths(UnresolvedColumnsPolicy.Create, filler.columns).toSet() - missingPaths -= paths val (newPaths, existingPaths) = paths.partition { it in missingPaths } + missingPaths -= paths // first fill cols that are already in the df result = result.update { existingPaths.toColumnSet() }.with { filler.expr(this, this) }