rdblue commented on a change in pull request #1738: URL: https://github.com/apache/iceberg/pull/1738#discussion_r519065312
########## File path: spark3/src/main/java/org/apache/spark/sql/connector/read/SupportsReadFileFilter.java ########## @@ -0,0 +1,26 @@ +/* + * 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.spark.sql.connector.read; + +import java.util.Set; + +public interface SupportsReadFileFilter extends Scan { + void filterFiles(Set<String> locations); +} Review comment: I think we have both `SupportsReadFileFilter` and `SupportsWriteFileFilter` so that we can check that we have both or else we won't call `filterFiles`. That seems reasonable to me, but it would be nice to have a comment in the docs for both interfaces stating that this is a requirement. Also, there are alternatives to this that may be simpler. Since we are constructing the write and the read at the same time, we could rely on them to coordinate and call `filterFiles` just once. The write could be passed the scan when it's created so that it always uses the scan's latest set of files, for example. ---------------------------------------------------------------- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
