Revanth14 opened a new pull request, #18472:
URL: https://github.com/apache/iceberg/pull/18472
Fixes #18471.
## Problem
`residual-filter` is optional on `FileScanTask`, and the spec says the
client must then produce the residual or use the original filter.
`RESTFileScanTaskParser` instead built the task's `ResidualEvaluator` from a
null filter, so `residual()` threw a NullPointerException for partitioned specs
and returned null for unpartitioned ones.
## Fix
`RESTTableScan` passes its filter to the scan response deserializers as a
`scanFilter` injectable, alongside `specsById` and `caseSensitive`. A task
without `residual-filter` gets its residual from that filter and the task's
partition, as local planning computes it. An explicit `residual-filter` still
takes precedence.
`TableScanResponseParser.parseFileScanTasks` and the `fromJson(JsonNode,
...)` methods of the plan, fetch-planning-result and fetch-scan-tasks response
parsers gain overloads taking the scan filter; the existing signatures are
unchanged.
`scanFilter` is required like the other injectables: Jackson fails on any
missing injectable, so code that deserializes scan responses with its own
injectables must now supply it.
## Tests
- `TestTableScanResponseParser`: a partitioned task without
`residual-filter` gets the residual derived from the scan filter (NPE before
this change), and an explicit residual takes precedence.
- Existing `TestRESTScanPlanning` cases now deserialize through the
required `scanFilter`, covering the `RESTTableScan` wiring.
--
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]