Uploaded image for project: 'Apache Drill'
  1. Apache Drill
  2. DRILL-5620

aggregate FILTER pushing invalid SQL to vendors that do not support it.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 1.10.0
    • None
    • SQL Parser
    • None
    • Drill 1.10

    Description

      Calcite's parser documentation indicates that it has provided for aggregate(<exp>) FILTER.

      This construct is not supported by many vendors, hence it such a statement is expressed to Drill against a plugin mapped to JDBC it may fail due to the statement being push down (i.e. to ORACLE). But the operation will parse/execute when performed locally on dfs etc

      select count( CINT ) filter ( where RNUM > -1) from x.y.z
      DATA_READ ERROR: The JDBC storage plugin failed while trying setup the SQL query

      Looks like it tries to emit SELECT "CINT", "RNUM" > -1 "$f1" FROM X"."Y"

      https://calcite.apache.org/docs/reference.html

      Attachments

        Activity

          People

            Unassigned Unassigned
            the6campbells N Campbell
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: