twalthr commented on a change in pull request #11692: [FLINK-16992][table-common] Add all ability interfaces for table sources and sinks URL: https://github.com/apache/flink/pull/11692#discussion_r410149701
########## File path: flink-table/flink-table-common/src/main/java/org/apache/flink/table/connector/source/abilities/SupportsPartitionPushDown.java ########## @@ -0,0 +1,79 @@ +/* + * 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.flink.table.connector.source.abilities; + +import org.apache.flink.annotation.PublicEvolving; +import org.apache.flink.table.connector.source.ScanTableSource; + +import java.util.List; +import java.util.Map; +import java.util.Optional; + +/** + * Enables to pass available partitions to the planner and push down partitions into a {@link ScanTableSource}. + * + * <p>Partitions split the data stored in an external system into smaller portions that are identified + * by one or more string-based partition keys. A single partition is represented as a {@code Map < String, String >} + * which maps each partition key to a partition value. Partition keys and their order is defined by the + * catalog table. + * + * <p>For example, data can be partitioned by region and within a region partitioned by month. The order + * of the partition keys (in the example: first by region then by month) are defined by the catalog table. A + * list of partitions could be: + * <pre> + * List( + * ['region'='europe', 'month'='2020-01'], + * ['region'='europe', 'month'='2020-02'], + * ['region'='asia', 'month'='2020-01'], + * ['region'='asia', 'month'='2020-02'] + * ) + * </pre> + * + * <p>By default, if this interface is not implemented, the list of all partitions is queried from the Review comment: I will rephrase this part a bit. What I wanted to explain is the default behavior of both methods. Actually each method is an orthogonal concept. ---------------------------------------------------------------- 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