[ 
https://issues.apache.org/jira/browse/CALCITE-7768?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jerome Isaac Haltom updated CALCITE-7768:
-----------------------------------------
          Component/s: core
    Affects Version/s: 1.42.0
                       1.41.0

> 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
>
> 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)

Reply via email to