adiranjan25 commented on issue #18701:
URL: https://github.com/apache/iceberg/issues/18701#issuecomment-7355653005
Following up on my earlier comment, I independently reproduced both the
residual-evaluation inconsistency and the resulting metadata-delete behavior
against the latest main commit I fetched,
`4054539d4a4629e8c5666e87332ea49cec76abae`.
### 1. Residual evaluator reproduction
I created a focused regression test using an optional integer column with
identity partitioning and a NULL partition value.
For the predicate `Expressions.lessThan("part", 2)`:
- Expected under SQL filtering semantics: `FALSE`
- Actual residual: `TRUE`
All six parameterized test executions reproduced the inconsistency.
### 2. Metadata-delete reproduction
I also added a regression test in `TestDeleteFiles` using an identity
partition field on the optional string column `data`, with three synthetic
data-file metadata entries:
- `data = "a"`
- `data = "z"`
- `data = NULL`
I executed:
```java
table.newDelete()
.deleteFromRowFilter(Expressions.lessThan("data", "m"))
```
The expected removed-file list under SQL filtering semantics was:
```text
/path/to/matching-partition.parquet
```
However, the committed snapshot reported the following removed files:
```text
/path/to/null-partition.parquet
/path/to/matching-partition.parquet
```
The unexpected NULL-partition removal was reproduced across all six
combinations of:
- Iceberg format versions V1, V2, and V3
- Main branch and non-main branch
The existing `TestDeleteFiles` baseline passed before introducing the
diagnostic tests.
### 3. Technical implications
This demonstrates that the inconsistency is not limited to expression
evaluation: it can propagate into committed table metadata and remove a
NULL-partition data file from the logical table state.
The tests use synthetic file metadata and do not demonstrate physical object
deletion.
Given the potential data-correctness implications, I believe explicit
metadata-delete regression coverage would be valuable regardless of the
eventual decision on broader two-valued versus three-valued expression
semantics.
@Revanth14 @sdaberdaku — I have retained the reproducible tests and
validation results locally. No production code has been modified.
I would be happy to contribute the focused regression coverage, either as a
separate test contribution or as part of the existing implementation effort,
depending on maintainer preference.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]