gene-bordegaray commented on code in PR #23189:
URL: https://github.com/apache/datafusion/pull/23189#discussion_r3536400631
##########
datafusion/catalog-listing/src/table.rs:
##########
@@ -628,6 +630,15 @@ impl TableProvider for ListingTable {
);
}
Some(output_partitioning)
+ } else if partitioned_by_file_group {
+ // Files are grouped by partition column values: declare Hash
+ // partitioning on those columns so the optimizer can skip hash
Review Comment:
I am realizing this is another type of partitioning we are misrepresenting.
See issue: #23236 .
I think in this case we aren't actually hash partitioned. We are some other
type of partitioning something like `ValuePartitioned`
##########
datafusion/datasource/src/file_scan_config/mod.rs:
##########
@@ -598,12 +571,15 @@ impl From<FileScanConfig> for FileScanConfigBuilder {
constraints: Some(config.constraints),
batch_size: config.batch_size,
expr_adapter_factory: config.expr_adapter_factory,
- partitioned_by_file_group: config.partitioned_by_file_group,
}
}
}
-fn hash_partitioning_from_partition_fields(
+/// Builds `Partitioning::Hash` over `partition_cols` (resolved to their
indices in
+/// `schema`) with `partition_count` partitions. Returns `None` when there are
no
+/// partition columns. Callers use this to declare the output partitioning of
a scan
+/// whose file groups are organized by partition column values.
+pub fn hash_partitioning_from_partition_fields(
Review Comment:
yes, we aren't actually hash it seems
@alamb it seems we have some other type of partitioning we need to represent
correctly 🤔
--
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]