Luchnikov Alexander created IGNITE-18511:
--------------------------------------------
Summary: Incomprehensible error when using a reserved word in ddl
via jdbc
Key: IGNITE-18511
URL: https://issues.apache.org/jira/browse/IGNITE-18511
Project: Ignite
Issue Type: Improvement
Reporter: Luchnikov Alexander
When creating a table via sqlline, the column name of which uses a reserved
word (in our case, the name is "type") on the calcite engine, we fall with an
error due to which the cause cannot be determined.
When using the h2 engine, the table is created.
{code:java}
./sqlline.sh --verbose=true -u
jdbc:ignite:thin://127.0.0.1:10800?queryEngine=calcite
0: jdbc:ignite:thin://127.0.0.1:10800> CREATE TABLE test (
. . . . . . . . . . . . . . . . . . )> id BIGINT,
. . . . . . . . . . . . . . . . . . )> name VARCHAR,
. . . . . . . . . . . . . . . . . . )> type VARCHAR,
. . . . . . . . . . . . . . . . . . )> PRIMARY KEY (id)
. . . . . . . . . . . . . . . . . . )> );
Error: Failed to parse query. (state=42000,code=1001)
java.sql.SQLException: Failed to parse query.
at
org.apache.ignite.internal.jdbc.thin.JdbcThinConnection.sendRequest(JdbcThinConnection.java:1010)
at
org.apache.ignite.internal.jdbc.thin.JdbcThinStatement.execute0(JdbcThinStatement.java:234)
at
org.apache.ignite.internal.jdbc.thin.JdbcThinStatement.execute(JdbcThinStatement.java:560)
at sqlline.Commands.executeSingleQuery(Commands.java:1054)
at sqlline.Commands.execute(Commands.java:1003)
at sqlline.Commands.sql(Commands.java:967)
at sqlline.SqlLine.dispatch(SqlLine.java:734)
at sqlline.SqlLine.begin(SqlLine.java:541)
at sqlline.SqlLine.start(SqlLine.java:267)
at sqlline.SqlLine.main(SqlLine.java:206)
{code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)