mihaibudiu commented on code in PR #4358: URL: https://github.com/apache/calcite/pull/4358#discussion_r2074115378
########## core/src/test/resources/sql/planner.iq: ########## @@ -20,6 +20,8 @@ # The following line is used to update the default planner rules. # "+" means add a rule, "-" means remove a rule. Only the "CoreRules." can be omitted. +# If multiple rules are involved, they need to be divided into multiple lines, one rule per line, Review Comment: I don't see a test using the new feature. ########## core/src/main/java/org/apache/calcite/rel/rules/RuleConfig.java: ########## @@ -0,0 +1,39 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to you under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.calcite.rel.rules; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +/** + * The RuleConfig annotation is only used for testing + * and is used to identify the Config name when there + * are multiple Configs in each rule. + * + * <p>For example: + * ExpandDisjunctionForJoinInputsRule contains two + * Config(FILTER and JOIN). We should add annotations + * in {@link CoreRules}. See + * {@link CoreRules#EXPAND_JOIN_DISJUNCTION_LOCAL} + */ +@Target(ElementType.FIELD) Review Comment: As @julianhyde said, if you add a short description to the JIRA about the design it may make it much easier to review this. There should be no comments with "we should...". Perhaps you mean "Each CoreRule must have an annotation..." -- 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. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
