Does Ignite support java.sql.Array?

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

Does Ignite support java.sql.Array?

Nikolay Izhikov-2
Hello, Igniters.

Does Ignite support java.sql.Array?
Can someone from SQL experts clarify this case?

My question relates to the specific ticket that comes from our user [1], [2]

Ignite documentaion says that we support sql ARRAY data type [3].

1. I'm able to create table with ARRAY column.

new SqlFieldsQuery("CREATE TABLE person (id LONG, name VARCHAR, cars ARRAY, PRIMARY KEY (id)) WITH \"backups=1\"")

2. I'm not able to insert or select Array column via jdbc:
JdbcConnection, JdbcThinConnection, JdbcResultSet doesn't support `createArray` or similar methods [4], [5], [6].
All this classes just throw an exception is user try to create or retrieve java.sql.Array -

throw new SQLFeatureNotSupportedException("SQL-specific types are not supported.");

How I should insert/select rows into/from array column?
Do we have some ticket to add support of Array and other SQL specifi types?

[1] https://stackoverflow.com/questions/51621280/saving-a-spark-dataset-to-apache-ignite-with-array-column-and-savemode-overwrite
[2] https://issues.apache.org/jira/browse/IGNITE-9229
[3] https://apacheignite-sql.readme.io/docs/data-types#section-array
[4] https://github.com/apache/ignite/blob/master/modules/core/src/main/java/org/apache/ignite/internal/jdbc2/JdbcConnection.java#L764
[5] https://github.com/apache/ignite/blob/master/modules/core/src/main/java/org/apache/ignite/internal/jdbc/thin/JdbcThinConnection.java#L646
[6] https://github.com/apache/ignite/blob/master/modules/core/src/main/java/org/apache/ignite/internal/jdbc2/JdbcResultSet.java#L1026
[7] https://docs.oracle.com/javase/tutorial/jdbc/basics/array.html

