alamb commented on code in PR #22496:
URL: https://github.com/apache/datafusion/pull/22496#discussion_r3306491587
##########
docs/source/library-user-guide/upgrading/55.0.0.md:
##########
@@ -70,3 +70,50 @@ such a pruner can never prune anything beyond what planning
already did.
Previously it returned `Some` whenever a statistics struct was present (the
"is this worth pruning?" decision lived in the Parquet opener). Files with
column
statistics, and predicates that carry a dynamic filter, are unaffected.
+
+### `TableSchema` gains a builder; `table_partition_cols()` now returns
`&Fields`
Review Comment:
I don't think we need to add anything to the upgrade guide for this change
-- as there is nothing required on upgrade -- the deprecation warning will lead
people to the right APIs if they require clean clippy
##########
datafusion/core/src/datasource/file_format/mod.rs:
##########
@@ -67,7 +67,7 @@ pub(crate) mod test_util {
.await?
};
- let table_schema = TableSchema::new(file_schema.clone(), vec![]);
+ let table_schema = TableSchema::from(file_schema.clone());
Review Comment:
I made a PR to do this for your consideration:
- https://github.com/pydantic/datafusion/pull/61
##########
datafusion/core/src/datasource/file_format/mod.rs:
##########
@@ -67,7 +67,7 @@ pub(crate) mod test_util {
.await?
};
- let table_schema = TableSchema::new(file_schema.clone(), vec![]);
+ let table_schema = TableSchema::from(file_schema.clone());
Review Comment:
You could probably also make this even more concise like
`TableSchema::from(&file_schema)` with the approproiate `From` impl 🤔
--
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]