findepi opened a new pull request, #16627: URL: https://github.com/apache/datafusion/pull/16627
## Which issue does this PR close? - Closes https://github.com/apache/datafusion/issues/16585 ## Rationale for this change When query involves e.g. UNION ALL, it may produces record batches with incompatible schema. For example, one union branch may produce a nullable field while the order may produce a non-null field. Before the change, `convert_batches` success or failure depended on ordering of record batches returned by the query, and thus could lead (and did lead) to test flakiness. ## What changes are included in this PR? This changes schema source used by the `convert_batches`. Instead of peaking the first schema, it used the declared schema from the data frame, which should be correct with respect to nullability. ## Are these changes tested? yes ## Are there any user-facing changes? no -- 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-unsubscr...@datafusion.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org