[
https://issues.apache.org/jira/browse/CALCITE-2310?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Julian Hyde resolved CALCITE-2310.
----------------------------------
Fix Version/s: 1.20.0
Resolution: Duplicate
Marking as duplicate. This is solved by CALCITE-2453 (statements separated by
semicolons, without the BEGIN .. END syntax).
> SqlParser parse multiple sql statements split by semicolon
> ----------------------------------------------------------
>
> Key: CALCITE-2310
> URL: https://issues.apache.org/jira/browse/CALCITE-2310
> Project: Calcite
> Issue Type: Improvement
> Components: core
> Reporter: Fei Xu
> Priority: Minor
> Fix For: 1.20.0
>
>
> Current, SqlParser only supports parse single sql statement to single
> SqlNode. But since we have server module, and support DDL syntax, It is
> common to write DDL statement and DML statement together to build a complete
> logic.
> For example:
> * Table orders is a source table;
> * Table output_console is a sink table;
> * Read data from source table, do some project and filter, then write to
> sink table.
> {code:java}
> CREATE TABLE orders (
> createTime TIMESTAMP,
> productId bigint,
> orderId bigint,
> units bigint,
> user_name VARCHAR
> );
> CREATE TABLE output_console(
> createTime TIMESTAMP,
> productId bigint,
> orderId bigint,
> units bigint,
> user_name VARCHAR
> );
> INSERT INTO output_console
> SELECT
> createTime,
> productId,
> orderId,
> units,
> user_name
> FROM orders
> WHERE (productId>3) AND (productId<8);
> {code}
> So, I think it really helps if SqlParser support parse multiple sql
> statements.
>
>
>
>
--
This message was sent by Atlassian Jira
(v8.20.1#820001)