-
Notifications
You must be signed in to change notification settings - Fork 73
Rework of dfs functions to recursively #361
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
While the current tactic works in all current tests, I found a major breaking new case: public fun <C> ColumnSet<C>.first(condition: ColumnFilter<C> = { true }): SingleColumn<C> =
transform { listOf(it.first(condition)) }.singleImpl()
df.select { something.first { ... }.recursively() } Not only does Maybe my original idea of creating a different return-type for |
|
@nikitinas what do you think? Also, I'm curious about how you divided up the use of How I see it there are two options:
Also, what's the difference between This distinction also impacts how |
This will be closed in favor of #363 |
|
||
/** | ||
* | ||
*/ | ||
public operator fun SingleColumn<AnyRow>.get(range: IntRange): ColumnSet<*> = cols(range) | ||
public operator fun SingleColumn<*>.get(range: IntRange): ColumnSet<*> = cols(range) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why? I think SingleColumn<AnyRow>
is a ColumnGroup and these operations make sense, but not for SingleColumn<*>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well yes, but then it breaks when you
df.select { it["name"][0..5] }
since it doesn't know the type of the single column you select that way.
Also, I'm gonna close this PR in favor of dfs-rename3, just waiting for Tolya to answer.
#333