[
https://issues.apache.org/jira/browse/CALCITE-7768?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
ASF GitHub Bot updated CALCITE-7768:
------------------------------------
Labels: pull-request-available (was: )
> SqlDialect has no way to unparse a UUID literal
> -----------------------------------------------
>
> Key: CALCITE-7768
> URL: https://issues.apache.org/jira/browse/CALCITE-7768
> Project: Calcite
> Issue Type: Bug
> Components: core
> Affects Versions: 1.41.0, 1.42.0
> Reporter: Jerome Isaac Haltom
> Priority: Major
> Labels: pull-request-available
>
> SqlUuidLiteral.unparse writes UUID '...' without consulting the dialect.
> Char, interval and datetime literals each have their own unparse hook on
> SqlDialect. UUID has none, and no dialect mentions UUID.
> Pushed down to SQL Server that gives:
> {code:sql}
> WHERE [C_GUID] = UUID '3f2504e0-4f89-11d3-9a0c-0305e82c3301'
> {code}
> Incorrect syntax near '3f2504e0-4f89-11d3-9a0c-0305e82c3301'. It wants a
> plain quoted string. Probably fails on most other servers too.
> Started in 1.41.0. Before CALCITE-7128 a UUID literal threw an AssertionError
> in SqlImplementor.toSql, so it failed at plan time instead.
> A SqlDialect.unparseUuidLiteral, shaped like unparseSqlIntervalLiteral, would
> fix it.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)