-
Notifications
You must be signed in to change notification settings - Fork 421
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add test for min_max_schema_for_fields #1122
add test for min_max_schema_for_fields #1122
Conversation
Signed-off-by: Marijn Valk <marijncv@hotmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since max_min_schema_for_fields
is meant to be used multiple times on the same destination, perhaps it might be better to combine the tests into one where you call the function on each of the fields, and then assert the final dest
result contains the right fields.
rust/src/delta_arrow.rs
Outdated
let f = ArrowField::new( | ||
"struct", | ||
ArrowDataType::Struct(vec![ArrowField::new("simple", ArrowDataType::Int32, true)]), | ||
true, | ||
); | ||
let expected = vec![ArrowField::new( | ||
"struct", | ||
ArrowDataType::Struct(vec![ArrowField::new("simple", ArrowDataType::Int32, true)]), | ||
true, | ||
)]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't have to repeat this, and it's probably clearer they are meant to be the same field if we just clone f
. Same applies for test above.
let f = ArrowField::new( | |
"struct", | |
ArrowDataType::Struct(vec![ArrowField::new("simple", ArrowDataType::Int32, true)]), | |
true, | |
); | |
let expected = vec![ArrowField::new( | |
"struct", | |
ArrowDataType::Struct(vec![ArrowField::new("simple", ArrowDataType::Int32, true)]), | |
true, | |
)]; | |
let f = ArrowField::new( | |
"struct", | |
ArrowDataType::Struct(vec![ArrowField::new("simple", ArrowDataType::Int32, true)]), | |
true, | |
); | |
let expected = vec![f.clone()]; |
Signed-off-by: Marijn Valk <marijncv@hotmail.com>
Thanks for the pointers @wjones127! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @marijncv!
Signed-off-by: Marijn Valk <marijncv@hotmail.com> # Description Adds tests for `min_max_schema_for_fields` # Related Issue(s) <!--- For example: - closes delta-io#106 ---> # Documentation <!--- Share links to useful documentation ---> --------- Signed-off-by: Marijn Valk <marijncv@hotmail.com>
Signed-off-by: Marijn Valk marijncv@hotmail.com
Description
Adds tests for
min_max_schema_for_fields
Related Issue(s)
Documentation