Added troubleshooting guide for Data Schemas and Extension Properties#1870
Added troubleshooting guide for Data Schemas and Extension Properties#1870AndreiKingsley wants to merge 2 commits into
Conversation
| ``` | ||
|
|
||
| This means there is a runtime error while accessing a [`DataFrame` extension property](extensionPropertiesApi.md), | ||
| generated by the [Compiler Plugin](Compiler-Plugin.md) or in the [Kotlin Notebook](SetupKotlinNotebook.md). |
There was a problem hiding this comment.
*in Kotlin Notebook (the name of the product), or *in a (Kotlin) notebook (the concept)
| This means there is a runtime error while accessing a [`DataFrame` extension property](extensionPropertiesApi.md), | ||
| generated by the [Compiler Plugin](Compiler-Plugin.md) or in the [Kotlin Notebook](SetupKotlinNotebook.md). | ||
|
|
||
| Such errors are caused by generating extension properties for data schemas that are not compatible with the |
There was a problem hiding this comment.
maybe "mismatch" is a better fit here
|
|
||
| Such errors are caused by generating extension properties for data schemas that are not compatible with the | ||
| [`DataFrame`](DataFrame.md), [`DataRow`](DataRow.md), etc. | ||
| In most cases, the schema contains columns of the wrong names or types. |
There was a problem hiding this comment.
columns with an incorrect name or type
|
|
||
| ### Incompatible manually defined data schema | ||
|
|
||
| If you define initad data schema manually, |
| ### Incompatible manually defined data schema | ||
|
|
||
| If you define initad data schema manually, | ||
| make sure your data schema is compatible with the [`DataFrame`](DataFrame.md). |
There was a problem hiding this comment.
I think the concept "the dataframe" is better here
There was a problem hiding this comment.
and you're describing just a solution here, not the reason it fails. I'd make a clear distinction for first the reason it fails and then second how to solve it
| > Such cases are most probably bugs! Please report them on [GitHub Issues](https://github.com/Kotlin/dataframe/issues). | ||
| {style="warning"} | ||
|
|
||
| Possible workarounds: |
There was a problem hiding this comment.
here it's better :) first you describe the problem/cause and then the workaround
|
|
||
| Possible workarounds: | ||
|
|
||
| * Specify the correct type using [`.replace {}`](replace.md) and `ValueColumn.changeType()`: |
There was a problem hiding this comment.
may be important to mention the two different ways a column can have a "type". There's the internal KType, used by runtime functions, and there's the compile-time type, visible in the IDE, which is also sometimes used in runtime when you refer to a column in an inline reified function, but usually it's visual only
There was a problem hiding this comment.
oh and this workaround only works if you're working with a value column, obviously ;P
| #### Problems with type affinity in SQLite | ||
|
|
||
| Because of [SQLite type affinity](https://sqlite.org/datatype3.html), | ||
| the column typed defined by JDBC may differ from the actual values in the column. |
There was a problem hiding this comment.
can you link to JDBC docs?
|
|
||
| You can provide types for such columns manually: | ||
|
|
||
| ```Kotlin |
|
|
||
| * Specify the correct type using [`.replace {}`](replace.md) and `ValueColumn.changeType()`: | ||
|
|
||
| ```kotlin |
Helps #1742.
This is a new page for the referencing from EP errors.