weimingdiit commented on code in PR #2424:
URL: https://github.com/apache/auron/pull/2424#discussion_r3655571425
##########
native-engine/datafusion-ext-plans/src/common/row_null_checker.rs:
##########
@@ -52,15 +60,32 @@ impl RowNullChecker {
/// - `false` bits indicate rows that contain at least one null value
/// - `true` bits indicate rows where all fields are non-null
pub fn has_nulls(&self, rows: &Rows) -> NullBuffer {
- // Create NullBuffer from the collected bits
- NullBuffer::from_iter((0..rows.num_rows()).map(|row_index| {
- let row_data = rows.row(row_index);
- // Check if this row has any null values
- let has_null = self.has_null(row_data.as_ref());
- // NullBuffer uses true for valid (non-null) and false for null
- // So we need to invert the result since has_null returns true for
"has nulls"
- !has_null
- }))
+ let parser = self.row_converter.parser();
+ let parsed_rows = rows
+ .iter()
+ .map(|row| parser.parse(row.data()))
+ .collect::<Vec<_>>();
+ let key_columns = self
+ .row_converter
+ .convert_rows(parsed_rows)
+ .expect("failed to decode row data in RowNullChecker");
Review Comment:
Agreed. Re-parsing row bytes with RowParser is not the right ownership model
and does not fully avoid Arrow panics either.
I changed the key-row pipeline to carry the RowConverter that produced each
Rows value. RowNullChecker now uses that producer converter directly for the
complex decoded path via convert_rows(rows.iter()), so Arrow's RowConverter
identity check remains meaningful and we avoid the parse() round-trip.
--
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]