coderfender commented on code in PR #1916:
URL: 
https://github.com/apache/datafusion-ballista/pull/1916#discussion_r3532386038


##########
ballista/core/src/execution_plans/shuffle_writer.rs:
##########
@@ -126,6 +127,38 @@ struct ShuffleWriteMetrics {
     output_rows: metrics::Count,
 }
 
+/// ShuffleWriteResult represents the payload sent back to scheduler. This 
essentially consists of
+/// shuffle write partition information along with the column stats 
potentially useful for AQE
+#[derive(Debug, Clone)]
+pub struct ShuffleWriteResult {
+    /// partition shuffle write information
+    pub partitions: Vec<ShuffleWritePartition>,
+    /// column stats folded across all partitions for each column
+    pub column_stats: Vec<TaskColumnStats>,
+}
+
+/// Fold the per-column null counts of `batch` into `null_counts` (indexed by 
column position).
+/// Shared by every shuffle-write path so stats are collected consistently.
+pub(crate) fn accumulate_null_counts(null_counts: &mut [u64], batch: 
&RecordBatch) {

Review Comment:
   Agreed. I added couple of unit tests



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