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

Support for TRIM function in Bigquery dialect

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.22.0
    • Component/s: core
    • Labels:
      None

      Description

      In current Calcite implementation for query : SELECT TRIM('ABC') forĀ  big-query Dialect it translated into SELECT TRIM(BOTH ' ' FROM 'ABC') .
      But the appropriate query for BigQuery is :: SELECT TRIM('ABC')
      Similarly below query
      SELECT TRIM(BOTH 'a' from 'ABC')
      SELECT TRIM(LEADING ' ' from 'ABC')
      SELECT TRIM(TRAILING ' ' from 'ABC') are translated into invalid BigQuery query.

      Unparse logic for the trim has been handle in BigQuery dialect to convert the source Trim query into valid bigQuery query.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                dhirenda.gautam Dhirenda Gautam
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: