Revanth14 opened a new pull request, #2216:
URL: https://github.com/apache/iceberg-go/pull/2216
## Problem
Follow-ups from the #2019 and #2020 reviews on
`TestScanPlanningLocalRemoteParity`, part of the #1178:
- The absolute delete and residual checks ran only under `if tc.name ==
"partition"`; every other case relied on local/remote agreement alone, so both
sides being wrong in the same way would pass.
- That block called `task.Residual.Equals(...)`, which panics on a nil
residual instead of failing.
- No case used a transform term, so the parity matrix never exercised
`BoundTransform` serialization of a nested reference.
- The fake server wrote `"partition": []any{file.Partition()[1000]}`,
hard-coding the fixture's single partition field.
## Fix
Test-only, all in `catalog/rest/scan_planning_parity_test.go`:
- `wantDeletes` and `wantResidual` move onto the case struct and are
asserted for every case. Rows reading snapshot 20 expect one position and one
equality delete per task; rows reading snapshot 10 expect none. `partition`
keeps its `AlwaysTrue` residual, now via `assert.Equal`.
- New `nested transform` case: `bucket[16](nested.text) == 3`.
- The fake server encodes the wire partition positionally, in the file's
spec-field order, which is how the decoder reads it.
## Testing
`go test -race ./catalog/rest/...` passes. Removing the `referenceName()`
fallback in `BoundTransform.MarshalJSON` fails `nested transform` in all three
server modes, and flipping a row's `wantDeletes` fails that row. The partition
encoding change is not observable with the fixture's one-field spec.
## Context
Left out: making the fake server honor `case-sensitive` (needs an exported
case-aware `ParseExpr`), lowercase hex bounds (pending apache/iceberg#18352),
and extra `splitRemoteScanTasks` cases (already covered).
--
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]