[jira] [Updated] (CALCITE-3318) Preserving CAST of STRING operands in comparison operator

2019-09-05 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/CALCITE-3318?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

ASF GitHub Bot updated CALCITE-3318:

Labels: pull-request-available  (was: )

> Preserving CAST of STRING operands in comparison operator
> -
>
> Key: CALCITE-3318
> URL: https://issues.apache.org/jira/browse/CALCITE-3318
> Project: Calcite
>  Issue Type: Bug
>  Components: core
>Affects Versions: 1.20.0
>Reporter: Soma Mondal
>Priority: Major
>  Labels: pull-request-available
>
> We have a REL which has this information
>  select * from employee where employee_id = cast('12' as float);
> but Calcite removes the CAST from the STRING literal('12' in our case). 
>  select * from employee where employee_id = '12';
> There are dialects which needs explicit casting in the above case and we need 
> to maintain the CAST in our dialect.
> Calcite removes the cast in SqlImplementor's stripCastFromString() method.
> I'm thinking of having the dialect intercept this and decide whether or not 
> to remove the cast.
>  
> I have created a PR [https://github.com/apache/calcite/pull/1437]



--
This message was sent by Atlassian Jira
(v8.3.2#803003)


[jira] [Updated] (CALCITE-3318) Preserving CAST of STRING operands in comparison operator

2019-09-03 Thread Soma Mondal (Jira)


 [ 
https://issues.apache.org/jira/browse/CALCITE-3318?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Soma Mondal updated CALCITE-3318:
-
Description: 
We have a REL which has this information
 select * from employee where employee_id = cast('12' as float);

but Calcite removes the CAST from the STRING literal('12' in our case). 
 select * from employee where employee_id = '12';

There are dialects which needs explicit casting in the above case and we need 
to maintain the CAST in our dialect.

Calcite removes the cast in SqlImplementor's stripCastFromString() method.

I'm thinking of having the dialect intercept this and decide whether or not to 
remove the cast.

 

I have created a PR [https://github.com/apache/calcite/pull/1437]

  was:
We have a REL which has this information
select * from employee where employee_id = cast('12' as float);

but Calcite removes the CAST from the STRING literal('12' in our case). 
select * from employee where employee_id = '12';

There are dialects which needs explicit casting in the above case and we need 
to maintain the CAST in our dialect.

Calcite removes the cast in SqlImplementor's stripCastFromString() method.

I'm thinking of having the dialect intercept this and decide whether or not to 
remove the cast.


> Preserving CAST of STRING operands in comparison operator
> -
>
> Key: CALCITE-3318
> URL: https://issues.apache.org/jira/browse/CALCITE-3318
> Project: Calcite
>  Issue Type: Bug
>  Components: core
>Affects Versions: 1.20.0
>Reporter: Soma Mondal
>Priority: Major
>
> We have a REL which has this information
>  select * from employee where employee_id = cast('12' as float);
> but Calcite removes the CAST from the STRING literal('12' in our case). 
>  select * from employee where employee_id = '12';
> There are dialects which needs explicit casting in the above case and we need 
> to maintain the CAST in our dialect.
> Calcite removes the cast in SqlImplementor's stripCastFromString() method.
> I'm thinking of having the dialect intercept this and decide whether or not 
> to remove the cast.
>  
> I have created a PR [https://github.com/apache/calcite/pull/1437]



--
This message was sent by Atlassian Jira
(v8.3.2#803003)