You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@calcite.apache.org by hy...@apache.org on 2020/08/19 20:07:15 UTC
[calcite] branch master updated: Add assertion that relnode after
pass through traits has the same convention
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 6968f0a Add assertion that relnode after pass through traits has the same convention
6968f0a is described below
commit 6968f0af4aa4d0ec6cdc86dfb8372fe8652de7b9
Author: Haisheng Yuan <h....@alibaba-inc.com>
AuthorDate: Wed Aug 19 15:04:23 2020 -0500
Add assertion that relnode after pass through traits has the same convention
Change-Id: I5dbb39899809055340fe14fa1c09bc25835dd5be
---
.../main/java/org/apache/calcite/plan/volcano/TopDownRuleDriver.java | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/core/src/main/java/org/apache/calcite/plan/volcano/TopDownRuleDriver.java b/core/src/main/java/org/apache/calcite/plan/volcano/TopDownRuleDriver.java
index d41c624..0115a05 100644
--- a/core/src/main/java/org/apache/calcite/plan/volcano/TopDownRuleDriver.java
+++ b/core/src/main/java/org/apache/calcite/plan/volcano/TopDownRuleDriver.java
@@ -563,13 +563,14 @@ class TopDownRuleDriver implements RuleDriver {
return new OptimizeInputs(rel, group);
}
- // Try converting the physical node to another trait sets
- // either by converter rule or traits pass though.
+ // Try to convert the physical node to another trait sets,
+ // either by converter rule or traits pass through.
private RelNode convert(RelNode rel, RelSubset group) {
if (!passThroughCache.contains(rel)) {
if (checkLowerBound(rel, group)) {
RelNode passThrough = group.passThrough(rel);
if (passThrough != null) {
+ assert passThrough.getConvention() == rel.getConvention();
passThroughCache.add(passThrough);
return passThrough;
}