Skip to content
Merged
Show file tree
Hide file tree
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
3 changes: 2 additions & 1 deletion docs/StardustDocs/d.tree
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@
<toc-element topic="schemasImportOpenApiGradle.md"/>
</toc-element>
</toc-element>
<toc-element topic="Compiler-Plugin.md">
<toc-element toc-title="Compiler Plugin">
<toc-element topic="Compiler-Plugin.md"/>
<toc-element topic="staticInterpretation.md"/>
<toc-element topic="dataSchema.md"/>
<toc-element topic="compilerPluginExamples.md"/>
Expand Down
66 changes: 57 additions & 9 deletions docs/StardustDocs/topics/Compiler-Plugin.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Kotlin DataFrame Compiler Plugin
# Setup And Overview

<web-summary>
Explore the Kotlin DataFrame Compiler Plugin —
Expand All @@ -16,7 +16,7 @@ a powerful tool providing on-the-fly type-safe column-accessors for dataframes.
</link-summary>


> Now available in Gradle projects, is coming soon to Kotlin Notebook and Maven projects.
> Now available in Gradle (IDEA 2025.2+) and Maven (IDEA 2025.3+) projects, is coming soon to Kotlin Notebook.
Copy link
Collaborator

Choose a reason for hiding this comment

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

and amper? :) maybe link to the YT issue so people can vote if they want it too


**Kotlin DataFrame Compiler Plugin** is a Kotlin compiler plugin that automatically generates
**[type-safe extension properties](extensionPropertiesApi.md)** for your dataframes,
Expand All @@ -34,11 +34,13 @@ Check out this video that shows how expressions update the schema of a dataframe

## Setup

Install [IntelliJ IDEA EAP](https://www.jetbrains.com/idea/nextversion/).
Going forward, compiler plugin updates will be released with Kotlin plugin updates.
Next release: 2025.2
We recommend using an up-to-date IntelliJ IDEA and Kotlin version for the best experience. Requires at least versions 2025.2 and 2.2.20, respectively.

Setup plugins in `build.gradle.kts`:
<tabs>

<tab title="Gradle">

Setup plugins in build.gradle.kts:

```kotlin
kotlin("jvm") version "%compilerPluginKotlinVersion%"
Expand All @@ -53,16 +55,62 @@ Setup library dependency:
implementation("org.jetbrains.kotlinx:dataframe:%dataFrameVersion%")
```

Add this line to `gradle.properties`:
Add this line to `gradle.properties`:
```properties
kotlin.incremental=false
```
`Sync` the project.

Sync the project.

Disabling incremental compilation will no longer be necessary
when https://youtrack.jetbrains.com/issue/KT-66735 is resolved.

</tab>

<tab title="Maven">

The DataFrame compiler plugin can be used in Maven projects starting from IntelliJ IDEA 2025.3, available now as EAP builds

Setup plugin in pom.xml:

```xml
<plugin>
<artifactId>kotlin-maven-plugin</artifactId>
<groupId>org.jetbrains.kotlin</groupId>
<version>%compilerPluginKotlinVersion%</version>

<configuration>
<compilerPlugins>
<plugin>kotlin-dataframe</plugin>
</compilerPlugins>
</configuration>

<dependencies>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-maven-dataframe</artifactId>
<version>%compilerPluginKotlinVersion%</version>
</dependency>
</dependencies>
</plugin>
```

Setup library dependency:

```xml
<dependency>
<groupId>org.jetbrains.kotlinx</groupId>
<artifactId>dataframe</artifactId>
<version>%dataFrameVersion%</version>
</dependency>
```

Sync the project.

</tab>

</tabs>

## Features overview

### Static interpretation of DataFrame API
Expand Down
2 changes: 1 addition & 1 deletion docs/StardustDocs/topics/compilerPluginExamples.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[//]: # (title: Compiler plugin examples)
[//]: # (title: Compiler Plugin Examples)

This page provides a few examples that you can copy directly to your project.
[Schema info](staticInterpretation.md#schema-info) will be a convenient way to observe the result of different operations.
Expand Down
2 changes: 1 addition & 1 deletion docs/StardustDocs/topics/dataSchema.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# @DataSchema declarations
# @DataSchema Declarations

`DataSchema` can be used as an argument for [cast](cast.md) and [convertTo](convertTo.md) functions.
It provides typed data access for raw dataframes you read from I/O sources and serves as a starting point for the compiler plugin to derive schema changes.
Expand Down
2 changes: 1 addition & 1 deletion docs/StardustDocs/topics/staticInterpretation.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Static interpretation of DataFrame API
# Static Interpretation of DataFrame API

Plugin evaluates dataframe operations, given compile-time known arguments such as constant String, resolved types, property access calls.
It updates the return type of the function call to provide properties that match column names and types.
Expand Down