thinkharderdev commented on code in PR #3380:
URL: https://github.com/apache/arrow-datafusion/pull/3380#discussion_r969013277
##########
datafusion/core/src/physical_plan/file_format/parquet.rs:
##########
@@ -1139,14 +1246,53 @@ mod tests {
"+-----+----+",
"| c1 | c2 |",
"+-----+----+",
- "| Foo | |",
"| | |",
+ "| | |",
+ "| | 1 |",
+ "| | 2 |",
+ "| Foo | |",
"| bar | |",
"+-----+----+",
];
assert_batches_sorted_eq!(expected, &read);
}
+ #[tokio::test]
+ async fn evolved_schema_disjoint_schema_filter_with_pushdown() {
+ let c1: ArrayRef =
+ Arc::new(StringArray::from(vec![Some("Foo"), None, Some("bar")]));
+
+ let c2: ArrayRef = Arc::new(Int64Array::from(vec![Some(1), Some(2),
None]));
+
+ // batch1: c1(string)
+ let batch1 = create_batch(vec![("c1", c1.clone())]);
+
+ // batch2: c2(int64)
+ let batch2 = create_batch(vec![("c2", c2)]);
+
+ let filter = col("c2").eq(lit(1_i64));
+
+ // read/write them files:
+ let read =
+ round_trip_to_parquet(vec![batch1, batch2], None, None,
Some(filter), true)
+ .await
+ .unwrap();
+
+ // This does not look correct since the "c2" values in the result do
not in fact match the predicate `c2 == 0`
Review Comment:
Yeah, lazy copy pasta :)
--
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]