Skip to content

Conversation

Jolanrensen
Copy link
Collaborator

@Jolanrensen Jolanrensen commented Oct 16, 2025

Fixes #1502

and fixes the fact that
dataFrameOf(a, b, c) != dataFrameOf(a, c, b)
but this used to be
dataFrameOf(a, b, c).schema() == dataFrameOf(a, c, b).schema()

  • Replaced usages in the library of DataSchema.equals() with .compare() (This will also carefully need to be checked in the compiler plugin, though I think .compare() is already used there, which is good!)
  • Changed behavior of DataSchema.equals() to only return true if the order matches as well
    • (That allows us to write proper move {} tests in the compiler plugin! Because we can now check compileTimeSchema() == runTimeSchema() and the order is checked too)
  • To avoid confusion with the name, I deprecated CompareResult.Equals with Matches. Usages in the library are updated, but this will also need to be updated in the compiler plugin.
    • (This opens the future opportunity to reintroduce CompareResult.Equals as "equals exactly with order")

…if the order matches too. Adapted `hashCode()` (this also changes behavior of `ColumnSchema.Group` and `.Frame`, but that's good!)
@Jolanrensen Jolanrensen added this to the 1.0.0-Beta4 milestone Oct 16, 2025
@Jolanrensen Jolanrensen added bug Something isn't working enhancement New feature or request tests Something related to the JUnit tests, integration tests or testing infrastructure Compiler plugin Anything related to the DataFrame Compiler Plugin labels Oct 16, 2025
@Jolanrensen Jolanrensen merged commit 0f494ca into master Oct 16, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working Compiler plugin Anything related to the DataFrame Compiler Plugin enhancement New feature or request tests Something related to the JUnit tests, integration tests or testing infrastructure

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Missing function to compare DataFrameSchemas with order

2 participants