Skip to content

[SPARK-59443][SQL] Reduce allocations in ArrowColumnVector decimal reads - #58748

Open
xiaoh1024 wants to merge 1 commit into
apache:masterfrom
xiaoh1024:exp/spark-arrow-decimal
Open

[SPARK-59443][SQL] Reduce allocations in ArrowColumnVector decimal reads#58748
xiaoh1024 wants to merge 1 commit into
apache:masterfrom
xiaoh1024:exp/spark-arrow-decimal

Conversation

@xiaoh1024

Copy link
Copy Markdown

What changes were proposed in this pull request?

Add a small-decimal accessor for Arrow columns with source precision 1-18,
with full-width fallback and existing Spark decimal conversion semantics.
Add regression tests and an Arrow decimal read benchmark.

Why are the changes needed?

See SPARK-59443.

Does this PR introduce any user-facing change?

No.

How was this patch tested?

  • build/sbt catalyst/compile sql/Test/compile
  • build/sbt "sql/testOnly org.apache.spark.sql.vectorized.ArrowColumnVectorSuite"
    (28 tests passed, including 8 new decimal tests).
  • The same suite passed all 28 tests on a big-endian s390x Temurin 17 JVM
    under QEMU, including a native Arrow Decimal128 layout check.
  • Checkstyle for the changed Java file and Scalastyle for both Scala files.
  • Local ArrowDecimalReadBenchmark and allocation comparisons against the
    original accessor.
  • ArrowDecimalReadBenchmark on GitHub Actions
    passed with JDK 17 and Scala 2.13.
  • Fork Build CI passed.

Was this patch authored or co-authored using generative AI tooling?

AI assistance was used for implementation, tests, and local validation.

Generated-by: Codex CLI 0.154.0

Read native Decimal128 words for source precision 1-18 while preserving full-width fallback and Spark decimal conversion semantics. Add decimal regression coverage and a read benchmark.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant