JingsongLi commented on code in PR #1512:
URL: https://github.com/apache/paimon-rust/pull/1512#discussion_r4665297214


##########
crates/paimon/src/arrow/format/mosaic.rs:
##########
@@ -867,17 +867,15 @@ fn take_row_slices(
     slices: Option<&[(usize, usize)]>,
     target_schema: &SchemaRef,
 ) -> crate::Result<RecordBatch> {
+    let batch = ensure_schema(batch, target_schema)?;

Review Comment:
   [P2] Validate the projected schema after applying the row selection. This 
now validates the entire physical row group. On a real Mosaic file with 
nullable values [NULL, 42, NULL], a non-nullable projection selecting only 
position 1 fails because the discarded rows have nulls. The old single-range 
path applied the schema to the slice and would return 42. Align each selected 
slice before concatenating the slices, and retain the empty-selection handling.



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

Reply via email to