apache/iceberg · error · IllegalArgumentException
No timestamps can match filters:
Error message
No timestamps can match filters:
What it means
ScanSummary.timestampRange throws IllegalArgumentException when the computed max timestamp is less than the min timestamp, meaning no timestamps could satisfy the combination of time filters (an empty/contradictory range).
Solutions
- Validate that the requested start timestamp is <= end timestamp before calling the summary API.
- Check timestamp units (milliseconds vs seconds) and timezone handling in the caller.
- Catch IllegalArgumentException and return an empty result for the impossible range.
Example fix
// before long start = Instant.now().getEpochSecond(); // seconds long end = System.currentTimeMillis(); // millis // after long start = System.currentTimeMillis() - TimeUnit.DAYS.toMillis(1); long end = System.currentTimeMillis();
Defensive patterns
Strategy: validation
Validate before calling
if (endTs < startTs) { throw new IllegalArgumentException("start must be <= end"); } Try / catch
try { range = ScanSummary.timestampRange(filters); } catch (IllegalArgumentException e) { /* return empty summary for empty range */ } Prevention
- Validate start <= end before building filters
- Use consistent timestamp units (milliseconds)
- Normalize timezones before constructing filters
When it happens
Trigger: Supplying contradictory time filters, e.g. an upper bound (lt/lte) smaller than a lower bound (gt/gte), or an eq filter that conflicts with another bound.
Common situations: UI/dashboard passing start > end due to timezone or unit mistakes (seconds vs millis); programmatic filter combination producing an empty range.
Understand the failure class
Background: "Must be a positive integer", "Invalid value", "Unsupported": the invalid-argument-value error family, when a library rejects the value you pass — this error's family across 35 libraries.
Related errors
- Cannot satisfy time filters: time range may include expired…
- Cannot filter timestamps using predicate:
- Too many matching keys: more than
- ALTER VIEW AS is not supported. Use CREATE OR REPLACE VIEW…
- apply(value) is deprecated, use bind(Type).apply(value)
AI-assisted analysis of apache/iceberg@86d9c8fc54 (2026-09-12).
Data as JSON: /api/errors/8e46c4f95ef6dd9c.
Report an issue: GitHub.
Appendix: source
Thrown at core/src/main/java/org/apache/iceberg/ScanSummary.java:426
minTimestamp = value;
}
break;
case EQ:
if (value < maxTimestamp) {
maxTimestamp = value;
}
if (value > minTimestamp) {
minTimestamp = value;
}
break;
default:
throw new UnsupportedOperationException(
"Cannot filter timestamps using predicate: " + pred);
}
}
if (maxTimestamp < minTimestamp) {
throw new IllegalArgumentException(
"No timestamps can match filters: " + Joiner.on(", ").join(timeFilters));
}
return Pair.of(minTimestamp, maxTimestamp);
}
}
View on GitHub (pinned to 86d9c8fc54)