yangshangqing95 opened a new issue, #17749:
URL: https://github.com/apache/iceberg/issues/17749
### Apache Iceberg version
1.11.0 (latest release)
### Query engine
Flink
### Please describe the bug 🐞
## Description
ORC reads fail when a predicate is pushed down for `timestamp_ns` or
`timestamptz_ns` columns because `ExpressionToSearchArgument` does not handle
`TIMESTAMP_NANO`.
### Reproduction
```sql
CREATE TABLE orc_timestamp_ns_bug (
id BIGINT,
ts_ns TIMESTAMP(9)
) WITH (
'format-version' = '3',
'write.format.default' = 'orc'
);
INSERT INTO orc_timestamp_ns_bug VALUES
(1, TIMESTAMP '2025-12-31 23:59:59.999999999'),
(2, TIMESTAMP '2026-01-01 00:00:00.000000001');
SELECT *
FROM orc_timestamp_ns_bug
WHERE ts_ns IS NOT NULL;
```
The query fails with:
```text
java.lang.UnsupportedOperationException:
Type timestamp_ns not supported in ORC SearchArguments
```
### Expected behavior
The query should complete successfully and return both rows.
### Cause
`ExpressionToSearchArgument` does not map `TIMESTAMP_NANO` to an ORC
predicate type or convert nanosecond timestamp literals.
### Willingness to contribute
- [x] I can contribute a fix for this bug independently
- [ ] I would be willing to contribute a fix for this bug with guidance from
the Iceberg community
- [ ] I cannot contribute a fix for this bug at this time
--
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]