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

Juhwan Kim commented on CALCITE-2829:
-------------------------------------

Hello [~zabetak], I hit this error when I have filter like this:

 "WHERE d = '2018-01-01 01:23:45' AND d > '2018-01-01 01:23:45'".

First one is converted to NlsString while the second one is converted to 
TimestampString. So, CastException is thrown while simplifying the range. 

I posted a PR for this(https://github.com/apache/calcite/pull/1131). Could you 
review the change? 

> Fix RexSimplify#processRange cast issue
> ---------------------------------------
>
>                 Key: CALCITE-2829
>                 URL: https://issues.apache.org/jira/browse/CALCITE-2829
>             Project: Calcite
>          Issue Type: Bug
>            Reporter: Siddharth Teotia
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> Range expressions like <ts> = 'literal' AND <ts> < 'literal' trigger 
> ClassCastException as literal are implicitly casted differently between =/<> 
> operators and other comparison operators. Apply the same casting rules for 
> comparison to =/<> calls when processing ranges, so that all the terms have 
> the same type for literals.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to