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: us...@infra.apache.org With regards, Apache Git Services