adriangb commented on code in PR #23999:
URL: https://github.com/apache/datafusion/pull/23999#discussion_r3683560879


##########
datafusion/proto/src/physical_plan/from_proto.rs:
##########
@@ -660,7 +660,7 @@ impl TryFromProto<&protobuf::PartitionedFile> for 
PartitionedFile {
             pf = pf.with_range(file_range.start, file_range.end);
         }
         if let Some(proto_stats) = val.statistics.as_ref() {
-            pf = pf.with_statistics(Arc::new(proto_stats.try_into()?));
+            pf.statistics = Some(Arc::new(proto_stats.try_into()?));

Review Comment:
   This should clarify:
   
   ```suggestion
                   // The wire format carries statistics for the full table 
schema (file + partition
                   // columns), so assign directly — `with_statistics` would 
append the partition
                   // column stats a second time.
                   pf.statistics = Some(Arc::new(proto_stats.try_into()?));
   ```



##########
datafusion/proto/src/physical_plan/from_proto.rs:
##########
@@ -660,7 +660,7 @@ impl TryFromProto<&protobuf::PartitionedFile> for 
PartitionedFile {
             pf = pf.with_range(file_range.start, file_range.end);
         }
         if let Some(proto_stats) = val.statistics.as_ref() {
-            pf = pf.with_statistics(Arc::new(proto_stats.try_into()?));
+            pf.statistics = Some(Arc::new(proto_stats.try_into()?));

Review Comment:
   This should clarify:
   
   ```suggestion
               // The wire format carries statistics for the full table schema 
(file + partition
               // columns), so assign directly — `with_statistics` would append 
the partition
               // column stats a second time.
               pf.statistics = Some(Arc::new(proto_stats.try_into()?));
   ```



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