[
https://issues.apache.org/jira/browse/CALCITE-1769?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15998815#comment-15998815
]
Jesus Camacho Rodriguez commented on CALCITE-1769:
--------------------------------------------------
You are right that currently the left hand side CAST will not be pushed, as it
does not pass the _isValidCast_ check.
Let's simplify the example to:
{code}
a = CAST(5.2 AS INTEGER)
{code}
where _a_ is an INTEGER.
The method you changed (_isValidCast_) returns whether a CAST is valid.
However, I do not see special handling of the CAST later at translation time
(L960 in DruidQuery). Thus, it is not handled at the Calcite layer. Will Druid
be handling the truncation?
> 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)