jackylee-ch commented on code in PR #25694:
URL: https://github.com/apache/datafusion/pull/25694#discussion_r4594281825


##########
datafusion/physical-plan/src/statistics.rs:
##########
@@ -709,6 +713,34 @@ impl StatisticsContext {
     }
 }
 
+/// Returns an error unless `statistics`, computed for `plan` by `provider` or,
+/// if `None`, by the operator itself, hold one [`ColumnStatistics`] per field
+/// of `plan`'s schema, as [`Statistics::column_statistics`] requires. 
Consumers
+/// index it by column, so a mismatch could make them go out of bounds or read
+/// the statistics of another column.
+///
+/// [`ColumnStatistics`]: datafusion_common::ColumnStatistics

Review Comment:
   Done in cc8d1755d: the doc is now one line.



##########
datafusion/physical-plan/src/execution_plan.rs:
##########
@@ -740,11 +740,15 @@ pub trait ExecutionPlan: Any + Debug + DisplayAs + Send + 
Sync {
     /// (the default), not an error.
     /// If `args.partition()` is `None`, it returns statistics for all 
partitions.
     ///
+    /// The result must hold one [`ColumnStatistics`] per field of
+    /// [`Self::schema`]; [`StatisticsContext::compute`] returns an error 
otherwise.

Review Comment:
   Done in cc8d1755d: dropped the sentence about the error.



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