yunchipang commented on code in PR #7742:
URL: https://github.com/apache/datafusion-comet/pull/7742#discussion_r4794731272


##########
native/core/src/execution/operators/parquet_writer.rs:
##########
@@ -922,6 +933,38 @@ mod tests {
         Ok(())
     }
 
+    #[tokio::test]
+    async fn test_parquet_writer_bounds_row_groups_by_max_row_group_bytes() -> 
Result<()> {
+        let schema = Arc::new(Schema::new(vec![Field::new("id", 
DataType::Int32, true)]));
+        let batch = RecordBatch::try_new(
+            Arc::clone(&schema),
+            vec![Arc::new(Int32Array::from_iter_values(0..100_000))],
+        )?;
+        let memory_source = MemorySourceConfig::try_new(&[vec![batch]], 
Arc::clone(&schema), None)?;

Review Comment:
   thanks! from what i can tell, `DataSourceExec` splits its output into 
8192-row batches, and one 8192-row batch of this column is already over the 16 
KiB limit, so a row group that starts with it always overshoots. 10 × 10,000 
gave me 20 row groups for that reason. i updated the test to feed 10 batches of 
1,000 rows, so each row group collects several batches before it is flushed, 
and it asserts fewer row groups than batches.



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