-
Notifications
You must be signed in to change notification settings - Fork 2k
[Spark] Throw exception when validation fails in ALTER COLUMN AFTER #5648
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
base: master
Are you sure you want to change the base?
Conversation
...k/src/test/scala/org/apache/spark/sql/delta/skipping/clustering/ClusteredTableDDLSuite.scala
Outdated
Show resolved
Hide resolved
rahulsmahadev
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the contribution, can you also update PR description to capture what we are doing
Done |
f7d16c3 to
3d20fa2
Compare
spark/src/main/scala/org/apache/spark/sql/delta/commands/alterDeltaTableCommands.scala
Outdated
Show resolved
Hide resolved
3d20fa2 to
20f17df
Compare
...k/src/test/scala/org/apache/spark/sql/delta/skipping/clustering/ClusteredTableDDLSuite.scala
Outdated
Show resolved
Hide resolved
zedtang
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
20f17df to
032f6a3
Compare
032f6a3 to
060f716
Compare
rahulsmahadev
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Which Delta project/connector is this regarding?
Description
This change series adds validation to ensure clustering columns remain in the statistics schema when executing
ALTER TABLE ALTER COLUMN col AFTER positioncommands on clustered Delta tables. Without proper stats schema handling, column reordering can cause clustering columns to lose statistics collection due to position-based indexing rules, degrading query optimization performance.How was this patch tested?
The test suite verifies the following scenarios:
checkEnabled=false (default):
checkEnabled=true:
DELTA_CLUSTERING_COLUMN_MISSING_STATSerrorDoes this PR introduce any user-facing changes?