You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Jerome Isaac Haltom (Jira)" <ji...@apache.org> on 2026/09/08 00:06:00 UTC

[jira] [Created] (CALCITE-7768) SqlDialect has no way to unparse a UUID literal

Jerome Isaac Haltom created CALCITE-7768:
--------------------------------------------

             Summary: 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
            Reporter: Jerome Isaac Haltom


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)