This is an automated email from the ASF dual-hosted git repository.
hyuan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/calcite.git
The following commit(s) were added to refs/heads/master by this push:
new 3b26283 [CALCITE-3357] Trivial null checking in
RelSet#addAbstractConverters (Jin Xing)
3b26283 is described below
commit 3b26283b61ca5e6be79c8e95c6558c8ab6985952
Author: jinxing <[email protected]>
AuthorDate: Wed Sep 18 12:03:40 2019 +0800
[CALCITE-3357] Trivial null checking in RelSet#addAbstractConverters (Jin
Xing)
---
core/src/main/java/org/apache/calcite/plan/volcano/RelSet.java | 4 ++--
.../src/main/java/org/apache/calcite/plan/volcano/VolcanoPlanner.java | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/core/src/main/java/org/apache/calcite/plan/volcano/RelSet.java
b/core/src/main/java/org/apache/calcite/plan/volcano/RelSet.java
index 1205448..5d17fde 100644
--- a/core/src/main/java/org/apache/calcite/plan/volcano/RelSet.java
+++ b/core/src/main/java/org/apache/calcite/plan/volcano/RelSet.java
@@ -177,13 +177,13 @@ class RelSet {
RelTraitDef traitDef = curOtherTrait.getTraitDef();
RelTrait curRelTrait = subset.getTraitSet().getTrait(traitDef);
- assert curRelTrait.getTraitDef() == traitDef;
-
if (curRelTrait == null) {
addAbstractConverter = false;
break;
}
+ assert curRelTrait.getTraitDef() == traitDef;
+
boolean canConvert = false;
boolean needConvert = false;
if (subsetToOthers) {
diff --git
a/core/src/main/java/org/apache/calcite/plan/volcano/VolcanoPlanner.java
b/core/src/main/java/org/apache/calcite/plan/volcano/VolcanoPlanner.java
index 36f6385..4f96637 100644
--- a/core/src/main/java/org/apache/calcite/plan/volcano/VolcanoPlanner.java
+++ b/core/src/main/java/org/apache/calcite/plan/volcano/VolcanoPlanner.java
@@ -1833,7 +1833,7 @@ public class VolcanoPlanner extends AbstractRelOptPlanner
{
// improve and the subset doesn't hear about it. You can end up with
// a subset with a single rel of cost 99 which thinks its best cost is
// 100. We think this happens because the back-links to parents are
- // not established. So, give the subset another change to figure out
+ // not established. So, give the subset another chance to figure out
// its cost.
final RelMetadataQuery mq = rel.getCluster().getMetadataQuery();
subset.propagateCostImprovements(this, mq, rel, new HashSet<>());