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

Sergey Nuyanzin commented on CALCITE-7562:
------------------------------------------

{quote}
 I never really understood what it means to "disable type coercion".
{quote}

sorry for not being explicit enough
I was referring to {{SqlValidator#withTypeCoercionEnabled}}. 

{quote}
What is the result supposed to be if coercion is disabled?
{quote}
 In both cases I expect 
{noformat}
  LogicalFilter(condition=[OR(=($1, CAST('2000-01-01'):DATE NOT NULL), =($1, 
CAST('2002-02-02'):DATE NOT NULL))])
{noformat}

The problem is that in case of disabled type coercion 
({{SqlValidator#withTypeCoercion(false)}})
{{CAST}} is missed now
{noformat}
  LogicalFilter(condition=[OR(=($1, '2000-01-01'), =($1, '2002-02-02'))])
{noformat}

> SqlToRel misses CAST in case IN expression without type coercion
> ----------------------------------------------------------------
>
>                 Key: CALCITE-7562
>                 URL: https://issues.apache.org/jira/browse/CALCITE-7562
>             Project: Calcite
>          Issue Type: Bug
>          Components: core
>            Reporter: Sergey Nuyanzin
>            Assignee: Sergey Nuyanzin
>            Priority: Major
>              Labels: pull-request-available
>
> In CALCITE-6435 there was removed {{ensureType}} while handling {{IN}} 
> expressions.
> The problem appears when there are types which might be coerced with default 
> settings however type coercion is disabled.
> For instance
> {code:sql}
> date_1 in ('2000-01-01', '2002-02-02')
> {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to