xudong963 commented on code in PR #16086:
URL: https://github.com/apache/datafusion/pull/16086#discussion_r2099949463


##########
datafusion/core/src/datasource/physical_plan/parquet.rs:
##########
@@ -848,6 +864,88 @@ mod tests {
         assert_eq!(read.len(), 0);
     }
 
+    #[tokio::test]
+    async fn evolved_schema_column_type_filter_strings() {
+        // The table and filter have a common data type, but the file schema 
differs
+        let c1: ArrayRef =
+            Arc::new(StringViewArray::from(vec![Some("foo"), Some("bar")]));
+        let batch = create_batch(vec![("c1", c1.clone())]);
+
+        let schema = Arc::new(Schema::new(vec![Field::new("c1", 
DataType::Utf8, false)]));
+
+        // Predicate should prune all row groups
+        let filter = 
col("c1").eq(lit(ScalarValue::Utf8(Some("aaa".to_string()))));

Review Comment:
   I think the filter should be constructed by `Utf8View`, it's a logical expr.
   ```
   let filter = 
col("c1").eq(lit(ScalarValue::Utf8View(Some("aaa".to_string()))));
   ```
   
   Then, the test will fail because 
https://github.com/apache/datafusion/pull/16086/files#diff-c8eebe4fb9ee7662170c6ce507ad2be92c0229b3a91a2f4431a9bfc7185a0eb9L148
 uses `file_schema` to transfer logical expr to physical expr. And 
https://github.com/apache/datafusion/pull/16133 will fix 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: 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

Reply via email to