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

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.21.0
    • 1.22.0
    • 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

              amaliujia Rui Wang
              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