You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by tore yang via user <us...@ignite.apache.org> on 2022/11/10 21:08:36 UTC

How can I specify a column of java object in my sql select list after switching to calcite

My cache has a column of type java map, the column name is "mymap". when I send a query "select id,mymap from mytable", it complains "Error: Failed to parse the query. (state=4200,code=1001). but when I run the query "select * from mytable", the column mymap returns perfectly. this wasn't a problem until I replaced "H2" with "Calcite", and it only fails for column with data type java.lang.objects. 
How to specify the column which is of type "java object".
Thanks!

Re: How can I specify a column of java object in my sql select list after switching to calcite

Posted by Alex Plehanov <pl...@gmail.com>.
Tore Yang,

Can you please provide a full stack trace of the exception and more details
about your case? Do you create the table via DDL or via QueryEntity? Do you
have a simple reproducer?
The error looks strange, because it's not a parser responsibility to check
column types.

пт, 11 нояб. 2022 г. в 08:37, Jeremy McMillan <jeremy.mcmillan@gridgain.com
>:

> You might want to watch the recording of the summit talk on Ignite 3
> changes.
>
> There is a major change around how binary column types and objects are
> stored using Calcite.
>
> On Thu, Nov 10, 2022, 15:10 tore yang via user <us...@ignite.apache.org>
> wrote:
>
>> My cache has a column of type java map, the column name is "mymap". when
>> I send a query "select id,mymap from mytable", it complains "Error: Failed
>> to parse the query. (state=4200,code=1001). but when I run the query
>> "select * from mytable", the column mymap returns perfectly. this wasn't a
>> problem until I replaced "H2" with "Calcite", and it only fails for column
>> with data type java.lang.objects.
>>
>> How to specify the column which is of type "java object".
>>
>> Thanks!
>>
>

Re: How can I specify a column of java object in my sql select list after switching to calcite

Posted by Jeremy McMillan <je...@gridgain.com>.
You might want to watch the recording of the summit talk on Ignite 3
changes.

There is a major change around how binary column types and objects are
stored using Calcite.

On Thu, Nov 10, 2022, 15:10 tore yang via user <us...@ignite.apache.org>
wrote:

> My cache has a column of type java map, the column name is "mymap". when I
> send a query "select id,mymap from mytable", it complains "Error: Failed to
> parse the query. (state=4200,code=1001). but when I run the query "select *
> from mytable", the column mymap returns perfectly. this wasn't a problem
> until I replaced "H2" with "Calcite", and it only fails for column with
> data type java.lang.objects.
>
> How to specify the column which is of type "java object".
>
> Thanks!
>