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


##########
datafusion/datasource-parquet/src/source.rs:
##########
@@ -230,7 +230,7 @@ use parquet::encryption::decrypt::FileDecryptionProperties;
 /// access_plan.skip(4);
 /// // provide the plan as extension to the FileScanConfig
 /// let partitioned_file = PartitionedFile::new("my_file.parquet", 1234)
-///   .with_extensions(Arc::new(access_plan));
+///   .with_extension(Arc::new(access_plan));

Review Comment:
   I think this example still needs a small adjustment. Passing 
`Arc::new(access_plan)` means `PartitionedFile::with_extension<T>(value: T)` 
stores the extension as `Arc<ParquetAccessPlan>`.
   
   Later, `create_initial_plan` looks up 
`extensions.get::<ParquetAccessPlan>()`, so the access plan from this example 
would be ignored and all row groups may be scanned.
   
   Could we pass the concrete value instead?
   
   ```rust
   .with_extension(access_plan);
   ```



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