Skip to content

test(spark): characterize VortexTable capabilities and builders - #9160

Merged
robert3005 merged 1 commit into
vortex-data:developfrom
jackylee-ch:spark-vortex-table-tests
Aug 4, 2026
Merged

robert3005 merged 1 commit into
vortex-data:developfrom
jackylee-ch:spark-vortex-table-tests

Conversation

@jackylee-ch

Copy link
Copy Markdown
Contributor

VortexTable had no unit tests. This pins the table-level contract Spark relies on, in the same style as the recent VortexBatchExec and HadoopUtils characterization tests.

Covered:

  • the exact capability set (BATCH_READ, BATCH_WRITE, TRUNCATE)
  • how name() renders from the table paths, for one path and several
  • schema() and partitioning() round-tripping unchanged
  • newScanBuilder starting from the full table schema, and the scan description carrying every path
  • the write-path guard: writes target a single output path, so newWriteBuilder goes through Iterables.getOnlyElement and rejects a table built from several paths (IllegalArgumentException) or none (NoSuchElementException)

Pure JVM unit tests, no SparkSession and no filesystem access.

Tests

  • ./gradlew :vortex-spark_2.13:test --tests 'dev.vortex.spark.VortexTableTest' — 8/8 pass
  • ./gradlew :vortex-spark_2.12:test --tests 'dev.vortex.spark.VortexTableTest' — 8/8 pass
  • ./gradlew :vortex-spark_2.13:spotlessCheck — clean
  • ./gradlew javadoc — clean

VortexTable had no unit tests. Pin the table-level contract Spark relies
on: the exact capability set, how the name is rendered from the table
paths, that schema and partitioning round-trip unchanged, and that the
scan builder starts from the full table schema.

Also cover the write-path guard. Writes target a single output path, so
newWriteBuilder goes through Iterables.getOnlyElement and rejects tables
built from several paths, or none.

Signed-off-by: jackylee <qcsd2011@gmail.com>
@robert3005
robert3005 enabled auto-merge (squash) August 4, 2026 10:02
robert3005
robert3005 approved these changes Aug 4, 2026 •
@robert3005 robert3005 added the changelog/chore A trivial change label Aug 4, 2026
@robert3005
robert3005 merged commit 135d055 into vortex-data:develop Aug 4, 2026
84 of 85 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog/chore A trivial change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants