zhuqi-lucas commented on code in PR #24638:
URL: https://github.com/apache/datafusion/pull/24638#discussion_r3848922786
##########
datafusion/core/tests/parquet/filter_pushdown.rs:
##########
@@ -746,3 +752,51 @@ impl PredicateCacheTest {
Ok(())
}
}
+
+/// A predicate that is pushed into the parquet decoder and then fails while it
+/// is being evaluated must report the original error, so that callers can
still
+/// tell a user error apart from an internal one.
+#[tokio::test]
+async fn pushed_down_predicate_reports_the_original_error() {
+ let tempdir = TempDir::new_in(Path::new(".")).unwrap();
+ let path = tempdir.path().join("cast_error.parquet");
+
+ let batch = RecordBatch::try_from_iter(vec![(
+ "s",
+ Arc::new(StringArray::from(vec!["not_an_int"])) as ArrayRef,
Review Comment:
Small note on the test: the file has one column `s` and the predicate is on
`s` too, so the projection has zero non-filter columns. Any narrow-projection
pushdown heuristic would decline this scan, and
`assert!(!plan.contains("FilterExec"))` would then fail.
Nothing on `main` does that today, so this is fine as-is — just worth
knowing the assertion depends on it.
--
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]