ignite-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stephen Darlington (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (IGNITE-5475) SQL: add "WITH AS" support
Date Wed, 30 Jan 2019 15:17:00 GMT

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

Stephen Darlington edited comment on IGNITE-5475 at 1/30/19 3:16 PM:
---------------------------------------------------------------------

Any update on this? It's not documented but this syntax does appear to work in 2.7:
{code:sql}
0: jdbc:ignite:thin://127.0.0.1> create table ignite (id long, name varchar, primary key(id));
No rows affected (0.219 seconds)
0: jdbc:ignite:thin://127.0.0.1> insert into ignite values (1, 'Stephen'), (2, ‘Leon');
2 rows affected (0.075 seconds)
0: jdbc:ignite:thin://127.0.0.1> select * from ignite;
+--------------------------------+--------------------------------+
|               ID               |              NAME           
  |
+--------------------------------+--------------------------------+
| 1                              | Stephen                     
  |
| 2                              | Leon.                       
  |
+--------------------------------+--------------------------------+
2 rows selected (0.056 seconds)
0: jdbc:ignite:thin://127.0.0.1> with num_one as (select * from ignite where id =1)
. . . . . . . . . . . . . . . .> select name from num_one;
+--------------------------------+
|              NAME              |
+--------------------------------+
| Stephen                        |
+--------------------------------+
1 row selected (0.024 seconds)
{code}
The 'recursive' option fails with an exception:
{code:java}
Error: javax.cache.CacheException: class org.apache.ignite.IgniteCheckedException: Unknown
query type: null (state=50000,code=1){code}

I assume we got it "for free" when the version of H2 was updated?


was (Author: sdarlington):
Any update on this? It's not documented but this syntax does appear to work:
{code:sql}
0: jdbc:ignite:thin://127.0.0.1> create table ignite (id long, name varchar, primary key(id));
No rows affected (0.219 seconds)
0: jdbc:ignite:thin://127.0.0.1> insert into ignite values (1, 'Stephen'), (2, ‘Leon');
2 rows affected (0.075 seconds)
0: jdbc:ignite:thin://127.0.0.1> select * from ignite;
+--------------------------------+--------------------------------+
|               ID               |              NAME           
  |
+--------------------------------+--------------------------------+
| 1                              | Stephen                     
  |
| 2                              | Leon.                       
  |
+--------------------------------+--------------------------------+
2 rows selected (0.056 seconds)
0: jdbc:ignite:thin://127.0.0.1> with num_one as (select * from ignite where id =1)
. . . . . . . . . . . . . . . .> select name from num_one;
+--------------------------------+
|              NAME              |
+--------------------------------+
| Stephen                        |
+--------------------------------+
1 row selected (0.024 seconds)
{code}
The 'recursive' option fails with an exception:
{code:java}
Error: javax.cache.CacheException: class org.apache.ignite.IgniteCheckedException: Unknown
query type: null (state=50000,code=1){code}

I assume we got it "for free" when the version of H2 was updated?

> SQL: add "WITH AS" support
> --------------------------
>
>                 Key: IGNITE-5475
>                 URL: https://issues.apache.org/jira/browse/IGNITE-5475
>             Project: Ignite
>          Issue Type: Task
>          Components: sql
>            Reporter: Andrew Mashenkov
>            Priority: Minor
>              Labels: sql-engine
>
> Seems for now, H2 doesn't support "WITH AS" clause.
> We should throw exception until we found a workaround or "WITH" support be added to H2.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message