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

null comparison behavior difference between drill and postgres

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Critical
    • Resolution: Unresolved
    • None
    • Future
    • Execution - Data Types
    • None

    Description

      It appears postgres returns null for the following comparison:

      foodmart=# select null=1;
       ?column?
      ----------
      
      (1 row)
      
      foodmart=# select null <> 1;
       ?column?
      ----------
      
      (1 row)
      
      foodmart=# select null;
       ?column?
      ----------
      
      (1 row)
      

      Drill gives sqlValidatorException:

      0: jdbc:drill:schema=dfs.drillTestDirComplexJ> select null=1 from sys.drillbits;
      Query failed: SqlValidatorException: Cannot apply '=' to arguments of type '<NULL> = <INTEGER>'. Supported form(s): '<COMPARABLE_TYPE> = <COMPARABLE_TYPE>'
      
      Error: exception while executing query: Failure while executing query. (state=,code=0)
      

      Attachments

        Activity

          People

            parthc Parth Chandra
            cchang@maprtech.com Chun Chang
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: