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

  1. Validate that the requested start timestamp is <= end timestamp before calling the summary API.
  2. Check timestamp units (milliseconds vs seconds) and timezone handling in the caller.
  3. 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

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


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)