Skip to content

[Compiler plugin] Generate ColumnName annotations on frontend for all names that contain illegal characters #913

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

Merged
merged 3 commits into from
Oct 11, 2024

Conversation

koperagen
Copy link
Collaborator

Now whenever column has name with illegal characters, they get replaced as in jupyter and ColumnName annotation is generated for the

The way ColumnName is used:

  1. When extracting schemas. PluginDataFrameSchema always contains actual names.
  2. When generating getter of extension property.

@koperagen koperagen added the Compiler plugin Anything related to the DataFrame Compiler Plugin label Oct 9, 2024
@koperagen koperagen added this to the 0.15.0 milestone Oct 9, 2024
@koperagen koperagen self-assigned this Oct 9, 2024
@koperagen koperagen requested a review from Jolanrensen October 9, 2024 15:04
import org.jetbrains.kotlinx.dataframe.api.*
import org.jetbrains.kotlinx.dataframe.io.*

fun box(): String {
Copy link
Collaborator

Choose a reason for hiding this comment

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

this is just so you don't have to create this file every time you need to quickly test something? ;P

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 indeed :) You need to create a file and run generateTests, it will modify BlackBoxTestsGenerated and you'd also need to rollback it if it was only a temporary test. Very inconvenient :c

val override: Boolean = false
)

data class PropertyName(val identifier: Name, val columnNameAnnotation: FirAnnotation?) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

might deserve its own file? Makes it easier to find, especially since it's used very often

Copy link
Collaborator Author

@koperagen koperagen Oct 11, 2024

Choose a reason for hiding this comment

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

Moved it under extensions.impl package and its own file

… names that contain illegal characters

The way ColumnName is used:
1. When extracting schemas. PluginDataFrameSchema always contains actual names, and it's responsibility of the plugin to generate valid property name
2. When generating getter of extension property.
@koperagen koperagen merged commit b3b1f64 into master Oct 11, 2024
3 checks passed
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.

2 participants