-
Notifications
You must be signed in to change notification settings - Fork 73
Deprecate predicate argument in single, colsInGroups, colsAtAnyDepth #1176
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
base: master
Are you sure you want to change the base?
Conversation
97204c3
to
5887f8b
Compare
5887f8b
to
a112e5e
Compare
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.
Overall meaningful changes that will help push users to functions that the compiler plugin can help with :)
see my comments for things that missing still
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.
Grammar DSL still contains predicates
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.
this is in all files I see, please try to rewrite those, and fix it in ColumnsSelectionDsl.kt as well. Let me know if you need help :)
* | ||
* `df.`[select][DataFrame.select]` { `[colsAtAnyDepth][ColumnsSelectionDsl.colsAtAnyDepth]` { !it.`[isColumnGroup][DataColumn.isColumnGroup]` } }` | ||
*/ | ||
@Interpretable("ColsAtAnyDepth1") | ||
@Deprecated("", replaceWith = ReplaceWith("colsAtAnyDepth().filter(predicate)")) |
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.
If you deprecate functions without const String in the deprecations file, we'll lose it and forget to remove it later
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.
grammer still has condition
} | ||
shouldThrow<IllegalArgumentException> { | ||
df.select { single { true } } | ||
df.select { cols().filter { true }.single() } |
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.
should be tested with df.select { single() }
I believe
As we discussed, predicate makes compiler plugin support of these functions unreliable. Deprecation suggests to use filter, updates some examples to use nameStartsWith