[ 
https://issues.apache.org/jira/browse/DRILL-4642?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16506433#comment-16506433
 ] 

ASF GitHub Bot commented on DRILL-4642:
---------------------------------------

ilooner commented on issue #489: DRILL-4642: Remove customized 
RexBuilder.ensureType()
URL: https://github.com/apache/drill/pull/489#issuecomment-395851550
 
 
   @hsuanyi Drill is currently on calcite version 1.16.0-drill-r3 is this 
change still applicable? If so could you rebase?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> 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: Jinfeng Ni
>            Priority: Major
>             Fix For: Future
>
>
> 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
(v7.6.3#76005)

Reply via email to