Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-3381

When generating SQL for BigQuery (via unparsing), convert Calcite SQL types to BigQuery types

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.21.0
    • Fix Version/s: 1.22.0
    • Component/s: core

      Description

      When using `SqlImplementor.SimpleContext#toSql` with BigQuerySqlDialect on Rel nodes containing `CAST` need to convert Calcite SqlTypeName to BigQuery supported types (https://cloud.google.com/bigquery/docs/reference/standard-sql/data-types).

      I believe this can be accomplished by Overriding BigQuerySqlDialect#getCastSpec method.

      Example: VARCHAR should become a STRING, BOOLEAN - BOOL, and so on.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                amaliujia Rui Wang
                Reporter:
                kirillkozlov Kirill Kozlov
              • Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

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