You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "alamb (via GitHub)" <gi...@apache.org> on 2023/03/29 17:03:09 UTC

[GitHub] [arrow-datafusion] alamb commented on a diff in pull request #5769: MINOR: simplify sqllogic test schema check

alamb commented on code in PR #5769:
URL: https://github.com/apache/arrow-datafusion/pull/5769#discussion_r1152246444


##########
datafusion/core/tests/sqllogictests/src/engines/datafusion/normalize.rs:
##########
@@ -36,7 +35,7 @@ pub fn convert_batches(batches: Vec<RecordBatch>) -> Result<Vec<Vec<String>>> {
         let mut rows = vec![];
         for batch in batches {
             // Verify schema
-            if !equivalent_names_and_types(&schema, batch.schema()) {
+            if !schema.contains(&batch.schema()) {

Review Comment:
   It appears `contains` is stricter than the `equivalent_names_and_types` (it also verifies nullability, metadata and dictionary ids). I think this is fine but wanted to point it out.
   
   https://docs.rs/arrow/36.0.0/arrow/datatypes/struct.Schema.html#method.contains
   
   
   https://docs.rs/arrow-schema/36.0.0/src/arrow_schema/field.rs.html#434



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org