akshaytayal opened a new pull request, #13452:
URL: https://github.com/apache/gluten/pull/13452

   ## What changes are proposed in this pull request?
   
   `VeloxBackendSettings.validateScanExec` → `validateMetadata()` calls 
`path.getFileSystem(hadoopConf).exists(path)` on every scan root path 
**before** `ParquetMetadataUtils.validateMetadata` checks whether metadata 
validation is enabled (`spark.gluten.sql.fallbackUnexpectedMetadataParquet`, 
default `false`). The pre-check was added in #12042 to skip root paths that do 
not exist yet (e.g. INSERT targets) when the validation runs.
   
   With the validation off (the default), the `exists()` result is never used, 
yet every Parquet scan validation still pays one storage round trip per root 
path. On object stores (S3/ABFS/GCS) that is a remote call, and potentially a 
credential/token fetch, during query planning.
   
   This PR returns early when the validation is disabled, before the pre-check. 
Behaviour with the validation enabled is unchanged.
   
   ## How was this patch tested?
   
   New `ParquetMetadataValidationScanSuite` (backends-velox) validates a 
Parquet scan through a counting local `FileSystem` (`fs.file.impl`) and asserts:
   - validation off (default): **no** file system calls on the scan root paths, 
and the scan validates;
   - validation on: a missing root path is skipped after `exists()` (no 
listing);
   - validation on: an encrypted Parquet file under an existing root path still 
falls back (`exists()` + `listFiles()` run).
   
   ## Was this patch authored or co-authored using generative AI tooling?
   
   Generated-by: GitHub Copilot CLI 1.0.101


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