alamb commented on code in PR #24125:
URL: https://github.com/apache/datafusion/pull/24125#discussion_r3769106953


##########
datafusion/physical-expr-adapter/src/schema_rewriter.rs:
##########
@@ -282,13 +311,130 @@ impl DefaultPhysicalExprAdapterRewriter {
             return Ok(Transformed::yes(transformed));
         }
 
+        if let Some(transformed) = self.try_narrow_struct_cast(&expr)? {
+            return Ok(Transformed::yes(transformed));
+        }
+
         if let Some(column) = expr.downcast_ref::<Column>() {
             return self.rewrite_column(Arc::clone(&expr), column);
         }
 
         Ok(Transformed::no(expr))
     }
 
+    /// Rewrite `get_field(cast(s AS Struct<..>), 'f')` into

Review Comment:
   I see -- so the general case solution is that we need some way to fall back 
apply a filter outside of the arrow-rs parquet decoder in some cases (if we 
can't push a predicate into the decoder due to physical schema mismatch)?
   
   If so that also sounds similar to the idea of dynamically switching from 
pushed down filters to filter after the scan 🤔 



-- 
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]

Reply via email to