[ 
https://issues.apache.org/jira/browse/IGNITE-19352?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Andrey Khitrin updated IGNITE-19352:
------------------------------------
    Affects Version/s: 3.0.0-beta1

> Create table from query result
> ------------------------------
>
>                 Key: IGNITE-19352
>                 URL: https://issues.apache.org/jira/browse/IGNITE-19352
>             Project: Ignite
>          Issue Type: Improvement
>          Components: sql
>    Affects Versions: 3.0.0-beta1
>            Reporter: Andrey Khitrin
>            Priority: Major
>              Labels: ignite-3, sql
>
> Like in IGNITE-14555 for AI2, it would be useful to create tables from the 
> result of the query:
>  {code:sql}
> CREATE TABLE <name> AS <SELECT QUERY>
> {code}
> In the AI3 beta1 and current `main` it's not possible:
> {code:sql}
> sql-cli> create table xx (key_field INT PRIMARY KEY, field1 INT);
> Updated 0 rows.
> sql-cli> insert into xx values (1, 1);
> Updated 1 rows.
> sql-cli> insert into xx values (2, 10);
> Updated 1 rows.
> sql-cli> create table xy as select key_field, field1 from xx where field1 < 5;
> SQL query execution error
> Exception while executing query [query=create table xy as select key_field, 
> field1 from xx where field1 < 5;]. Error message:IGN-SQL-3 
> TraceId:ff6bc711-14e5-42ab-b80c-5515a8b77c7c Failed to parse query: 
> Encountered " "AS" "as "" at line 1, column 17.
> Was expecting:
>     "(" ...
> {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to