IN/NOT IN filters on identity-partitioned timestamp_ns columns fail or return wrong results
I maintainer di solito rispondono entro 1 giorno
@jiwen624 ci sta già lavorando.
Dal 24/10/2026.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 35/100
Direzione di ricerca
The bug sits in how IN and NOT IN predicates on identity-partitioned timestamp_ns columns are evaluated during scan planning, so start from the partition projection and predicate evaluation code in the Iceberg core scan path. Reproduce with the three cases in the issue (file2026 IN overflow, file1970 IN returning 0 files, notIn deleteFromRowFilter dropping file1970). Done means all three cases behave as the 'after' results and a regression test covers nanosecond values near 1970 and 2026.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Apache Iceberg version
1.12.0 (latest release)
Query engine
Other
Please describe the bug 🐞
On a v3 table with a timestamp_ns column ts partitioned by identity(ts), an IN or NOT IN filter with two or more values fails during scan planning:
table.newScan()
.filter(Expressions.in("ts", "2026-01-01T00:00:00.000000001", "2025-01-01T00:00:00.000000001"))
.planFiles();
// java.lang.ArithmeticException: long overflow
For timestamps near 1970-01-01 there is no error, but the results are wrong:
INskips files that contain matching rows.newDelete().deleteFromRowFilter(notIn(...))deletes files whose rows all match an excluded value.
Schema schema = new Schema(optional(1, "ts", Types.TimestampNanoType.withoutZone()));
PartitionSpec spec = PartitionSpec.builderFor(schema).identity("ts").build();
// format v3 table; each case appends one DataFile whose partition is set with
// PartitionData.set(0, DateTimeUtil.isoTimestampToNanos(<its ts>))
// file2026 partitioned at ts = 2026-01-01T00:00:00.000000001
table.newScan().filter(Expressions.in("ts",
"2026-01-01T00:00:00.000000001", "2025-01-01T00:00:00.000000001")).planFiles();
// before: ArithmeticException: long overflow after: 1 file
// file1970 partitioned at ts = 1970-01-01T00:00:00.000001
table.newScan().filter(Expressions.in("ts",
"1970-01-01T00:00:00.000001", "1970-01-01T00:00:00.000002")).planFiles();
// before: 0 files after: 1 file
table.newDelete().deleteFromRowFilter(Expressions.notIn("ts",
"1970-01-01T00:00:00.000001", "1970-01-01T00:00:00.000002")).commit();
// before: file1970 is deleted (scan returns 0 files) after: file1970 is kept (1 file)
Willingness to contribute
- 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
- Lingua principale
- Java
- Stelle
- 9.4k
- Fork
- 3.7k
- Merge medio
- 2g 15h
- PR unite (30g)
- 169
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di apache/iceberg
-
Spark: Test INSERT targets with computed IDENTIFIER expressionsForse già presa @shivadarshan-devadiga l’ha presa 7 giorni fa. Apertaimprovement
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
[Core] TestAvroPartitionStatsHandler fails on Windows due to unclosed partition statistics scanForse già presa @Ankitkj1999 l’ha presa 9 giorni fa. Aperta
Difficoltà 1/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
Flink: JdbcLockFactory concurrent lock-table creation can fail with "table already exists" and restart the jobForse già presa @adiranjan25 l’ha presa 16 giorni fa. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
apache/iceberg#18797 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Core: TableMetadata.Builder allows adding encryption keys to v1/v2 tablesForse già presa @yusufyildiz34 l’ha presa 29 giorni fa. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
apache/iceberg#18632 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Kafka: Filter empty strings and whitespace in IcebergSinkConfig stringToListForse già presa @mohamed-elbrik l’ha presa 34 giorni fa. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di apache/iceberg
Issue simili
-
documentation
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
erkamyaman/rust-anything#371 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 80/100
open-telemetry/opentelemetry-java-instrumentation#21429 ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement lane:backlog
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
Sanne/incus-spawn#2544 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 80/100
speakeasy-api/speakeasy#2159 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
apache/flink-agents#1440 ·
I maintainer di solito rispondono entro 2 giorni