-
Notifications
You must be signed in to change notification settings - Fork 63
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
Compiler plugin read improvements #949
base: master
Are you sure you want to change the base?
Conversation
@@ -14,7 +14,7 @@ import org.jetbrains.kotlinx.dataframe.plugin.impl.toPluginDataFrameSchema | |||
class FlattenDefault : AbstractSchemaModificationInterpreter() { | |||
val Arguments.receiver by dataFrame() | |||
val Arguments.keepParentNameForColumns: Boolean by arg(defaultValue = Present(false)) | |||
val Arguments.separator: String by arg(defaultValue = Present(".")) | |||
val Arguments.separator: String by arg(defaultValue = Present("_")) |
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.
is this reflects our new convention about separator in column names?
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.
Yes :)
} | ||
|
||
private fun resolveFile(resolutionPath: String?, path: String): File? { | ||
return resolutionPath?.let { | ||
private fun tryResolveFile(resolutionPath: String?, path: String): DataSource { |
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.
isn't this duplicate logic to in the :core module? (or it probably should be)
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.
No, it's plugin-specific. It's to handle relative path arguments like read("file.csv") when project configuration provides resolutionPath - directory where relative files are expected to be
Usual DataFrame.read implicitly relies on working directory of JVM to resolve relative files, which for compiler process is somewhere outside project directory
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.
aah I see :)
Just a series of bug fixes and tests, no new fancy features