Uploaded image for project: 'Beam'
  1. Beam
  2. BEAM-9191

CAST does not work in some cases due to bugs in Calcite unparsing

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Open
    • Priority: P3
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: dsl-sql-zetasql
    • Labels:

      Description

      For example:

      "CAST(xxx AS TIMESTAMP)" is unparsed to "CAST(xxx AS TIMESTAMP(0))"

      The fix is already in the newest version of BigQuerySqlDialect.java in Calcite (using SqlAlienSystemTypeNameSpec), so this issue will be fixed after we update our vendored Calcite version.

      I tried to patch the change to BeamBigQuerySqlDialect.java (similar to what we did for other features) but this change is very large (multiple new classes) to patch.

      cc: Andrew Pilloud

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                robinyqiu Robin Qiu
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 0.5h
                  0.5h