-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-44983][SQL] Convert binary to string by to_char for the formats: hex, base64, utf-8
#42632
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -157,6 +157,15 @@ private[sql] object QueryCompilationErrors extends QueryErrorsBase with Compilat | |
| "functionName" -> toSQLId("format_string"))) | ||
| } | ||
|
|
||
| def binaryFormatError(funcName: String, invalidFormat: String): Throwable = { | ||
| new AnalysisException( | ||
|
Contributor
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. My feeling is that, if the error is only thrown in one place, we don't need to add a method here, just
Member
Author
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. One of purposes of gathering exceptions to Don't think that this PR is right place to begin don't do that. |
||
| errorClass = "INVALID_PARAMETER_VALUE.BINARY_FORMAT", | ||
| messageParameters = Map( | ||
| "parameter" -> toSQLId("format"), | ||
| "functionName" -> toSQLId(funcName), | ||
| "invalidFormat" -> toSQLValue(invalidFormat, StringType))) | ||
| } | ||
|
|
||
| def unorderablePivotColError(pivotCol: Expression): Throwable = { | ||
| new AnalysisException( | ||
| errorClass = "INCOMPARABLE_PIVOT_COLUMN", | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is a bit weird, we can just write 2 lines
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't think it is the right approach to split semantically one operation: "assign names".