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

FilterMergeRule can lead to AssertionError

    XMLWordPrintableJSON

Details

    Description

      I have not been able to reproduce the issue in latest master. However, this could potentially happen since Filter creation has a check on whether the expression is flat (here) and Filter merge does not flatten an expression when it is created.

      java.lang.AssertionError: AND(=($3, 100), OR(OR(null, IS NOT NULL(CAST(100):INTEGER)), =(CAST(100):INTEGER, CAST(200):INTEGER)))
      	at org.apache.calcite.rel.core.Filter.<init>(Filter.java:74)
      	at org.apache.hadoop.hive.ql.optimizer.calcite.reloperators.HiveFilter.<init>(HiveFilter.java:39)
      	at org.apache.hadoop.hive.ql.optimizer.calcite.HiveRelFactories$HiveFilterFactoryImpl.createFilter(HiveRelFactories.java:126)
      	at org.apache.hadoop.hive.ql.optimizer.calcite.HiveRelBuilder.filter(HiveRelBuilder.java:99)
      	at org.apache.calcite.tools.RelBuilder.filter(RelBuilder.java:1055)
      	at org.apache.calcite.rel.rules.FilterMergeRule.onMatch(FilterMergeRule.java:81)
      

      Attachments

        1. HIVE-23389.patch
          6 kB
          jcamachorodriguez
        2. HIVE-23389.02.patch
          6 kB
          jcamachorodriguez
        3. HIVE-23389.01.patch
          8 kB
          jcamachorodriguez
        4. HIVE-23389.01.patch
          8 kB
          jcamachorodriguez

        Issue Links

          Activity

            People

              jcamacho Jesús Camacho Rodríguez
              jcamacho Jesús Camacho Rodríguez
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 50m
                  50m