Skip to content

Commit aa1f551

Browse files
adriangbclaude
andcommitted
docs: pass access_plan directly in with_extension example
`with_extension<T>` keys by the concrete type `T`, so wrapping the plan in `Arc::new(...)` would store it as `Arc<ParquetAccessPlan>`. The downstream lookup is `extensions.get::<ParquetAccessPlan>()`, which would miss the wrapped value and scan all row groups. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 8a54391 commit aa1f551

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

datafusion/datasource-parquet/src/source.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ use parquet::encryption::decrypt::FileDecryptionProperties;
230230
/// access_plan.skip(4);
231231
/// // provide the plan as extension to the FileScanConfig
232232
/// let partitioned_file = PartitionedFile::new("my_file.parquet", 1234)
233-
/// .with_extension(Arc::new(access_plan));
233+
/// .with_extension(access_plan);
234234
/// // create a FileScanConfig to scan this file
235235
/// let config = FileScanConfigBuilder::new(ObjectStoreUrl::local_filesystem(), Arc::new(ParquetSource::new(schema())))
236236
/// .with_file(partitioned_file).build();

0 commit comments

Comments
 (0)