feat(velox): Route Concat expression through Velox backend#12099
Open
minni31 wants to merge 1 commit into
Open
feat(velox): Route Concat expression through Velox backend#12099minni31 wants to merge 1 commit into
minni31 wants to merge 1 commit into
Conversation
Add explicit Concat expression routing from Spark to Velox with proper type checking and edge case handling: - StringType and BinaryType: offloaded to Velox (null-in-null-out semantics match Spark) - ArrayType: falls back to Spark (Velox returns NULL if ANY input is NULL, but Spark 3.4+ skips NULL arrays per SPARK-41296) - Zero arguments: falls back to Spark (Velox requires at least 1 arg) - Single argument: returns the child directly (identity optimization, Velox requires at least 2 args for concat) Changes: - SparkPlanExecApi: add genConcatTransformer with default implementation - ExpressionConverter: add explicit case for Concat routing - VeloxSparkPlanExecApi: override with type checks and edge case handling - VeloxStringFunctionsSuite: add tests for null handling, single-arg, zero-arg fallback, ArrayType fallback, and BinaryType support Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
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.
Context
Spark's
Concatexpression supportsStringType,BinaryType, andArrayTypeinputs. Currently in Gluten,Concatfalls through the generic expression transformer without any type-specific handling. This PR adds explicit routing with proper edge case handling for the Velox backend.What
Add
genConcatTransformertoSparkPlanExecApiand override it inVeloxSparkPlanExecApiwith:concatusesdefaultNullBehavior=true(returns NULL when any input is NULL), matching Spark's null-in-null-out semantics.Changes
SparkPlanExecApi.scala: AddgenConcatTransformerwith defaultGenericExpressionTransformerimplementationExpressionConverter.scala: Add explicitcase c: Concat =>routing to backend APIVeloxSparkPlanExecApi.scala: Override with type checks and edge case handlingVeloxStringFunctionsSuite.scala: Enhanced tests for null handling, single-arg identity, zero-arg fallback, ArrayType fallback, and BinaryType support