You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2021/07/07 21:46:29 UTC

[GitHub] [iceberg] RussellSpitzer commented on a change in pull request #2777: Spark : Add Files Perf improvement by push down partition filter to Spark/Hive catalog

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



##########
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:
       I am not smart enough to hold this whole block in my head. Can we break this down into multiple lines?
   
   One line to make the scala Map
   One line to wrap it in optional?




-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org