-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-47307][SQL] Add a config to optionally chunk base64 strings #47303
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
09d1499
move to RFC4648
1305879
remove others
54ea063
do decoders too
6f1ace9
add test
dfca282
fix upstream
7226206
mime to decode
f685701
scala array
cc790c0
make it configurable
47922c8
fix the codegen
0c8593f
reorg
0b947c8
try that
64a7400
do chunk if outside codegen
e1cd658
comments
fc48cc3
do that
d4504c4
to gcp
7423512
fix
wForget 9a4d785
test
wForget 127e5b8
add chunk encode test
wForget b179d49
address comments
wForget 0848e01
revert codegen
wForget 55c1a1f
Update sql/catalyst/src/main/scala/org/apache/spark/sql/internal/SQLC…
yaooqinn 36ed6aa
replacement StaticInvoke
wForget fcb432d
regenerate golden files
wForget 101409f
fix conf name
wForget 5aedf3a
comments
wForget be2a46a
Update sql/catalyst/src/main/scala/org/apache/spark/sql/internal/SQLC…
yaooqinn File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
connect/common/src/test/resources/query-tests/explain-results/function_base64.explain
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,2 @@ | ||
| Project [base64(cast(g#0 as binary)) AS base64(CAST(g AS BINARY))#0] | ||
| Project [static_invoke(Base64.encode(cast(g#0 as binary), false)) AS base64(CAST(g AS BINARY))#0] | ||
| +- LocalRelation <empty>, [id#0L, a#0, b#0, d#0, e#0, f#0, g#0] | ||
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3525,6 +3525,15 @@ object SQLConf { | |
| .booleanConf | ||
| .createWithDefault(false) | ||
|
|
||
| val CHUNK_BASE64_STRING_ENABLED = buildConf("spark.sql.legacy.chunkBase64String.enabled") | ||
| .internal() | ||
| .doc("Whether to truncate string generated by the `Base64` function. When true, base64" + | ||
| " strings generated by the base64 function are chunked into lines of at most 76" + | ||
| " characters. When false, the base64 strings are not chunked.") | ||
| .version("3.5.2") | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm going to pick this to 3.5.2 |
||
| .booleanConf | ||
| .createWithDefault(false) | ||
|
|
||
| val ENABLE_DEFAULT_COLUMNS = | ||
| buildConf("spark.sql.defaultColumn.enabled") | ||
| .internal() | ||
|
|
@@ -5856,6 +5865,8 @@ class SQLConf extends Serializable with Logging with SqlApiConf { | |
|
|
||
| def ansiRelationPrecedence: Boolean = ansiEnabled && getConf(ANSI_RELATION_PRECEDENCE) | ||
|
|
||
| def chunkBase64StringEnabled: Boolean = getConf(CHUNK_BASE64_STRING_ENABLED) | ||
|
|
||
| def timestampType: AtomicType = getConf(TIMESTAMP_TYPE) match { | ||
| case "TIMESTAMP_LTZ" => | ||
| // For historical reason, the TimestampType maps to TIMESTAMP WITH LOCAL TIME ZONE | ||
|
|
||
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
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.
Uh oh!
There was an error while loading. Please reload this page.