-
Notifications
You must be signed in to change notification settings - Fork 2.5k
[CALCITE-7768] SqlDialect has no way to unparse a UUID literal #5250
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 all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -579,6 +579,15 @@ | |
| SqlNodeList hints, int leftPrec, int rightPrec) { | ||
| } | ||
|
|
||
| /** Converts a UUID literal to a SQL string. The default implementation | ||
| * returns strings such as | ||
| * <code>UUID '123e4567-e89b-12d3-a456-426655440000'</code>. A dialect whose | ||
| * product spells it differently should override this method. */ | ||
| public void unparseUuidLiteral(SqlWriter writer, | ||
| SqlUuidLiteral literal, int leftPrec, int rightPrec) { | ||
|
Check warning on line 587 in core/src/main/java/org/apache/calcite/sql/SqlDialect.java
|
||
| writer.literal(literal.toString()); | ||
|
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. Should this default implementation align with MySQL or PostgreSQL? Should we choose a generic approach, or simply throw an error?
Contributor
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. Im not aware of any real database that uses the Calcite syntax. So the default is kinda useless. But that is the Calcite syntax.
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. Could you add a test for this default Calcite method?
Contributor
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. There already is one I believe. Was there before me. |
||
| } | ||
|
|
||
| /** | ||
| * Returns whether the string contains any characters outside the | ||
| * comfortable 7-bit ASCII range (32 through 127, plus linefeed (10) and | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.