[VL] Add Spark 4.1 TimeType support#12065
Open
malinjawi wants to merge 1 commit into
Open
Conversation
|
Run Gluten Clickhouse CI on x86 |
Map Substrait TIME to Velox TIME_MICRO_UTC and add time literal support. Convert Spark TimeType nanos to Substrait/Velox micros for literals and convert Velox micros back to Spark UnsafeRow nanos in columnar-to-row.
675f551 to
7a061ac
Compare
|
Run Gluten Clickhouse CI on x86 |
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.
What changes are proposed in this pull request?
This PR adds native Spark 4.1 TIME data type support in the Velox backend by mapping Substrait TIME to Velox TIME_MICRO_UTC and handling TIME literals end to end.
The change:
Why are the changes needed?
#11919 tracks Spark 4.1 TimeType support for the Velox backend. Spark 4.1 adds TimeType to DataTypeTestUtils.atomicTypes, so tests and planning paths that enumerate atomic types can hit TIME even when Gluten/Velox cannot yet parse or execute it. Mapping Substrait TIME to Velox TIME_MICRO_UTC gives Gluten a native representation for supported Spark TIME precision and unblocks literal/planning paths.
Does this PR introduce any user-facing change?
No public API change. It extends native Spark 4.1 TIME support in the Velox backend.
How was this patch tested?
Built and ran locally:
Commands:
git diff --cached --checkmvn -Pbackends-velox,spark-4.1,scala-2.13,java-21 -pl backends-velox -am -DskipTests -Dcheckstyle.skip -Dspotless.check.skip compile./dev/run-scala-test.sh --force -Pjava-21,spark-4.1,scala-2.13,backends-velox,hadoop-3.4,spark-ut,delta -pl backends-velox -s org.apache.gluten.execution.VeloxLiteralSuite -t "Time Literal" -Dscalastyle.skip=true -Dcheckstyle.skip -Dspotless.check.skipcmake --build cpp/build --target velox -j 4Native C++ unit-test targets were not run locally because this checkout does not have the Velox vector test utility archive built (
libvelox_vector_test_lib.a).Performance
I ran targeted local benchmarks comparing clean upstream main against this patch.
Focused columnar-to-row benchmark:
The TIME_MICRO_UTC delta is expected because this patch adds the required micros-to-nanos normalization for Spark UnsafeRow compatibility; the baseline treated TIME as a raw BIGINT-like value.
Broad generic_q5 smoke benchmark:
Related issue: #11919
Tracked by #11910
Was this patch authored or co-authored using generative AI tooling?
Generated-by: IBM BOB