Gerald Bonfiglio
11/06/2026, 2:12 PMSELECT activity_name, derived FROM activity WHERE derived = false does NOT include rows where derived is null. When using the multi stage engine, also with null handling enabled, this same query returns rows where derived is EITHER false OR null.
Is this expected? Seems like a bug to us.Mayank
Gerald Bonfiglio
11/06/2026, 2:55 PMSELECT activity_name, derived FROM activity WHERE derived = false
But this query DOES include nulls:
SELECT activity_name, derived FROM activity WHERE NOT derived
I’ve been using Claude to analyze this, and it recommended reporting this as a bug, in case this is helpful:
For a Pinot bug report
• Version: 1.5.1.
• Reproduction: column-based null handling, a nullable BOOLEAN column with an inverted index, SET enableNullHandling=true; SELECT count(*) FROM t WHERE NOT col.
• Symptom: null rows are counted.
• Cause: NotFilterOperator.getNumMatchingDocs() and getBitmaps() invert over all documents without removing nulls, and FilterOperatorUtils.getNotFilterOperator returns MatchAll for an empty child without removing nulls. Multistage hits this for ordinary col = false filters because Calcite simplifies them to NOT col.Gerald Bonfiglio
11/06/2026, 3:12 PMFilterOperatorUtils.getNotFilterOperator, and in `NotFilterOperator`’s getTrues, getNumMatchingDocs and getBitmaps, remove the null bitmap when null handling is enabled. This needs a patched Pinot server or an upstream fix, so it’s the long-term route, not a quick one.Xiang Fu