kosiew commented on code in PR #21566:
URL: https://github.com/apache/datafusion/pull/21566#discussion_r3729711988


##########
datafusion/datasource-parquet/src/opener/mod.rs:
##########
@@ -309,6 +315,109 @@ impl fmt::Debug for ParquetMorselizer {
     }
 }
 
+/// Scan-local cache for CPU-only pruning setup that can be reused across files
+/// with the same adapted expression inputs and physical schema.
+#[derive(Debug, Default)]
+pub(super) struct ParquetPruningSetupCache {
+    entries: Mutex<ParquetPruningSetupEntries>,
+}
+
+type ParquetPruningSetupEntries =
+    HashMap<ParquetPruningSetupCacheKey, ParquetPruningSetup>;
+
+#[derive(Debug, Clone, PartialEq, Eq, Hash)]
+struct ParquetPruningSetupCacheKey {
+    // Schema coercions such as INT96 resolution and file-schema type coercions
+    // are included through the final physical schema used for adaptation.
+    logical_file_schema: SchemaRef,
+    physical_file_schema: SchemaRef,
+    // Page-index options are intentionally not part of this key because page
+    // pruning predicates are built after this cache entry is applied.

Review Comment:
   it is planned for `schema_caching-02-21554` (a follow on branch)



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