You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@calcite.apache.org by GitBox <gi...@apache.org> on 2020/03/31 07:50:32 UTC
[GitHub] [calcite] rubenada commented on a change in pull request #1860:
[CALCITE-2970] Add abstractConverter only between derived and required
traitset
rubenada commented on a change in pull request #1860: [CALCITE-2970] Add abstractConverter only between derived and required traitset
URL: https://github.com/apache/calcite/pull/1860#discussion_r400709528
##########
File path: core/src/main/java/org/apache/calcite/plan/volcano/RelSubset.java
##########
@@ -98,10 +100,13 @@
long timestamp;
/**
- * Flag indicating whether this RelSubset's importance was artificially
- * boosted.
+ * Physical property state of current subset
+ * 0: logical operators, NONE convention is neither DERIVED nor REQUIRED
+ * 1: traitSet DERIVED from child operators or itself
+ * 2: traitSet REQUIRED from parent operators
+ * 3: both DERIVED and REQUIRED
*/
- boolean boosted;
+ int state = 0;
Review comment:
I think `state` should probably be `private`. For the condition in RelSet that checks if `otherSubset.state == 0`, it could be re-written as `!otherSubset.isDerived() && !otherSubset.isRequired()`, or we could add a public shortcut method to check this condition `public boolean isXXX() { return state == 0; }`
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services