[
https://issues.apache.org/jira/browse/CALCITE-2829?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16803276#comment-16803276
]
Juhwan Kim commented on CALCITE-2829:
-------------------------------------
Thanks for the suggestion. Initially, I enforced to give a consistent type when
we create a comparison. However, since that involves simplifyCast call which
calls reduce function, it seemed like doing it every time when we create a
comparison gives some performance loss. "testPullUpPredicatesForExprsItr" test
started failing after the change. In the recent patch, I made a new method in
Comparison for that functionality and used it lazily, and it seems to be
working now.
> 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
> Assignee: Juhwan Kim
> Priority: Major
> Labels: pull-request-available
> Time Spent: 20m
> 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)