Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-3982

Simplify FilterMergeRule to rely on RelBuilder instead of RexProgram

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.23.0
    • core
    • None

    Description

      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

        Issue Links

          Activity

            People

              jcamacho Jesús Camacho Rodríguez
              jcamacho Jesús Camacho Rodríguez
              Votes:
              0 Vote for this issue
              Watchers:
              2 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 - 10m
                  10m