signature.asc (499 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Does Ignite support java.sql.Array?

Sergey Kozlov
Hi Nikolay

I was not able to use array type in sqlline [1] in 2.6

1. https://issues.apache.org/jira/browse/IGNITE-9230

On Mon, Aug 13, 2018 at 4:58 PM, Nikolay Izhikov <[hidden email]>
wrote:

> Hello, Igniters.
>
> Does Ignite support java.sql.Array?
> Can someone from SQL experts clarify this case?
>
> My question relates to the specific ticket that comes from our user [1],
> [2]
>
> Ignite documentaion says that we support sql ARRAY data type [3].
>
> 1. I'm able to create table with ARRAY column.
>
> new SqlFieldsQuery("CREATE TABLE person (id LONG, name VARCHAR, cars
> ARRAY, PRIMARY KEY (id)) WITH \"backups=1\"")
>
> 2. I'm not able to insert or select Array column via jdbc:
> JdbcConnection, JdbcThinConnection, JdbcResultSet doesn't support
> `createArray` or similar methods [4], [5], [6].
> All this classes just throw an exception is user try to create or retrieve
> java.sql.Array -
>
> throw new SQLFeatureNotSupportedException("SQL-specific types are not
> supported.");
>
> How I should insert/select rows into/from array column?
> Do we have some ticket to add support of Array and other SQL specifi types?
>
> [1] https://stackoverflow.com/questions/51621280/saving-a-
> spark-dataset-to-apache-ignite-with-array-column-and-savemode-overwrite
> [2] https://issues.apache.org/jira/browse/IGNITE-9229
> [3] https://apacheignite-sql.readme.io/docs/data-types#section-array
> [4] https://github.com/apache/ignite/blob/master/modules/
> core/src/main/java/org/apache/ignite/internal/jdbc2/
> JdbcConnection.java#L764
> [5] https://github.com/apache/ignite/blob/master/modules/
> core/src/main/java/org/apache/ignite/internal/jdbc/thin/
> JdbcThinConnection.java#L646
> [6] https://github.com/apache/ignite/blob/master/modules/
> core/src/main/java/org/apache/ignite/internal/jdbc2/
> JdbcResultSet.java#L1026
> [7] https://docs.oracle.com/javase/tutorial/jdbc/basics/array.html




--
Sergey Kozlov
GridGain Systems
www.gridgain.com
Reply | Threaded
Open this post in threaded view
|

Re: Does Ignite support java.sql.Array?

daradurvs
Hi, Nick!

ASAIK java.sql.Array hasn't been implemented in binary infrastructure yet.

You should implement it first, like in
https://issues.apache.org/jira/browse/IGNITE-4158

On Mon, Aug 13, 2018 at 5:22 PM Sergey Kozlov <[hidden email]> wrote:

>
> Hi Nikolay
>
> I was not able to use array type in sqlline [1] in 2.6
>
> 1. https://issues.apache.org/jira/browse/IGNITE-9230
>
> On Mon, Aug 13, 2018 at 4:58 PM, Nikolay Izhikov <[hidden email]>
> wrote:
>
> > Hello, Igniters.
> >
> > Does Ignite support java.sql.Array?
> > Can someone from SQL experts clarify this case?
> >
> > My question relates to the specific ticket that comes from our user [1],
> > [2]
> >
> > Ignite documentaion says that we support sql ARRAY data type [3].
> >
> > 1. I'm able to create table with ARRAY column.
> >
> > new SqlFieldsQuery("CREATE TABLE person (id LONG, name VARCHAR, cars
> > ARRAY, PRIMARY KEY (id)) WITH \"backups=1\"")
> >
> > 2. I'm not able to insert or select Array column via jdbc:
> > JdbcConnection, JdbcThinConnection, JdbcResultSet doesn't support
> > `createArray` or similar methods [4], [5], [6].
> > All this classes just throw an exception is user try to create or retrieve
> > java.sql.Array -
> >
> > throw new SQLFeatureNotSupportedException("SQL-specific types are not
> > supported.");
> >
> > How I should insert/select rows into/from array column?
> > Do we have some ticket to add support of Array and other SQL specifi types?
> >
> > [1] https://stackoverflow.com/questions/51621280/saving-a-
> > spark-dataset-to-apache-ignite-with-array-column-and-savemode-overwrite
> > [2] https://issues.apache.org/jira/browse/IGNITE-9229
> > [3] https://apacheignite-sql.readme.io/docs/data-types#section-array
> > [4] https://github.com/apache/ignite/blob/master/modules/
> > core/src/main/java/org/apache/ignite/internal/jdbc2/
> > JdbcConnection.java#L764
> > [5] https://github.com/apache/ignite/blob/master/modules/
> > core/src/main/java/org/apache/ignite/internal/jdbc/thin/
> > JdbcThinConnection.java#L646
> > [6] https://github.com/apache/ignite/blob/master/modules/
> > core/src/main/java/org/apache/ignite/internal/jdbc2/
> > JdbcResultSet.java#L1026
> > [7] https://docs.oracle.com/javase/tutorial/jdbc/basics/array.html
>
>
>
>
> --
> Sergey Kozlov
> GridGain Systems
> www.gridgain.com



--
Best Regards, Vyacheslav D.
Reply | Threaded
Open this post in threaded view
|

Re: Does Ignite support java.sql.Array?

Nikolay Izhikov-2
Thanks for a comments.

Should we update documentation and remove ARRAY support?

Vladimir, Denis, can you comment on this?

В Пн, 13/08/2018 в 17:29 +0300, Vyacheslav Daradur пишет:

> Hi, Nick!
>
> ASAIK java.sql.Array hasn't been implemented in binary infrastructure yet.
>
> You should implement it first, like in
> https://issues.apache.org/jira/browse/IGNITE-4158
>
> On Mon, Aug 13, 2018 at 5:22 PM Sergey Kozlov <[hidden email]> wrote:
> >
> > Hi Nikolay
> >
> > I was not able to use array type in sqlline [1] in 2.6
> >
> > 1. https://issues.apache.org/jira/browse/IGNITE-9230
> >
> > On Mon, Aug 13, 2018 at 4:58 PM, Nikolay Izhikov <[hidden email]>
> > wrote:
> >
> > > Hello, Igniters.
> > >
> > > Does Ignite support java.sql.Array?
> > > Can someone from SQL experts clarify this case?
> > >
> > > My question relates to the specific ticket that comes from our user [1],
> > > [2]
> > >
> > > Ignite documentaion says that we support sql ARRAY data type [3].
> > >
> > > 1. I'm able to create table with ARRAY column.
> > >
> > > new SqlFieldsQuery("CREATE TABLE person (id LONG, name VARCHAR, cars
> > > ARRAY, PRIMARY KEY (id)) WITH \"backups=1\"")
> > >
> > > 2. I'm not able to insert or select Array column via jdbc:
> > > JdbcConnection, JdbcThinConnection, JdbcResultSet doesn't support
> > > `createArray` or similar methods [4], [5], [6].
> > > All this classes just throw an exception is user try to create or retrieve
> > > java.sql.Array -
> > >
> > > throw new SQLFeatureNotSupportedException("SQL-specific types are not
> > > supported.");
> > >
> > > How I should insert/select rows into/from array column?
> > > Do we have some ticket to add support of Array and other SQL specifi types?
> > >
> > > [1] https://stackoverflow.com/questions/51621280/saving-a-
> > > spark-dataset-to-apache-ignite-with-array-column-and-savemode-overwrite
> > > [2] https://issues.apache.org/jira/browse/IGNITE-9229
> > > [3] https://apacheignite-sql.readme.io/docs/data-types#section-array
> > > [4] https://github.com/apache/ignite/blob/master/modules/
> > > core/src/main/java/org/apache/ignite/internal/jdbc2/
> > > JdbcConnection.java#L764
> > > [5] https://github.com/apache/ignite/blob/master/modules/
> > > core/src/main/java/org/apache/ignite/internal/jdbc/thin/
> > > JdbcThinConnection.java#L646
> > > [6] https://github.com/apache/ignite/blob/master/modules/
> > > core/src/main/java/org/apache/ignite/internal/jdbc2/
> > > JdbcResultSet.java#L1026
> > > [7] https://docs.oracle.com/javase/tutorial/jdbc/basics/array.html
> >
> >
> >
> >
> > --
> > Sergey Kozlov
> > GridGain Systems
> > www.gridgain.com
>
>
>

signature.asc (499 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Does Ignite support java.sql.Array?

Denis Magda
Vladimir,

Could you step in? How should we update our docs and what are the steps to
add Arrays support to the project? I thought this worked all the times.

--
Denis

On Mon, Aug 13, 2018 at 8:55 AM Nikolay Izhikov <[hidden email]> wrote:

> Thanks for a comments.
>
> Should we update documentation and remove ARRAY support?
>
> Vladimir, Denis, can you comment on this?
>
> В Пн, 13/08/2018 в 17:29 +0300, Vyacheslav Daradur пишет:
> > Hi, Nick!
> >
> > ASAIK java.sql.Array hasn't been implemented in binary infrastructure
> yet.
> >
> > You should implement it first, like in
> > https://issues.apache.org/jira/browse/IGNITE-4158
> >
> > On Mon, Aug 13, 2018 at 5:22 PM Sergey Kozlov <[hidden email]>
> wrote:
> > >
> > > Hi Nikolay
> > >
> > > I was not able to use array type in sqlline [1] in 2.6
> > >
> > > 1. https://issues.apache.org/jira/browse/IGNITE-9230
> > >
> > > On Mon, Aug 13, 2018 at 4:58 PM, Nikolay Izhikov <[hidden email]>
> > > wrote:
> > >
> > > > Hello, Igniters.
> > > >
> > > > Does Ignite support java.sql.Array?
> > > > Can someone from SQL experts clarify this case?
> > > >
> > > > My question relates to the specific ticket that comes from our user
> [1],
> > > > [2]
> > > >
> > > > Ignite documentaion says that we support sql ARRAY data type [3].
> > > >
> > > > 1. I'm able to create table with ARRAY column.
> > > >
> > > > new SqlFieldsQuery("CREATE TABLE person (id LONG, name VARCHAR, cars
> > > > ARRAY, PRIMARY KEY (id)) WITH \"backups=1\"")
> > > >
> > > > 2. I'm not able to insert or select Array column via jdbc:
> > > > JdbcConnection, JdbcThinConnection, JdbcResultSet doesn't support
> > > > `createArray` or similar methods [4], [5], [6].
> > > > All this classes just throw an exception is user try to create or
> retrieve
> > > > java.sql.Array -
> > > >
> > > > throw new SQLFeatureNotSupportedException("SQL-specific types are not
> > > > supported.");
> > > >
> > > > How I should insert/select rows into/from array column?
> > > > Do we have some ticket to add support of Array and other SQL specifi
> types?
> > > >
> > > > [1] https://stackoverflow.com/questions/51621280/saving-a-
> > > >
> spark-dataset-to-apache-ignite-with-array-column-and-savemode-overwrite
> > > > [2] https://issues.apache.org/jira/browse/IGNITE-9229
> > > > [3] https://apacheignite-sql.readme.io/docs/data-types#section-array
> > > > [4] https://github.com/apache/ignite/blob/master/modules/
> > > > core/src/main/java/org/apache/ignite/internal/jdbc2/
> > > > JdbcConnection.java#L764
> > > > [5] https://github.com/apache/ignite/blob/master/modules/
> > > > core/src/main/java/org/apache/ignite/internal/jdbc/thin/
> > > > JdbcThinConnection.java#L646
> > > > [6] https://github.com/apache/ignite/blob/master/modules/
> > > > core/src/main/java/org/apache/ignite/internal/jdbc2/
> > > > JdbcResultSet.java#L1026
> > > > [7] https://docs.oracle.com/javase/tutorial/jdbc/basics/array.html
> > >
> > >
> > >
> > >
> > > --
> > > Sergey Kozlov
> > > GridGain Systems
> > > www.gridgain.com
> >
> >
> >
Reply | Threaded
Open this post in threaded view
|

Re: Does Ignite support java.sql.Array?

Vladimir Ozerov
Hi,

No, we do not support ARRAY data type at the moment. Let's remove it from
docs.

On Mon, Aug 13, 2018 at 10:06 PM Denis Magda <[hidden email]> wrote:

> Vladimir,
>
> Could you step in? How should we update our docs and what are the steps to
> add Arrays support to the project? I thought this worked all the times.
>
> --
> Denis
>
> On Mon, Aug 13, 2018 at 8:55 AM Nikolay Izhikov <[hidden email]>
> wrote:
>
>> Thanks for a comments.
>>
>> Should we update documentation and remove ARRAY support?
>>
>> Vladimir, Denis, can you comment on this?
>>
>> В Пн, 13/08/2018 в 17:29 +0300, Vyacheslav Daradur пишет:
>> > Hi, Nick!
>> >
>> > ASAIK java.sql.Array hasn't been implemented in binary infrastructure
>> yet.
>> >
>> > You should implement it first, like in
>> > https://issues.apache.org/jira/browse/IGNITE-4158
>> >
>> > On Mon, Aug 13, 2018 at 5:22 PM Sergey Kozlov <[hidden email]>
>> wrote:
>> > >
>> > > Hi Nikolay
>> > >
>> > > I was not able to use array type in sqlline [1] in 2.6
>> > >
>> > > 1. https://issues.apache.org/jira/browse/IGNITE-9230
>> > >
>> > > On Mon, Aug 13, 2018 at 4:58 PM, Nikolay Izhikov <[hidden email]
>> >
>> > > wrote:
>> > >
>> > > > Hello, Igniters.
>> > > >
>> > > > Does Ignite support java.sql.Array?
>> > > > Can someone from SQL experts clarify this case?
>> > > >
>> > > > My question relates to the specific ticket that comes from our user
>> [1],
>> > > > [2]
>> > > >
>> > > > Ignite documentaion says that we support sql ARRAY data type [3].
>> > > >
>> > > > 1. I'm able to create table with ARRAY column.
>> > > >
>> > > > new SqlFieldsQuery("CREATE TABLE person (id LONG, name VARCHAR, cars
>> > > > ARRAY, PRIMARY KEY (id)) WITH \"backups=1\"")
>> > > >
>> > > > 2. I'm not able to insert or select Array column via jdbc:
>> > > > JdbcConnection, JdbcThinConnection, JdbcResultSet doesn't support
>> > > > `createArray` or similar methods [4], [5], [6].
>> > > > All this classes just throw an exception is user try to create or
>> retrieve
>> > > > java.sql.Array -
>> > > >
>> > > > throw new SQLFeatureNotSupportedException("SQL-specific types are
>> not
>> > > > supported.");
>> > > >
>> > > > How I should insert/select rows into/from array column?
>> > > > Do we have some ticket to add support of Array and other SQL
>> specifi types?
>> > > >
>> > > > [1] https://stackoverflow.com/questions/51621280/saving-a-
>> > > >
>> spark-dataset-to-apache-ignite-with-array-column-and-savemode-overwrite
>> > > > [2] https://issues.apache.org/jira/browse/IGNITE-9229
>> > > > [3]
>> https://apacheignite-sql.readme.io/docs/data-types#section-array
>> > > > [4] https://github.com/apache/ignite/blob/master/modules/
>> > > > core/src/main/java/org/apache/ignite/internal/jdbc2/
>> > > > JdbcConnection.java#L764
>> > > > [5] https://github.com/apache/ignite/blob/master/modules/
>> > > > core/src/main/java/org/apache/ignite/internal/jdbc/thin/
>> > > > JdbcThinConnection.java#L646
>> > > > [6] https://github.com/apache/ignite/blob/master/modules/
>> > > > core/src/main/java/org/apache/ignite/internal/jdbc2/
>> > > > JdbcResultSet.java#L1026
>> > > > [7] https://docs.oracle.com/javase/tutorial/jdbc/basics/array.html
>> > >
>> > >
>> > >
>> > >
>> > > --
>> > > Sergey Kozlov
>> > > GridGain Systems
>> > > www.gridgain.com
>> >
>> >
>> >
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Does Ignite support java.sql.Array?

Nikolay Izhikov-2
Hello, Vladimir.

Thanks for a clarification.


Do we have a ticket to add support for an ARRAY data type?


Also, I think we have a bug here.
For now one can create table with ARRAY column.
Seems, we should dissalow it.

I will create a ticket to fix it.

В Вт, 14/08/2018 в 11:34 +0300, Vladimir Ozerov пишет:

> Hi,
>
> No, we do not support ARRAY data type at the moment. Let's remove it from
> docs.
>
> On Mon, Aug 13, 2018 at 10:06 PM Denis Magda <[hidden email]> wrote:
>
> > Vladimir,
> >
> > Could you step in? How should we update our docs and what are the steps to
> > add Arrays support to the project? I thought this worked all the times.
> >
> > --
> > Denis
> >
> > On Mon, Aug 13, 2018 at 8:55 AM Nikolay Izhikov <[hidden email]>
> > wrote:
> >
> > > Thanks for a comments.
> > >
> > > Should we update documentation and remove ARRAY support?
> > >
> > > Vladimir, Denis, can you comment on this?
> > >
> > > В Пн, 13/08/2018 в 17:29 +0300, Vyacheslav Daradur пишет:
> > > > Hi, Nick!
> > > >
> > > > ASAIK java.sql.Array hasn't been implemented in binary infrastructure
> > >
> > > yet.
> > > >
> > > > You should implement it first, like in
> > > > https://issues.apache.org/jira/browse/IGNITE-4158
> > > >
> > > > On Mon, Aug 13, 2018 at 5:22 PM Sergey Kozlov <[hidden email]>
> > >
> > > wrote:
> > > > >
> > > > > Hi Nikolay
> > > > >
> > > > > I was not able to use array type in sqlline [1] in 2.6
> > > > >
> > > > > 1. https://issues.apache.org/jira/browse/IGNITE-9230
> > > > >
> > > > > On Mon, Aug 13, 2018 at 4:58 PM, Nikolay Izhikov <[hidden email]
> > > > > wrote:
> > > > >
> > > > > > Hello, Igniters.
> > > > > >
> > > > > > Does Ignite support java.sql.Array?
> > > > > > Can someone from SQL experts clarify this case?
> > > > > >
> > > > > > My question relates to the specific ticket that comes from our user
> > >
> > > [1],
> > > > > > [2]
> > > > > >
> > > > > > Ignite documentaion says that we support sql ARRAY data type [3].
> > > > > >
> > > > > > 1. I'm able to create table with ARRAY column.
> > > > > >
> > > > > > new SqlFieldsQuery("CREATE TABLE person (id LONG, name VARCHAR, cars
> > > > > > ARRAY, PRIMARY KEY (id)) WITH \"backups=1\"")
> > > > > >
> > > > > > 2. I'm not able to insert or select Array column via jdbc:
> > > > > > JdbcConnection, JdbcThinConnection, JdbcResultSet doesn't support
> > > > > > `createArray` or similar methods [4], [5], [6].
> > > > > > All this classes just throw an exception is user try to create or
> > >
> > > retrieve
> > > > > > java.sql.Array -
> > > > > >
> > > > > > throw new SQLFeatureNotSupportedException("SQL-specific types are
> > >
> > > not
> > > > > > supported.");
> > > > > >
> > > > > > How I should insert/select rows into/from array column?
> > > > > > Do we have some ticket to add support of Array and other SQL
> > >
> > > specifi types?
> > > > > >
> > > > > > [1] https://stackoverflow.com/questions/51621280/saving-a-
> > > > > >
> > >
> > > spark-dataset-to-apache-ignite-with-array-column-and-savemode-overwrite
> > > > > > [2] https://issues.apache.org/jira/browse/IGNITE-9229
> > > > > > [3]
> > >
> > > https://apacheignite-sql.readme.io/docs/data-types#section-array
> > > > > > [4] https://github.com/apache/ignite/blob/master/modules/
> > > > > > core/src/main/java/org/apache/ignite/internal/jdbc2/
> > > > > > JdbcConnection.java#L764
> > > > > > [5] https://github.com/apache/ignite/blob/master/modules/
> > > > > > core/src/main/java/org/apache/ignite/internal/jdbc/thin/
> > > > > > JdbcThinConnection.java#L646
> > > > > > [6] https://github.com/apache/ignite/blob/master/modules/
> > > > > > core/src/main/java/org/apache/ignite/internal/jdbc2/
> > > > > > JdbcResultSet.java#L1026
> > > > > > [7] https://docs.oracle.com/javase/tutorial/jdbc/basics/array.html
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > > Sergey Kozlov
> > > > > GridGain Systems
> > > > > www.gridgain.com
> > > >
> > > >
> > > >
> >
> >

signature.asc (499 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Does Ignite support java.sql.Array?

dsetrakyan
In reply to this post by Vladimir Ozerov
On Tue, Aug 14, 2018 at 3:34 AM, Vladimir Ozerov <[hidden email]>
wrote:

> Hi,
>
> No, we do not support ARRAY data type at the moment. Let's remove it from
> docs.
>

Vladimir, what is the reason for not supporting it? ARRAY is a basic SQL
type and not supporting it presents a serious limitation.

D.
Reply | Threaded
Open this post in threaded view
|

Re: Does Ignite support java.sql.Array?

dmagda
I've removed the ARRAY data type from the supported list.

Regardless of this, Vova, could you answer to Dmiry's question?

--
Denis

On Tue, Aug 14, 2018 at 8:28 AM Dmitriy Setrakyan <[hidden email]>
wrote:

>
>
> On Tue, Aug 14, 2018 at 3:34 AM, Vladimir Ozerov <[hidden email]>
> wrote:
>
>> Hi,
>>
>> No, we do not support ARRAY data type at the moment. Let's remove it from
>> docs.
>>
>
> Vladimir, what is the reason for not supporting it? ARRAY is a basic SQL
> type and not supporting it presents a serious limitation.
>
> D.
>