jh3507 commented on a change in pull request #1081: [CALCITE-2888] Enhance
RexImplicationChecker to better handle cast
URL: https://github.com/apache/calcite/pull/1081#discussion_r261818769
##########
File path: core/src/main/java/org/apache/calcite/rex/RexExecutor.java
##########
@@ -32,6 +35,18 @@
* @param reducedValues List to which reduced expressions are appended
*/
void reduce(RexBuilder rexBuilder, List<RexNode> constExps, List<RexNode>
reducedValues);
+
+ /**
+ * Executes an {@link RexExecutable} with {@link DataContext}
+ *
+ * @param rexBuilder Rex builder
+ * @param exps Expressions
+ * @param rowType describes the structure of the input row
+ * @param dataValues {@link DataContext} to execute with
+ * @return Objects returned after applying generated code with dataValues.
+ */
+ Object[] execute(RexBuilder rexBuilder, List<RexNode> exps,
+ RelDataType rowType, DataContext dataValues);
Review comment:
I agree with the point that the comment is misleaing. Thanks for noticing
it. I have updated the comment. But, in terms of what should be included in the
interface, I think one that is commonly used among the various implementations
should go into the interface. execution is needed when checking if a value is
satisfiable in the filter. So, I think it should be implemented. Delegating it
to the existing RexExecutionImpl would be one possible solution if implementing
it is too much effort.
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services