-
Notifications
You must be signed in to change notification settings - Fork 71
[Compiler plugin] join operations support #1139
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
ee9ea15
to
2a17323
Compare
2a17323
to
bccd01e
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.
nice :)
// This checks that schemas have same set of columns, but compile time columns can be nullable where runtime is narrowed to non-nullable | ||
|
||
sealed interface Mismatch | ||
data class AcceptableMismatch(val path: ColumnPath, val compile: KType, val runtime: KType) : Mismatch |
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.
Probably the nullability fact could be somehow reflected in naming, like NullabilityMismatch or something like this
"Charlie", 30, "Moscow", 90, | ||
) | ||
|
||
val typed2 = dataFrameOf("name", "origin", "grade", "age")( |
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.
Probably we need here one test for nested tables and their joins
|
||
internal data class ColumnMatchApproximation(val left: ColumnsResolver, val right: ColumnsResolver) | ||
internal data class ColumnMatchApproximation( |
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.
Could you give me a hint, what does Approximation mean. I see a lot in naming, but could not understand the idea
} | ||
|
||
internal class ColumnListImpl<C>(override val columns: List<ColumnsResolver<C>>) : | ||
ColumnSet<C>, |
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.
wow, formatting looks weird to me
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.
Unfortunately this is the only way the linter allows it
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.
The implementation is clear for me, but I'm not sure that all required test paths are covered, could you please answer
In first commit i adapted
ColumnMatch
andColumnList
to embed them into compiler plugin column resolving mechanismNew util functions designed to make sure all column names generated by compiler plugin in join are exactly as in runtime, and make sure there are no missing columns. They can however sometimes have nullability where runtime narrows the type to non-nullable