[jira] [Commented] (IGNITE-5475) SQL: add "WITH AS" support

2019-08-13 Thread Ivan Pavlukhin (JIRA)


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

Ivan Pavlukhin commented on IGNITE-5475:


[~amashenkov] could we close this ticket as it seems that queries using syntax 
{{WITH ... AS}} (CTE) are accepted by Ignite?

> 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.14#76016)


[jira] [Commented] (IGNITE-5475) SQL: add "WITH AS" support

2019-01-30 Thread Stephen Darlington (JIRA)


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

Stephen Darlington commented on IGNITE-5475:


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=5,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)