You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "0xAJX (via GitHub)" <gi...@apache.org> on 2026/06/27 14:24:20 UTC

[I] Addition of a partition function in datalake V1 tables [spark]

0xAJX opened a new issue, #56833:
URL: https://github.com/apache/spark/issues/56833

   ### Why this Issue is created?
   
   In my work I've had requirements to create SQLs that run against AWS Glue Data Catalog Tables where they need to get data from the latest partition only.
   
   Something like :-
   
   **SELECT * FROM db.table WHERE partition_col = (SELECT max(partition_col) FROM db.table)**
   
   But the issue with above approach is I've seen that pushdown predicate doesn't always read the metadata only and reads the data itself which shouldn't happen.
   
   In Athena, to solve this the query can be written as :-
   
   **SELECT * FROM db.table WHERE partition_col = (SELECT max(partition_col) FROM "db"."table$partitions")**
   
   But there isn't a similar approach in Spark for V1 tables and the only way is using SHOW PARTITIONS but it doesn't work as a subquery.


-- 
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: reviews-unsubscribe@spark.apache.org.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Re: [I] [SPARK-57743][SQL] Addition of a partition function in datalake V1 tables [spark]

Posted by "konjac (via GitHub)" <gi...@apache.org>.
konjac commented on issue #56833:
URL: https://github.com/apache/spark/issues/56833#issuecomment-5725400544

   For general scenario, the data read is necessary as the partition might be empty.
   
   Or is there a detailed example for your case?


-- 
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: reviews-unsubscribe@spark.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org