alamb commented on code in PR #17888:
URL: https://github.com/apache/datafusion/pull/17888#discussion_r2403264760
##########
datafusion/core/tests/dataframe/dataframe_functions.rs:
##########
@@ -282,16 +282,16 @@ async fn test_fn_arrow_typeof() -> Result<()> {
assert_snapshot!(
batches_to_string(&batches),
- @r#"
-
+------------------------------------------------------------------------------------------------------------------+
- | arrow_typeof(test.l)
|
-
+------------------------------------------------------------------------------------------------------------------+
- | List(Field { name: "item", data_type: Int32, nullable: true, dict_id: 0,
dict_is_ordered: false, metadata: {} }) |
- | List(Field { name: "item", data_type: Int32, nullable: true, dict_id: 0,
dict_is_ordered: false, metadata: {} }) |
- | List(Field { name: "item", data_type: Int32, nullable: true, dict_id: 0,
dict_is_ordered: false, metadata: {} }) |
- | List(Field { name: "item", data_type: Int32, nullable: true, dict_id: 0,
dict_is_ordered: false, metadata: {} }) |
-
+------------------------------------------------------------------------------------------------------------------+
- "#);
+ @r"
+ +----------------------+
+ | arrow_typeof(test.l) |
+ +----------------------+
+ | List(nullable Int32) |
Review Comment:
the new display is much easier to read in my opinion
##########
datafusion/common/src/dfschema.rs:
##########
@@ -1417,9 +1417,7 @@ mod tests {
fn from_qualified_schema_into_arrow_schema() -> Result<()> {
let schema = DFSchema::try_from_qualified_schema("t1",
&test_schema_1())?;
let arrow_schema = schema.as_arrow();
- let expected = "Field { name: \"c0\", data_type: Boolean, nullable:
true, dict_id: 0, dict_is_ordered: false, metadata: {} }, \
- Field { name: \"c1\", data_type: Boolean, nullable: true, dict_id: 0,
dict_is_ordered: false, metadata: {} }";
- assert_eq!(expected, arrow_schema.to_string());
+ insta::assert_snapshot!(arrow_schema.to_string(), @r#"Field { "c0":
nullable Boolean }, Field { "c1": nullable Boolean }"#);
Review Comment:
many many diffs are due to the changes in formatting of Fields and DataTypes
(see below)
##########
datafusion-cli/src/main.rs:
##########
@@ -575,9 +575,9 @@ mod tests {
+-----------------------------------+-----------------+---------------------+------+------------------+
| filename | file_size_bytes |
metadata_size_bytes | hits | extra |
+-----------------------------------+-----------------+---------------------+------+------------------+
- | alltypes_plain.parquet | 1851 | 10181
| 2 | page_index=false |
- | alltypes_tiny_pages.parquet | 454233 | 881418
| 2 | page_index=true |
- | lz4_raw_compressed_larger.parquet | 380836 | 2939
| 2 | page_index=false |
+ | alltypes_plain.parquet | 1851 | 10309
| 2 | page_index=false |
Review Comment:
I don't know why the metadata size has increased. I will investigate
--
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]