Removed outdated samples from :core - #2120
AndreiKingsley wants to merge 3 commits into
Conversation
zaleslaw
left a comment
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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() } |
There was a problem hiding this comment.
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.
| ### Explainer dataframes | ||
|
|
||
| > Warning: this approach is outdated! Use [`SampleHelper` approach](../samples/README.md#samplehelper) instead! | ||
| > Cuurently [migrating](https://github.com/Kotlin/dataframe/issues/898). |
There was a problem hiding this comment.
*We're currently migrating
Helps #898.
Removed already migrated examples from
:core. This should help us to detect remaining samples for completing #898.