-
Notifications
You must be signed in to change notification settings - Fork 66
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 #729
Compiler plugin #729
Conversation
this type of tests should replace most of the previous API tests that required copy-paste from codegen
… calling it too early
…only for private api Initializing non-private property with transformed DataFrame call leads to "exposes local type" error
# Conflicts: # core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/api/and.kt # core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/api/toDataFrame.kt
…llback to an empty list
@@ -18,7 +19,7 @@ import kotlin.reflect.KType | |||
* | |||
* @param T type of values contained in column. | |||
*/ | |||
public interface BaseColumn<out T> : ColumnReference<T> { | |||
public interface BaseColumn<out T> : ColumnReference<T>, GenericColumn { |
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.
@koperagen GenericColumn
?
It's fine to have the interface as its supertype to just get the name of a column, but it lives in ./impl/api/insert.kt which breaks our structure. Probably best to move GenericColumn(Group)
to ./columns
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.
Ah I see it's mentioned in the comment! thanks
|
||
data class SimpleFrameColumn( | ||
override val name: String, | ||
private val columns: List<SimpleCol> |
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 SimpleColumnGroup is a List<SimpleColumn>
, then SimpleFrameColumn should be a List<List<SimpleColumn>
> or a List<ColumnGroup>
right?
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.
Ah no I see, it treats it like that because it tries to generalize the schema's, interesting
import kotlin.reflect.KTypeProjection | ||
import kotlin.reflect.KVariance | ||
|
||
val KotlinTypeFacade.toPluginDataFrameSchema: DataFrameSchema.() -> PluginDataFrameSchema |
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! very useful :)
name, | ||
columnSchema.schema.toPluginDataFrameSchema().columns() | ||
) | ||
else -> TODO() |
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 throw a NotImplementedError
manually to not clog up the TODO scope
There are changes in core module itself to be aware of:
Compiler plugin module consists of three main parts:
Everything related to compiler plugins aimed at K2 compiler
#704