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

JDBC adapter should not generate FILTER (WHERE) in MySQL and StarRocks dialect

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 1.37.0
    • None

    Description

      mysql> select sum(x) filter (where x = 1) from t;
      ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(where x = 1) from t' at line 1 

      See details in https://modern-sql.com/feature/filter

      Calcite should not generate the agg() FILTER clause for the MySQL dialect. CALCITE-4321 introduced a way to convert the FILTER clause to an aggregation function with CASE.

      Attachments

        Issue Links

          Activity

            People

              hongyuguo hongyu guo
              hongyuguo hongyu guo
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: