This is an automated email from the ASF dual-hosted git repository. mbudiu pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/calcite.git
commit dc8c4ff41cc42e6c842b9310a8b742afbd643383 Author: Mihai Budiu <[email protected]> AuthorDate: Thu Oct 3 16:37:57 2024 -0700 Improved JavaDoc Signed-off-by: Mihai Budiu <[email protected]> --- core/src/main/java/org/apache/calcite/rex/RexExecutorImpl.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/core/src/main/java/org/apache/calcite/rex/RexExecutorImpl.java b/core/src/main/java/org/apache/calcite/rex/RexExecutorImpl.java index c2a8b56196..3a894d0fba 100644 --- a/core/src/main/java/org/apache/calcite/rex/RexExecutorImpl.java +++ b/core/src/main/java/org/apache/calcite/rex/RexExecutorImpl.java @@ -126,12 +126,15 @@ public class RexExecutorImpl implements RexExecutor { /** * Do constant reduction using generated code. - * Returns the reduced expressions in `reducedValues`, which - * is supposed to be empty on call. + * + * @param rexBuilder Builder used to construct expressions + * @param constExps A list of constant expressions + * @param reducedValues An empty list. The function will return + * for each expression on constExps one equivalent + * reduced expression in this list, in the same order. */ @Override public void reduce(RexBuilder rexBuilder, List<RexNode> constExps, List<RexNode> reducedValues) { - // If this is not empty, the reducedValues.clear() call below is wrong. assert reducedValues.isEmpty(); try { String code = compile(rexBuilder, constExps, (list, index, storageType) -> {
