[
https://issues.apache.org/jira/browse/CALCITE-1769?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15999174#comment-15999174
]
slim bouguerra commented on CALCITE-1769:
-----------------------------------------
[~jcamachorodriguez] currently your example will be folded by calcite and will
get a literal with value 5, and even without this patch it will be pushed.
To explain more this is how the rel nodes looks from the hive side
{code}
<(CAST($5):DOUBLE, CAST(5):DOUBLE) case page < 5
<(CAST($5):DOUBLE, 5.0E0) case page < cast( 5.5 as integer)
<(CAST($5):DOUBLE, 5.0E0) case page < cast( '5.5' as integer)
<(CAST($5):DOUBLE, 5.5E0) case page < 5.5
{code}
this means we are already pushing all the cast beside the case `page < 5` which
i guess should be treated like the other cases.
> Push Filters down to druid when there a cast to numeric
> -------------------------------------------------------
>
> Key: CALCITE-1769
> URL: https://issues.apache.org/jira/browse/CALCITE-1769
> Project: Calcite
> Issue Type: Bug
> Components: druid
> Reporter: slim bouguerra
> Assignee: Julian Hyde
> Fix For: 1.13.0
>
>
> Currently if we have cast to numeric over literal filter will not get pushed.
> For instance query like {code}SELECT page from druid_table_1 WHERE page < 5
> group by page {code} from hive will introduce a cast over `5`.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)