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

Chun Chang commented on DRILL-416:
----------------------------------

11:09:49.542 [WorkManager-2] ERROR o.a.drill.exec.work.foreman.Foreman - Error 
e2946b36-dd24-429b-b8a3-84d04a7ecc65: Failure while parsing sql.
org.eigenbase.sql.parser.impl.ParseException: Encountered "<EOF>" at line 1, 
column 10.
Was expecting one of:
    "FROM" ...
    "," ...
    "AS" ...
    <IDENTIFIER> ...
    <QUOTED_IDENTIFIER> ...
    <BACK_QUOTED_IDENTIFIER> ...
    <BRACKET_QUOTED_IDENTIFIER> ...
    <UNICODE_QUOTED_IDENTIFIER> ...
    "NOT" ...
    "IN" ...
    "BETWEEN" ...
    "LIKE" ...
    "SIMILAR" ...
    "=" ...
    ">" ...
    "<" ...
    "<=" ...
    ">=" ...
    "<>" ...
    "+" ...
    "-" ...
    "*" ...
    "/" ...
    "||" ...
    "AND" ...
    "OR" ...
    "IS" ...
    "MEMBER" ...
    "SUBMULTISET" ...
    "MULTISET" ...
    "[" ...

        at 
org.eigenbase.sql.parser.impl.SqlParserImpl.generateParseException(SqlParserImpl.java:15736)
 ~[optiq-core-0.4.18.jar:na]
        at 
org.eigenbase.sql.parser.impl.SqlParserImpl.jj_consume_token(SqlParserImpl.java:15565)
 ~[optiq-core-0.4.18.jar:na]
        at 
org.eigenbase.sql.parser.impl.SqlParserImpl.SqlSelect(SqlParserImpl.java:704) 
~[optiq-core-0.4.18.jar:na]
        at 
org.eigenbase.sql.parser.impl.SqlParserImpl.LeafQuery(SqlParserImpl.java:471) 
~[optiq-core-0.4.18.jar:na]
        at 
org.eigenbase.sql.parser.impl.SqlParserImpl.LeafQueryOrExpr(SqlParserImpl.java:2120)
 ~[optiq-core-0.4.18.jar:na]
        at 
org.eigenbase.sql.parser.impl.SqlParserImpl.QueryOrExpr(SqlParserImpl.java:2082)
 ~[optiq-core-0.4.18.jar:na]
        at 
org.eigenbase.sql.parser.impl.SqlParserImpl.OrderedQueryOrExpr(SqlParserImpl.java:389)
 ~[optiq-core-0.4.18.jar:na]
        at 
org.eigenbase.sql.parser.impl.SqlParserImpl.SqlStmt(SqlParserImpl.java:645) 
~[optiq-core-0.4.18.jar:na]
        at 
org.eigenbase.sql.parser.impl.SqlParserImpl.SqlStmtEof(SqlParserImpl.java:671) 
~[optiq-core-0.4.18.jar:na]
        at org.eigenbase.sql.parser.SqlParser.parseStmt(SqlParser.java:126) 
~[optiq-core-0.4.18.jar:na]
        at net.hydromatic.optiq.prepare.PlannerImpl.parse(PlannerImpl.java:142) 
~[optiq-core-0.4.18.jar:na]
        at 
org.apache.drill.exec.planner.sql.DrillSqlWorker.getPlan(DrillSqlWorker.java:57)
 
~[drill-java-exec-1.0.0-m2-incubating-SNAPSHOT-rebuffed.jar:1.0.0-m2-incubating-SNAPSHOT]
        at org.apache.drill.exec.work.foreman.Foreman.runSQL(Foreman.java:350) 
[drill-java-exec-1.0.0-m2-incubating-SNAPSHOT-rebuffed.jar:1.0.0-m2-incubating-SNAPSHOT]
        at org.apache.drill.exec.work.foreman.Foreman.run(Foreman.java:175) 
[drill-java-exec-1.0.0-m2-incubating-SNAPSHOT-rebuffed.jar:1.0.0-m2-incubating-SNAPSHOT]
        at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) 
[na:1.7.0_45]
        at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) 
[na:1.7.0_45]
        at java.lang.Thread.run(Thread.java:744) [na:1.7.0_45]
[root@qa-node118 drill]#

> Make Drill work with SELECT without FROM
> ----------------------------------------
>
>                 Key: DRILL-416
>                 URL: https://issues.apache.org/jira/browse/DRILL-416
>             Project: Apache Drill
>          Issue Type: Improvement
>    Affects Versions: 1.0.0-milestone-2
>            Reporter: Chun Chang
>
> This works with postgres:
> [root@qa-node120 ~]# sudo -u postgres psql foodmart
> foodmart=# select 1+1.1;
>  ?column?
> ----------
>       2.1
> (1 row)
> But does not work with Drill:
> 0: jdbc:drill:> select 1+1.1;
> Query failed: org.apache.drill.exec.rpc.RpcException: Remote failure while 
> running query.[error_id: "100f4d4c-1ee1-495e-9c2f-547aae75473d"
> endpoint {
>   address: "qa-node118.qa.lab"
>   user_port: 31010
>   control_port: 31011
>   data_port: 31012
> }
> error_type: 0
> message: "Failure while parsing sql. < SqlParseException:[ Encountered 
> \"<EOF>\" at line 1, column 12.\nWas expecting one of:....



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to