Skip to content

Removed outdated samples from :core - #2120

Open
AndreiKingsley wants to merge 3 commits into
masterfrom
rm_outdated_samples
Open

AndreiKingsley wants to merge 3 commits into
masterfrom
rm_outdated_samples

Conversation

@AndreiKingsley

Copy link
Copy Markdown
Collaborator

Helps #898.

Removed already migrated examples from :core. This should help us to detect remaining samples for completing #898.

@zaleslaw
zaleslaw self-requested a review October 1, 2026 13:07

@zaleslaw zaleslaw left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

core/README.md (L48-50) and docs/README.md (L50-52) still link to the deleted OtherSamples.kt and describe it as the way to generate standalone samples. Please drop that paragraph or point it at :samples / DataFrameSampleHelper.

Minor: with createDataFrameWithRandom gone, DataFrameBuilder.randomDouble has no test at all, and randomFloat/randomLong/randomBoolean never had one. Worth a follow-up issue.

@jetbrains-air jetbrains-air Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nice cleanup — approving, with one non-blocking note inline.


Produced by Air Automations. Name: AI Review / Run: https://air.jetbrains.cloud/org/05cf1a7f-6ab5-713b-abd3-29d0c8a05e2d/automations/8daf2412-0b6c-4433-90c0-b40ab5aebcdb?run=ffcfa17c-9244-4cdf-9d0a-717369897bb5

df.min { colsOf<Int>() }
df.max { name.firstName and name.lastName }
df.sum { age and weight }
df.mean { cols(1, 3).asNumbers() }

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Problem: these deleted samples were the last place in the repo that called asNumbers() / asComparable(). After this PR both have zero usages outside core/src/main (checked repo-wide, including :samples and the plugin consistency tests) — 10 public overloads with no compiled caller.

Failure scenario: the ColumnSet/SingleColumn variants are bare unchecked casts (this as ColumnSet<Number>). A future change to the selection/statistics path can break df.mean { cols(1, 3).asNumbers() } or df.maxFor { "name"["firstName"].asComparable() } while still compiling; nothing in CI exercises them, so it surfaces as a ClassCastException for users of the string API.

Suggested fix: before dropping these, port the two lines into the migrated stats samples in :samples, or add a small test next to core/src/test/.../api/convert.kt asserting one aggregation through each.

Comment thread docs/README.md
### Explainer dataframes

> Warning: this approach is outdated! Use [`SampleHelper` approach](../samples/README.md#samplehelper) instead!
> Cuurently [migrating](https://github.com/Kotlin/dataframe/issues/898).

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Cuurently

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

*We're currently migrating

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants