Skip to content
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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

koperagen
Copy link
Collaborator

Just a series of bug fixes and tests, no new fancy features

@koperagen koperagen added the Compiler plugin Anything related to the DataFrame Compiler Plugin label Nov 8, 2024
@koperagen koperagen added this to the 0.15.0 milestone Nov 8, 2024
@koperagen koperagen self-assigned this Nov 8, 2024
@@ -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("_"))
Copy link
Collaborator

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?

Copy link
Collaborator Author

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 {
Copy link
Collaborator

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)

Copy link
Collaborator Author

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

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

aah I see :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Compiler plugin Anything related to the DataFrame Compiler Plugin
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants