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

xiong duan commented on CALCITE-6756:
-------------------------------------

Fixed in 
[ab8843d|https://github.com/apache/calcite/commit/ab8843d2f74bb0786a403012d66e9d3f8b66321d].Thanks
 for the review [~VAE] and [~mbudiu] .

> Preserving CAST of STRING operand in binary comparison for PostgreSQL
> ---------------------------------------------------------------------
>
>                 Key: CALCITE-6756
>                 URL: https://issues.apache.org/jira/browse/CALCITE-6756
>             Project: Calcite
>          Issue Type: Bug
>            Reporter: xiong duan
>            Priority: Major
>              Labels: pull-request-available
>
> In Postgresql:
> {code:java}
> SELECT * FROM table where cast('10' as text)  = 1; // throw operator does not 
> exist: text = integer
> SELECT * FROM table where cast('10' as varchar)  = 1; // operator does not 
> exist: character varying = integer
> SELECT * FROM table where cast('10' as char)  = 1; //operator does not exist: 
> character = integer{code}
> So when generating Postgres SQL, we need to preserve the CAST of STRING.



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

Reply via email to