You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@calcite.apache.org by Kaushal Kishore <ka...@gmail.com> on 2024/12/29 11:10:09 UTC

In clause having issues with string type

Hello Team,

schema of the table below:

create table employee (empno int, department NVARCHAR); means list of string.

now i am using select * from employee where department in (‘CSE’);
after this statement execute we are getting below error - any help will be appreciated.

I am getting IN clause error type while using string type, are calcite support only int type only ?
org.apache.calcite.sql.validate.SqlValidatorException: Values passed to IN operator must have compatible types


Many Thanks
Kaushal Sengar

Re: In clause having issues with string type

Posted by Julian Hyde <jh...@gmail.com>.
I see NVARCHAR, which is a Microsoft SQL Server variant of string that uses wide characters. I didn’t even know that Calcite supports NVARCHAR. But Calcite has always had problems correctly converting between CHAR and VARCHAR, and I expect NVARCHAR is similar.


> On Jan 7, 2025, at 9:49 AM, Mihai Budiu <mb...@gmail.com> wrote:
> 
> Calcite surely supports strings.
> 
> Can you give more details about what you are exactly doing to get this error?
> If you can give a test we can run it's best.
> 
> Mihai
> 
> ________________________________
> From: Kaushal Kishore <ka...@gmail.com>
> Sent: Sunday, December 29, 2024 3:10 AM
> To: dev@calcite.apache.org <de...@calcite.apache.org>
> Subject: In clause having issues with string type
> 
> Hello Team,
> 
> schema of the table below:
> 
> create table employee (empno int, department NVARCHAR); means list of string.
> 
> now i am using select * from employee where department in (‘CSE’);
> after this statement execute we are getting below error - any help will be appreciated.
> 
> I am getting IN clause error type while using string type, are calcite support only int type only ?
> org.apache.calcite.sql.validate.SqlValidatorException: Values passed to IN operator must have compatible types
> 
> 
> Many Thanks
> Kaushal Sengar


Re: In clause having issues with string type

Posted by Mihai Budiu <mb...@gmail.com>.
Calcite surely supports strings.

Can you give more details about what you are exactly doing to get this error?
If you can give a test we can run it's best.

Mihai

________________________________
From: Kaushal Kishore <ka...@gmail.com>
Sent: Sunday, December 29, 2024 3:10 AM
To: dev@calcite.apache.org <de...@calcite.apache.org>
Subject: In clause having issues with string type

Hello Team,

schema of the table below:

create table employee (empno int, department NVARCHAR); means list of string.

now i am using select * from employee where department in (‘CSE’);
after this statement execute we are getting below error - any help will be appreciated.

I am getting IN clause error type while using string type, are calcite support only int type only ?
org.apache.calcite.sql.validate.SqlValidatorException: Values passed to IN operator must have compatible types


Many Thanks
Kaushal Sengar