You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Julian Hyde (JIRA)" <ji...@apache.org> on 2017/02/21 22:20:44 UTC
[jira] [Commented] (CALCITE-1601) DateRangeRules loses OR filters
[ https://issues.apache.org/jira/browse/CALCITE-1601?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15876863#comment-15876863 ]
Julian Hyde commented on CALCITE-1601:
--------------------------------------
[~gian], I have a tentative fix: can you please review https://github.com/julianhyde/calcite/commit/c46b3ffb74ec588c72a1a782253e24b5564fd0ee.
> DateRangeRules loses OR filters
> -------------------------------
>
> Key: CALCITE-1601
> URL: https://issues.apache.org/jira/browse/CALCITE-1601
> Project: Calcite
> Issue Type: Bug
> Components: core
> Affects Versions: 1.11.0
> Reporter: Gian Merlino
> Assignee: Julian Hyde
> Fix For: 1.12.0
>
>
> I'm not sure why, but DateRangeRules can lose some filters. For example in this query:
> {code}
> SELECT COUNT(*) FROM druid.foo WHERE EXTRACT(YEAR FROM __time) = 2000 AND EXTRACT(MONTH FROM __time) IN (2, 3, 5)
> {code}
> The filter gets resolved to __time >= 2000-02-01 and __time < 2000-03-01, losing the months "3" and "5". Removing DateRangeRules.FILTER_INSTANCE from the planner's rule set stops this from happening.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)