olivrlee commented on code in PR #3984: URL: https://github.com/apache/calcite/pull/3984#discussion_r1806973203
########## core/src/main/java/org/apache/calcite/sql/validate/MustFilterRequirements.java: ########## @@ -0,0 +1,51 @@ +/* + * 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.sql.validate; + +import org.apache.calcite.util.ImmutableBitSet; + +import com.google.common.collect.ImmutableSet; + +import java.util.Set; + +/** + * Class that encapsulates filtering requirements when overloading SemanticTable. + * + * <p>mustFilterFields: the ordinals (in the row type) of the "must-filter" fields, + * fields that must be filtered in a query. + * <p> mustFilterBypassFields: the ordinals (in the row type) of the "bypass" fields, + * fields that can defuse validation errors on mustFilterFields if filtered on. + * <p> remnantMustFilterFields: Set of mustFilterField SqlQualifieds that have not been defused + * in the current query, but can still be defused by filtering on a bypass field in the + * enclosing query. + */ +public class MustFilterRequirements { Review Comment: It could be package-private. I'll rename it to `FilterRequirement` and `filterFields`, `bypassFields`. Still thinking about the rename of `remnantMustFilterFields` ... I still think the name needs to capture the connotation that they're valid filter requirements left-over from a previous query, but also distinct from the set that can actively be defused -- 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]
