RussellSpitzer commented on a change in pull request #2777:
URL: https://github.com/apache/iceberg/pull/2777#discussion_r665730907



##########
File path: spark/src/main/java/org/apache/iceberg/spark/SparkTableUtil.java
##########
@@ -151,15 +154,21 @@ private SparkTableUtil() {
    *
    * @param spark a Spark session
    * @param tableIdent a table identifier
+   * @param partitionFilter the partition filter
    * @return all table's partitions
    */
-  public static List<SparkPartition> getPartitions(SparkSession spark, 
TableIdentifier tableIdent) {
+  public static List<SparkPartition> getPartitions(SparkSession spark, 
TableIdentifier tableIdent,
+                                                   Optional<Map<String, 
String>> partitionFilter) {
     try {
       SessionCatalog catalog = spark.sessionState().catalog();
       CatalogTable catalogTable = catalog.getTableMetadata(tableIdent);
 
-      Seq<CatalogTablePartition> partitions = 
catalog.listPartitions(tableIdent, Option.empty());
+      Option<scala.collection.immutable.Map<String, String>> partSpec =

Review comment:
       Or could just do something like
   ```java      
   Option<scala.collection.mutable.Map<String, String>> scalaFilter =
             
Option.apply(scala.collection.JavaConverters.mapAsScalaMapConverter(pkfilter).asScala());
    ```




-- 
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]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to