Copilot commented on code in PR #2424:
URL: https://github.com/apache/auron/pull/2424#discussion_r3649500778


##########
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");
+
+        NullBuffer::from_iter(
+            (0..rows.num_rows())
+                .map(|row_index| key_columns.iter().all(|column| 
!column.is_null(row_index))),
+        )

Review Comment:
   `has_nulls` now panics on row decode failure via `expect(...)`. This code 
runs in the join stream path (e.g., StreamCursor) and a panic would abort the 
entire query process. Since the method signature can’t return a `Result`, 
handle `convert_rows` errors gracefully (e.g., fall back to the existing 
byte-level `has_null` path for each row, or another safe default) rather than 
crashing.



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