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

Trivial null checking in RelSet#addAbstractConverters

    XMLWordPrintableJSON

    Details

      Description

      In current code of RelSet#addAbstractConverters, null checking of curRelTrait happens after clause of assert curRelTrait.getTraitDef() == traitDef;

      It makes more sense to adjust the order;

      In my understanding, this issue was not found previously for two reasons:

      1. AbstractConverter is not enabled by default (https://github.com/apache/calcite/blob/master/core/src/main/java/org/apache/calcite/adapter/enumerable/EnumerableConvention.java#L65)
      2. It rarely happens that two algebra expression operators have identical semantics but different RelTraitDef

      I found this issue when working on https://issues.apache.org/jira/browse/CALCITE-2970

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                jinxing6042@126.com Jin Xing
              • Votes:
                0 Vote for this issue
                Watchers:
                3 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 - 0.5h
                  0.5h