You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@calcite.apache.org by "Mihai Budiu (Jira)" <ji...@apache.org> on 2024/11/27 19:57:00 UTC

[jira] [Created] (CALCITE-6708) SqlNode.toString can throw

Mihai Budiu created CALCITE-6708:
------------------------------------

             Summary: SqlNode.toString can throw
                 Key: CALCITE-6708
                 URL: https://issues.apache.org/jira/browse/CALCITE-6708
             Project: Calcite
          Issue Type: Bug
          Components: core
    Affects Versions: 1.38.0
            Reporter: Mihai Budiu


Currently SqlNode.toString() calls toSqlString, which can throw if the SQL is incorrect.
This makes toString less useful for debugging and logging.

For example, the query `SELECT TRIM()` is parsed but cannot be converted back to a String, because SqlTrimFunction.unparse attempts to access a null operand.
I am not sure this can be fixed easily.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)