JingsongLi commented on code in PR #10836:
URL: https://github.com/apache/paimon/pull/10836#discussion_r4464433950


##########
paimon-format/src/main/java/org/apache/parquet/hadoop/ParquetFileReader.java:
##########
@@ -229,6 +230,35 @@ private static final ParquetMetadata readFooter(
 
             // Regular file, or encrypted file with plaintext footer
             if (!encryptedFooterMode) {
+                // Try selective footer parsing first for better performance
+                // This is enabled when requested columns are specified in 
options
+                String requestedColumns =
+                        
options.getProperty(SelectiveFooterParser.REQUESTED_COLUMNS_KEY);
+                if (requestedColumns != null && fileDecryptor == null) {
+                    boolean includeStatistics =
+                            !"true"
+                                    .equals(
+                                            options.getProperty(
+                                                    
SelectiveFooterParser.SKIP_STATISTICS_KEY));
+                    boolean caseSensitive =
+                            !"false"
+                                    .equals(
+                                            options.getProperty(
+                                                    
SelectiveFooterParser.CASE_SENSITIVE_KEY));
+                    try {
+                        return SelectiveFooterParser.parse(

Review Comment:
   Why not read PARQUET_FOOTER_SELECTIVE_PARSER_ENABLED here?



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

Reply via email to