[
https://issues.apache.org/jira/browse/PHOENIX-3318?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15514443#comment-15514443
]
James Taylor commented on PHOENIX-3318:
---------------------------------------
Have you tried this in our calcite branch, [~jleach]? FWIW, this is where we'd
add support for any missing syntax. FYI, [~maryannxue].
Also, Phoenix doesn't expect a trailing semi-column.
> TPCH 100G: Query 13 Cannot Parse
> --------------------------------
>
> Key: PHOENIX-3318
> URL: https://issues.apache.org/jira/browse/PHOENIX-3318
> Project: Phoenix
> Issue Type: Bug
> Reporter: John Leach
>
> {NOFORMAT}
> SLF4J: Class path contains multiple SLF4J bindings.
> SLF4J: Found binding in
> [jar:file:/opt/phoenix/apache-phoenix-4.8.0-HBase-1.1-bin/phoenix-4.8.0-HBase-1.1-client.jar!/org/slf4j/impl/StaticLoggerBinder.class]
> SLF4J: Found binding in
> [jar:file:/usr/hdp/2.4.2.0-258/hadoop/lib/slf4j-log4j12-1.7.10.jar!/org/slf4j/impl/StaticLoggerBinder.class]
> SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an
> explanation.
> 16/09/13 20:45:31 WARN util.NativeCodeLoader: Unable to load native-hadoop
> library for your platform... using builtin-java classes where applicable
> 16/09/13 20:45:31 WARN shortcircuit.DomainSocketFactory: The short-circuit
> local reads feature cannot be used because libhadoop cannot be loaded.
> 1/1 SELECT
> C_COUNT,
> COUNT(*) AS CUSTDIST
> FROM
> (
> SELECT
> C_CUSTKEY,
> COUNT(O_ORDERKEY)
> FROM
> TPCH.CUSTOMER
> LEFT OUTER JOIN TPCH.ORDERS ON
> C_CUSTKEY = O_CUSTKEY
> AND O_COMMENT NOT LIKE '%SPECIAL%REQUESTS%'
> GROUP BY
> C_CUSTKEY
> ) AS C_ORDERS
> (C_CUSTKEY, C_COUNT)
> GROUP BY
> C_COUNT
> ORDER BY
> CUSTDIST DESC,
> C_COUNT DESC
> ;
> Error: ERROR 602 (42P00): Syntax error. Missing "EOF" at line 17, column 1.
> (state=42P00,code=602)
> org.apache.phoenix.exception.PhoenixParserException: ERROR 602 (42P00):
> Syntax error. Missing "EOF" at line 17, column 1.
> at
> org.apache.phoenix.exception.PhoenixParserException.newException(PhoenixParserException.java:33)
> at org.apache.phoenix.parse.SQLParser.parseStatement(SQLParser.java:111)
> at
> org.apache.phoenix.jdbc.PhoenixStatement$PhoenixStatementParser.parseStatement(PhoenixStatement.java:1280)
> at
> org.apache.phoenix.jdbc.PhoenixStatement.parseStatement(PhoenixStatement.java:1363)
> at
> org.apache.phoenix.jdbc.PhoenixStatement.execute(PhoenixStatement.java:1434)
> at sqlline.Commands.execute(Commands.java:822)
> at sqlline.Commands.sql(Commands.java:732)
> at sqlline.SqlLine.dispatch(SqlLine.java:807)
> at sqlline.SqlLine.runCommands(SqlLine.java:1710)
> at sqlline.Commands.run(Commands.java:1285)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:606)
> at
> sqlline.ReflectiveCommandHandler.execute(ReflectiveCommandHandler.java:36)
> at sqlline.SqlLine.dispatch(SqlLine.java:803)
> at sqlline.SqlLine.initArgs(SqlLine.java:613)
> at sqlline.SqlLine.begin(SqlLine.java:656)
> at sqlline.SqlLine.start(SqlLine.java:398)
> at sqlline.SqlLine.main(SqlLine.java:292)
> Caused by: MissingTokenException(inserted [@-1,0:0='<missing EOF>',<-1>,17:0]
> at ()
> at
> org.apache.phoenix.parse.PhoenixSQLParser.recoverFromMismatchedToken(PhoenixSQLParser.java:358)
> at
> org.apache.phoenix.shaded.org.antlr.runtime.BaseRecognizer.match(BaseRecognizer.java:115)
> at
> org.apache.phoenix.parse.PhoenixSQLParser.statement(PhoenixSQLParser.java:518)
> at org.apache.phoenix.parse.SQLParser.parseStatement(SQLParser.java:108)
> ... 18 more
> Aborting command set because "force" is false and command failed: "SELECT
> C_COUNT,
> COUNT(*) AS CUSTDIST
> FROM
> (
> SELECT
> C_CUSTKEY,
> COUNT(O_ORDERKEY)
> FROM
> TPCH.CUSTOMER
> LEFT OUTER JOIN TPCH.ORDERS ON
> C_CUSTKEY = O_CUSTKEY
> AND O_COMMENT NOT LIKE '%SPECIAL%REQUESTS%'
> GROUP BY
> C_CUSTKEY
> ) AS C_ORDERS
> (C_CUSTKEY, C_COUNT)
> GROUP BY
> C_COUNT
> ORDER BY
> CUSTDIST DESC,
> C_COUNT DESC
> ;"
> Closing: org.apache.phoenix.jdbc.PhoenixConnection
> {NOFORMAT}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)