[
https://issues.apache.org/jira/browse/DRILL-4642?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15262479#comment-15262479
]
ASF GitHub Bot commented on DRILL-4642:
---------------------------------------
GitHub user hsuanyi opened a pull request:
https://github.com/apache/drill/pull/489
DRILL-4642: Remove customized RexBuilder.ensureType()
Bump calcite version to 1.4.0-drill-r12
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/hsuanyi/incubator-drill DRILL-4642
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/drill/pull/489.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #489
----
commit 163e7b713fbb1a21603f4c1de77acd0481088158
Author: Hsuan-Yi Chu <[email protected]>
Date: 2016-04-25T22:09:01Z
DRILL-4642: Remove customized RexBuilder.ensureType()
Bump calcite version to 1.4.0-drill-r12
----
> Let RexBuilder.ensureType() mechanism take place during Rex conversion.
> -----------------------------------------------------------------------
>
> Key: DRILL-4642
> URL: https://issues.apache.org/jira/browse/DRILL-4642
> Project: Apache Drill
> Issue Type: Bug
> Components: Query Planning & Optimization
> Reporter: Sean Hsuan-Yi Chu
> Assignee: Sean Hsuan-Yi Chu
> Fix For: 1.7.0
>
>
> In DRILL-4372, the logic of ensuring same type is removed since, in some case
> such as below, undesirable cast function will be added and cause failure.
> {code}
> SELECT *
> FROM T
> WHERE (cast(col1 as timestamp) - to_timestamp(col2,'YYYY-MM-dd HH:mm:ss') <
> interval 'X XX:XX:XX' day to second)
> {code}
> The fundamental reason for this behavior roots in Drill-Calcite [1], where
> SqlNode WHERE is expanded to a new object but is not passed into validation
> step.
> [1]
> https://github.com/mapr/incubator-calcite/blob/DrillCalcite1.4.0-mapr-1.4.0/core/src/main/java/org/apache/calcite/sql/validate/SqlValidatorImpl.java#L3362
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)