comphead commented on code in PR #3536:
URL: https://github.com/apache/datafusion-comet/pull/3536#discussion_r2854691199


##########
native/core/src/execution/operators/iceberg_scan.rs:
##########
@@ -251,38 +258,34 @@ where
             Poll::Ready(Some(Ok(batch))) => {
                 let file_schema = batch.schema();
 
-                // Check if we need to create a new adapter for this file's 
schema
-                let needs_new_adapter = match &self.cached_adapter {
-                    Some((cached_schema, _)) => !Arc::ptr_eq(cached_schema, 
&file_schema),
-                    None => true,
+                // Reuse cached projection expressions if file schema hasn't 
changed,
+                // otherwise create a new adapter and build new expressions
+                let projection_exprs = match &self.cached {
+                    Some(cached) if cached.file_schema.as_ref() == 
file_schema.as_ref() => {

Review Comment:
   so we sure that all batches shares the same schema pointer? 



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