test(spark): characterize partition transform resolution - #9323
Merged
robert3005 merged 1 commit intoAug 11, 2026
Merged
Conversation
resolveTransforms had no tests. Pin the directory keys it derives, the type guards on the temporal transforms, the bucket count and multi-column resolution, and the rejections for an unknown transform name, a missing numBuckets argument and a column outside the schema. Also cover the Java serialization round trip of ResolvedTransform, which is the reason the resolution happens eagerly on the driver: Spark's Transform objects are Scala case classes that cannot cross to executors. Signed-off-by: jackylee <qcsd2011@gmail.com>
robert3005
approved these changes
Aug 10, 2026
Merging this PR will degrade performance by 10.85%
Warning Please fix the performance issues or acknowledge them on CodSpeed. Performance Changes
Tip Investigate this regression by commenting Comparing Footnotes
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rationale for this change
resolveTransformsturns Spark partition transforms into the directory keys and column indices a writer uses, and had no tests. It is a pure static function, so the behaviour is cheap to pin.What changes are included in this PR?
Test only. Covers the directory keys derived for identity,
years/months/days/hoursandbucket; the type guards (temporal transforms reject a non-temporal column,hoursalso rejects a date); the bucket count and multi-column index resolution; and the rejections for an unknown transform name, a missingnumBucketsargument, a zero-reference transform and a column outside the schema.Also covers the Java serialization round trip of
ResolvedTransform— the reason resolution happens eagerly on the driver, since Spark'sTransformobjects cannot cross to executors.Verified non-vacuous: disabling the temporal type guard fails the guard cases.
./gradlew :vortex-spark_2.13:test --tests '…PartitionedVortexDataWriterTest'— 11 pass:vortex-spark_2.12:test— 11 passspotlessCheck(both variants) andjavadoc— cleanWhat APIs are changed? Are there any user-facing changes?
None.
AI assistance
Prepared with agentic AI assistance. I read the resolution code and its callers, confirmed each assertion against the current implementation, and verified the guard tests fail when the guard is removed.