Skip to content

Provide extra pointers to operations with DataFrame type argument #321

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 2 commits into from
Mar 29, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion docs/StardustDocs/topics/adjustSchema.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@

[`DataFrame`](DataFrame.md) interface has type argument `T` that doesn't affect contents of [`DataFrame`](DataFrame.md),
but marks [`DataFrame`](DataFrame.md) with a type that represents data schema that this [`DataFrame`](DataFrame.md) is supposed to have.
This argument is used to generate [extension properties](extensionPropertiesApi.md) for typed data access.
This argument is used to generate [extension properties](extensionPropertiesApi.md) for typed data access.

Another place where this argument has a special role is in [interop with data classes](collectionsInterop.md#interop-with-data-classes):
* `List<T>` -> `DataFrame<T>`: [toDataFrame](createDataFrame.md#todataframe)
* `DataFrame<T>` -> `List<T>`: [toList](toList.md)

Actual data in [`DataFrame`](DataFrame.md) may diverge from compile-time schema marker `T` due to dynamic nature of data inside [`DataFrame`](DataFrame.md).
However, at some points of code you may know exactly what [`DataFrame`](DataFrame.md) schema is expected.
Expand Down