You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@calcite.apache.org by "Bruno Volpato (Jira)" <ji...@apache.org> on 2026/09/24 01:58:00 UTC
[jira] [Created] (CALCITE-7818) Druid interval extraction drops rows for mixed OR predicates
Bruno Volpato created CALCITE-7818:
--------------------------------------
Summary: Druid interval extraction drops rows for mixed OR predicates
Key: CALCITE-7818
URL: https://issues.apache.org/jira/browse/CALCITE-7818
Project: Calcite
Issue Type: Bug
Reporter: Bruno Volpato
A Druid filter can combine a timestamp range with a predicate that cannot be represented as an interval. For example:
`"timestamp" < TIMESTAMP '2020-01-01 00:00:00' OR EXTRACT(DAY FROM "timestamp") = 15`
A row dated `2021-01-15` satisfies the second branch. Interval extraction currently keeps only the first branch's range. The filter rule treats those partial intervals as the full condition and removes the filter, so the row is lost.
Expected: retain the full OR predicate and return the matching row.
Actual: restrict the scan to dates before 2020 and drop the filter.
Interval extraction should stop when any OR branch cannot be represented as an interval.
Fix and regression tests: https://github.com/apache/calcite/pull/5243
--
This message was sent by Atlassian Jira
(v8.20.10#820010)