1 Reply Latest reply on Jan 19, 2017 9:18 PM by thatJeffSmith-Oracle

    SQL Developer bug when connecting to Hive



      Not sure how to report this, but I've discovered the following bug using SQL Developer 4.2 when connected to Hive.  It is also present on other versions.

      The same query works correctly in other tools.


      When using an OR condition as listed below, data is not returned correctly.


      Specifically, when the line  "AND fname = 'Fred'" is commented out, the query works correctly.  When the line is uncommented, the query returns too many rows.


      Is this a known issue?


      Steps to replicate the issue....


      CREATE TABLE dev.rt_verify (    

      hire_yr      INT,

      hire_mnth    INT,

      fname        STRING,

      lname        STRING,

      dept         STRING



      INSERT INTO dev.rt_verify VALUES (2015, 3, 'Fred', 'Flintstone', 'Quarry');

      INSERT INTO dev.rt_verify VALUES (2016, 1, 'George', 'Jetson', 'Engineering');

      INSERT INTO dev.rt_verify VALUES (2016, 5, 'Barney', 'Rubble', 'Quarry');

      INSERT INTO dev.rt_verify VALUES (2016, 1, 'Betty', 'Rubble', 'Engineering');


      SELECT *

        FROM dev.rt_verify

      WHERE dept = 'Quarry' 

         -- AND fname = 'Fred'

         AND (

                  (hire_yr = 2016 AND hire_mnth <= 1)

               OR (hire_yr = 2015 AND hire_mnth >= 1)




      Results when commented




      Results when un commented