{"record":{"id":"8e46c4f95ef6dd9c","repo":"apache/iceberg","slug":"no-timestamps-can-match-filters","errorCode":null,"errorMessage":"No timestamps can match filters: ","messagePattern":"No timestamps can match filters: ","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"core/src/main/java/org/apache/iceberg/ScanSummary.java","lineNumber":426,"sourceCode":"            minTimestamp = value;\n          }\n          break;\n        case EQ:\n          if (value < maxTimestamp) {\n            maxTimestamp = value;\n          }\n          if (value > minTimestamp) {\n            minTimestamp = value;\n          }\n          break;\n        default:\n          throw new UnsupportedOperationException(\n              \"Cannot filter timestamps using predicate: \" + pred);\n      }\n    }\n\n    if (maxTimestamp < minTimestamp) {\n      throw new IllegalArgumentException(\n          \"No timestamps can match filters: \" + Joiner.on(\", \").join(timeFilters));\n    }\n\n    return Pair.of(minTimestamp, maxTimestamp);\n  }\n}\n","sourceCodeStart":408,"sourceCodeEnd":433,"githubUrl":"https://github.com/apache/iceberg/blob/86d9c8fc543e7c56c9f624eb725f76c9baff9570/core/src/main/java/org/apache/iceberg/ScanSummary.java#L408-L433","documentation":"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).","triggerScenarios":"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.","commonSituations":"UI/dashboard passing start > end due to timezone or unit mistakes (seconds vs millis); programmatic filter combination producing an empty 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."],"exampleFix":"// before\nlong start = Instant.now().getEpochSecond(); // seconds\nlong end = System.currentTimeMillis(); // millis\n// after\nlong start = System.currentTimeMillis() - TimeUnit.DAYS.toMillis(1);\nlong end = System.currentTimeMillis();","handlingStrategy":"validation","validationCode":"if (endTs < startTs) { throw new IllegalArgumentException(\"start must be <= end\"); }","typeGuard":null,"tryCatchPattern":"try { range = ScanSummary.timestampRange(filters); } catch (IllegalArgumentException e) { /* return empty summary for empty range */ }","preventionTips":["Validate start <= end before building filters","Use consistent timestamp units (milliseconds)","Normalize timezones before constructing filters"],"tags":["iceberg","scan-summary","time-range","empty-interval"],"backgroundTag":"invalid-argument-value","analyzedSha":"86d9c8fc543e7c56c9f624eb725f76c9baff9570","analyzedAt":"2026-09-12T00:46:39.097Z","contentChangedAt":"2026-09-12T00:46:39.097Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}