[GLUTEN-11570][VL] Wire spark.sql.binaryOutputStyle to Velox to_pretty_string#12324
Open
n0r0shi wants to merge 1 commit into
Open
[GLUTEN-11570][VL] Wire spark.sql.binaryOutputStyle to Velox to_pretty_string#12324n0r0shi wants to merge 1 commit into
n0r0shi wants to merge 1 commit into
Conversation
…y_string Spark 4.0+ introduced spark.sql.binaryOutputStyle to control how binary values are rendered. The Velox-side support landed in facebookincubator/velox#17884 (binary_output_style config + 5 styles). This change wires the Spark config through to Velox so to_pretty_string honors HEX_DISCRETE (default), HEX, BASE64, UTF-8, and BASIC. - Add kSparkBinaryOutputStyle constant. - Forward it via setIfExists in WholeStageResultIterator. - Expand GlutenDataFrameSuite.getRows: binary in spark40 and spark41 to cover all 5 styles, mirroring the upstream Spark test. Fixes apache#11570
51923dc to
0d20d77
Compare
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 were proposed in this pull request?
Spark 4.0+ introduced
spark.sql.binaryOutputStyleto control how binary values are rendered. Velox'sto_pretty_stringpreviously only supported the defaultHEX_DISCRETEstyle. This change wires the Spark config through Gluten to Velox so all 5 styles (HEX_DISCRETE,HEX,BASE64,UTF-8,BASIC) are honored.kSparkBinaryOutputStyle = "spark.sql.binaryOutputStyle"constant.setIfExistsinWholeStageResultIterator, mapping toVelox's
SparkQueryConfig::kBinaryOutputStyle(binary_output_style).GlutenDataFrameSuite.getRows: binaryin spark40 and spark41 tocover all 5 styles, mirroring the upstream Spark
DataFrameSuitetest.Depends on
Velox PR: facebookincubator/velox#17884
(adds
SparkQueryConfig::kBinaryOutputStyle+ 5 styles inToPrettyStringVarbinaryFunction).Once that lands, this PR's behavior fully kicks in. With only this Gluten PR (and the Velox PR not yet merged), the existing
HEX_DISCRETEbehavior is preserved, butHEX/BASE64/UTF-8/BASICwill not take effect.How was this patch tested?
GlutenDataFrameSuite.getRows: binaryin spark40 and spark41; this test covers all 5 styles usingwithSQLConf(SQLConf.BINARY_OUTPUT_STYLE.key -> ...), mirroring the upstream SparkDataFrameSuite.getRows: binarytest.Fixes #11570