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

need a better error message

    XMLWordPrintableJSON

Details

    Description

      We need a better error message, our current error message does not make any sense. The issue is that we define the window in the outer query and try to use in the inner sub query. We need to report to user that the window "windw" does not exist.

      Error reported by Drill

      0: jdbc:drill:schema=dfs.tmp> select col1 , col2 , lead(col2) OVER windw FROM (SELECT col0 , col1 , col2, col7 , ntile(3) over windw from FEWRWSPQQ_101) sub_query WINDOW windw as (PARTITION BY col7 ORDER BY col0) ;
      Error: PARSE ERROR: From line 2147483647, column 2147483647 to line -1, column -1: Table 'FEWRWSPQQ_101' not found
      
      
      [Error Id: 176f1284-04cb-4718-a582-b10c9a690e95 on centos-02.qa.lab:31010] (state=,code=0)
      

      Error reported by Postgres for same query and data

      postgres=# select col1 , col2 , lead(col2) OVER windw FROM (SELECT col0 , col1 , col2, col7 , ntile(3) over windw from FEWRWSPQQ_101) sub_query WINDOW windw as (PARTITION BY col7 ORDER BY col0) ;
      ERROR:  window "windw" does not exist
      LINE 1: ... (SELECT col0 , col1 , col2, col7 , ntile(3) over windw from...
                                                                                                 ^
      

      Attachments

        Activity

          People

            adeneche Abdel Hakim Deneche
            khfaraaz Khurram Faraaz
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: