You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Swapnil Gujarathi (Jira)" <ji...@apache.org> on 2022/02/25 12:33:00 UTC

[jira] [Closed] (CALCITE-5001) Error for sql query with non-ascii characters with Oracle db

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

Swapnil Gujarathi closed CALCITE-5001.
--------------------------------------
    Resolution: Feedback Received

Closing this issue for now since I have received feedback about the things to be tried out on my side. I will check it when I get some time.

Thanks for the direction

> Error for sql query with non-ascii characters with Oracle db
> ------------------------------------------------------------
>
>                 Key: CALCITE-5001
>                 URL: https://issues.apache.org/jira/browse/CALCITE-5001
>             Project: Calcite
>          Issue Type: Bug
>    Affects Versions: 1.28.0
>            Reporter: Swapnil Gujarathi
>            Priority: Major
>
> Hi, 
> I am using a calcite-core.jar version 1.28. I am facing an issue with a sql query targeted for Oracle database (12.1.0.2.0). Example query is:
> *select * from sample where column1 in ('héb', 'sio', 'dép');*  
> Query transformed and executed by Calcite:
>  *select * from sample where column1 in (u&'h\00e9b', 'sio', u&'d\00e9p')* 
> which gives sql error as: ORA-00907: missing right parenthesis. 
> I tried providing a system property calcite.default.charset=UTF-8 but it didn't help. I tried to debug the code and found that method [https://github.com/apache/calcite/blob/1d4f1b394bfdba03c5538017e12ab2431b137ca9/core/src/main/java/org/apache/calcite/sql/SqlDialect.java#L575] is causing this encoding which gets invoked from [https://github.com/apache/calcite/blob/1d4f1b394bfdba03c5538017e12ab2431b137ca9/core/src/main/java/org/apache/calcite/sql/SqlDialect.java#L425] . 
> In the older version of calcite-core 1.15, the same query used to work. I have no idea since which version of calcite-core, it started failing.  



--
This message was sent by Atlassian Jira
(v8.20.1#820001)