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

Ilya Kasnacheev commented on IGNITE-15647:
------------------------------------------

{code}
apache-ignite-2.13.0-SNAPSHOT-bin% bin/sqlline.sh --silent -u 
jdbc:ignite:thin://127.0.0.1 -n login -p password -e 'select * from 
sys.tables;'                            0:31
+----------------+------------------+------------+----------------+-------------+------------+---------------------+-----------+-------------+-------------------+--------------------------+
| CACHE_GROUP_ID | CACHE_GROUP_NAME |  CACHE_ID  |   CACHE_NAME   | SCHEMA_NAME 
| TABLE_NAME | AFFINITY_KEY_COLUMN | KEY_ALIAS | VALUE_ALIAS |   KEY_TYPE_NAME  
 |                   VALUE_ |
+----------------+------------------+------------+----------------+-------------+------------+---------------------+-----------+-------------+-------------------+--------------------------+
| -897948415     | SQL_PUBLIC_FOO   | -897948415 | SQL_PUBLIC_FOO | PUBLIC      
| FOO        |                     | BAR       |             | 
java.lang.Integer | SQL_PUBLIC_FOO_5f3ec4bc_ |
+----------------+------------------+------------+----------------+-------------+------------+---------------------+-----------+-------------+-------------------+--------------------------+
{code}

> -e parameter of sqlline command does not work properly
> ------------------------------------------------------
>
>                 Key: IGNITE-15647
>                 URL: https://issues.apache.org/jira/browse/IGNITE-15647
>             Project: Ignite
>          Issue Type: Bug
>          Components: sql
>    Affects Versions: 2.10
>         Environment: CentOS7.8.2003
>            Reporter: Anton Kondratev
>            Assignee: Ilya Kasnacheev
>            Priority: Critical
>             Fix For: 2.12
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> SQL query specified in -e parameter of sqlline command does not get parsed 
> properly and therefore not executed.
> I'm trying to use it like this:
> {code:java}
> ./sqlline.sh -u jdbc:ignite:thin://1.2.3.4 -n login -p password -e 'select * 
> from \"sys\".\"tables\";'{code}
> and output is:
> {code:java}
> Property "url" is required
> Property "url" is required
> Property "url" is required
> Property "url" is required
> Property "url" is required
> Property "url" is required
> Property "url" is required
> Property "url" is required
> include (Is a directory)
> Property "url" is required
> Property "url" is required
> from (No such file or directory)
> \"sys\".\"tables\"; (No such file or directory)
> Error: Failed to parse query. Syntax error in SQL statement "SELECT [*]"; 
> expected "TOP, LIMIT, DISTINCT, ALL, *, NOT, EXISTS, INTERSECTS"; SQL 
> statement:
> select [42001-197] (state=42000,code=1001)
> java.sql.SQLException: Failed to parse query. Syntax error in SQL statement 
> "SELECT [*]"; expected "TOP, LIMIT, DISTINCT, ALL, *, NOT, EXISTS, 
> INTERSECTS"; SQL statement:
> select [42001-197]
>  at 
> org.apache.ignite.internal.jdbc.thin.JdbcThinConnection.sendRequest(JdbcThinConnection.java:1009)
>  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.initArgs(SqlLine.java:449)
>  at sqlline.SqlLine.begin(SqlLine.java:515)
>  at sqlline.SqlLine.start(SqlLine.java:267)
>  at sqlline.SqlLine.main(SqlLine.java:206)
> sqlline version 1.9.0{code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to