-
Notifications
You must be signed in to change notification settings - Fork 76
Open
Labels
Compiler pluginAnything related to the DataFrame Compiler PluginAnything related to the DataFrame Compiler PluginbugSomething isn't workingSomething isn't working
Milestone
Description
We have
@Refine
@Interpretable("ToTop")
public fun <T, C> MoveClause<T, C>.toTop(
newColumnName: ColumnsSelectionDsl<T>.(ColumnWithPath<C>) -> String = { it.name() },
): DataFrame<T> = into { newColumnName(it).toColumnAccessor() }However, no matter how it's called, the compiler plugins calls toTop { it.name() }.
Meaning, if a user specifies newColumnName like move { group.col }.toTop { it.name() + "1" } .col is available on the result, but at will fail at runtime as there's only the "col1" column.
We cannot reliably see what's inside this lambda expression (unless we follow rename { singleCol }.into { "string constant" }), so it may be best to split it:
@Refine
@Interpretable("ToTop")
public fun <T, C> MoveClause<T, C>.toTop(): DataFrame<T> = toTop { it.name() }
public fun <T, C> MoveClause<T, C>.toTop(
newColumnName: ColumnsSelectionDsl<T>.(ColumnWithPath<C>) -> String,
): DataFrame<T> = into { newColumnName(it).toColumnAccessor() }This doesn't even need changes in the compiler plugin AFAIK :)
Metadata
Metadata
Assignees
Labels
Compiler pluginAnything related to the DataFrame Compiler PluginAnything related to the DataFrame Compiler PluginbugSomething isn't workingSomething isn't working