wangyum opened a new pull request, #16058:
URL: https://github.com/apache/iceberg/pull/16058
## Why
`CALL ... expire_snapshots` should support function-based timestamp
arguments (for example, `current_timestamp()`) and have explicit test coverage
for interval subtraction, SQL case-insensitivity, and unsupported interval
forms across Spark versions.
## What Changed
### Spark 3.4 / 3.5
- Extended Iceberg SQL extension grammar to allow function-call expressions
in CALL arguments with optional interval subtraction:
- `functionCallExpression (MINUS intervalLiteral)?`
- Added `INTERVAL` token/non-reserved handling in the extension grammar.
- Added parser coverage in `TestCallStatementParser` for:
- `current_timestamp()`
- `current_timestamp() - INTERVAL 2 DAYS`
- mixed-case SQL + lowercase interval usage
- negative parser boundaries for unsupported interval forms
- Added procedure coverage in `TestExpireSnapshotsProcedure` for:
- `current_timestamp()` positive path
- `current_timestamp() - INTERVAL 2 DAYS` positive path
- mixed-case/lowercase SQL positive path
### Spark 4.0 / 4.1
- Added procedure coverage in `TestExpireSnapshotsProcedure` for:
- `current_timestamp()` positive path
- mixed-case SQL + function-call positive path
- interval subtraction and unsupported interval forms as negative cases
- Added a helper assertion to validate unsupported `older_than` expression
failures consistently.
- Kept extension grammar changes aligned with 3.x for cross-version parity.
Closes #16057.
--
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]