Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-4039

Hive compiler sometimes fails in semantic analysis / optimisation stage when boolean variable appears in WHERE clause.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 0.11.0
    • Query Processor
    • None
    • Reviewed
    • I have changed the code, and added in a test file

    Description

      Hive compiler fails with a NullPointerException in semantic analysis / optimisation stage when a boolean variable appears in the WHERE clause in some cases. A minimal query to generate this error is here:
      SELECT 1
      FROM (
      SELECT TRUE AS flag
      FROM dim_one_row:measurementsystems
      ) a
      WHERE flag;

      On the other hand, the following query is perfectly fine:
      SELECT 1
      FROM (
      SELECT TRUE AS flag
      FROM dim_one_row:measurementsystems
      ) a
      WHERE flag=TRUE;

      Attachments

        1. HIVE_4039.1.patch.txt
          2 kB
          Jean Xu

        Activity

          People

            jeanxu Jean Xu
            jeanxu Jean Xu
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: