You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Jacques Nadeau (JIRA)" <ji...@apache.org> on 2016/11/17 23:21:59 UTC
[jira] [Commented] (CALCITE-1417) In RelBuilder, simplify
"CAST(literal TO type)" to a literal when possible
[ https://issues.apache.org/jira/browse/CALCITE-1417?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15675115#comment-15675115 ]
Jacques Nadeau commented on CALCITE-1417:
-----------------------------------------
Adding to my comments above, this is a really unfortunate change:
https://github.com/apache/calcite/blob/master/core/src/main/java/org/apache/calcite/rex/RexUtil.java#L111
We just had to spend a bunch time debugging until we realized that this was happening. Please, please, please don't create this kind of technical debt. It is very hard to understand why something is failing.
> In RelBuilder, simplify "CAST(literal TO type)" to a literal when possible
> --------------------------------------------------------------------------
>
> Key: CALCITE-1417
> URL: https://issues.apache.org/jira/browse/CALCITE-1417
> Project: Calcite
> Issue Type: Bug
> Reporter: Julian Hyde
> Assignee: Julian Hyde
> Fix For: 1.11.0
>
>
> In CALCITE-1357 we added some logic (in {{DruidDateTimeUtils.leafToRanges}}) to recognize various combinations of literals, casts of literals and comparison operators, and I feel that logic would be simpler if we moved the logic into {{RexUtil}} and flattened the casts of literals to just plain literals. [~jcamachorodriguez], what do you think?
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)