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)

Reply via email to