[core] Negate predicates like Java so NULL rows stay excluded #1145
All Vouch review confidence checks passed
Residual risk 0.21 = Change Risk (0.40) × (1 − Review Confidence (0.47)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.40 · 300 lines diff across 3 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Shallow Review Depth
shallow_review_depth
0.344
Diff Size
diff_size
0.341
Real PR Conversation Timeline
1 comments
"Review active on #1145"
general
weight: 0.35
JeonDaehong
Purpose
Linked issue: close #1143
Predicate::negatewrapped leaves inNot, andNotwas evaluated as!inner, so a NULL input madeNOT(p = 'a')true. Reads returned those rows anddelete_by_predicatedeleted them. Java flips the leaf instead (Equal.negate()isNotEqual), which is false for NULL.Brief change log
Predicate::negatenow does what JavaPredicate.negatedoes: flip the leaf operator (=/!=,</>=,<=/>,IS NULL/IS NOT NULL,IN/NOT IN,BETWEEN/NOT BETWEEN) and push through AND/OR with De Morgan.scan.rsnow matches the new shape of the negated filter (x < lo OR x > hiinstead ofNOT(x >= lo AND x <= hi)).STARTS_WITH,ENDS_WITH,CONTAINS,LIKE, array ops) stay asNot(leaf).eval_rowand the residual row filter now return false for those when the input is NULL, same as JavaNotStartsWith/NotLike/... .Tests
negated_predicates_keep_null_rowsandnegated_data_predicate_keeps_null_rowscover the cases from the issue on the partition and DV delete paths and on reads. Both fail on main.negateand for NULL evaluation ineval_rowand the residual filter.-
test_file_index_nested_not_with_added_column_falls_backnow expects[1]instead of[1, 2].addedis NULL in the old file, so for id 2 the predicate isNOT(true AND unknown). Java drops that row too.-
test_not/test_display_not, three DataFusion pushdown tests, the global index exactness test and the stats fail-open test asserted the oldNotshape. The last two now buildPredicate::Notdirectly so they keep testing theNotbranch.fmt and clippy (1.98.0,
-D warnings) pass.cargo test --no-fail-fast -p paimon -p paimon-datafusion -p paimon-c: 5804 passed. The 39 failures are allTableNotExist/ table not found for the fixture tables CI provisions, plus 2 that need the lumina library. The ones I checked fail the same way on main.Not covered here: a
Predicate::Notaround AND/OR built by hand (not throughnegate) is still evaluated as!inner. Nothing in core builds that today, but I can add it if you'd like.API and Format
No API change.
Predicate::negatereturns a different but equivalent tree for non-NULL inputs.Documentation
None.