hudi-agent commented on code in PR #20295:
URL: https://github.com/apache/hudi/pull/20295#discussion_r4258784669


##########
hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/source/prune/ColumnStatsProbe.java:
##########
@@ -60,6 +60,14 @@ public class ColumnStatsProbe implements Serializable {
    * @return true if the index row should be considered as a candidate
    */
   public boolean test(RowData indexRow, RowType.RowField[] queryFields) {
+    // Retain candidates with missing column statistics rather than treating 
unknown values as nulls.
+    for (int i = 0; i < queryFields.length; i++) {
+      // The row starts with file name and value count, followed by (min, max, 
null count) per column.
+      // Skip the two leading fields and i triples, then use offset 2 to check 
this column's null count.
+      if (indexRow.isNullAt(2 + i * 3 + 2)) {

Review Comment:
   🤖 nit: could you move `2 + i * 3 + 2` into a small helper like 
`nullCountOrdinal(i)`, built on named constants for the 2 leading fields and 3 
fields per column, so it stays in sync with the layout `convertColumnStats` 
reads?
   
   <sub><i>⚠️ AI-generated; verify before applying. React 👍/👎 to flag 
quality.</i></sub>



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