You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@tajo.apache.org by "Jaehwa Jung (JIRA)" <ji...@apache.org> on 2015/06/13 11:26:00 UTC

[jira] [Created] (TAJO-1643) SQLParse can't parse table alias in in brackets.

Jaehwa Jung created TAJO-1643:
---------------------------------

             Summary: SQLParse can't parse table alias in in brackets.
                 Key: TAJO-1643
                 URL: https://issues.apache.org/jira/browse/TAJO-1643
             Project: Tajo
          Issue Type: Bug
          Components: parser
            Reporter: Jaehwa Jung


SQLParser can't parse table alias in brackets as following:

{code:xml}
tpch> select c.*
> from (customer as c)
> ;
ERROR: syntax error at or near '('
LINE 2:5 from (customer as c)
{code}

Above case, I found error logs as follows.

{code:xml}
Caused by: org.apache.tajo.engine.parser.SQLParseError: ERROR: syntax error at or near '('
LINE 2:5 from (customer as c)
              ^
	at org.apache.tajo.engine.parser.SQLErrorListener.syntaxError(SQLErrorListener.java:36)
	at org.antlr.v4.runtime.ProxyErrorListener.syntaxError(ProxyErrorListener.java:65)
	at org.antlr.v4.runtime.Parser.notifyErrorListeners(Parser.java:473)
	at org.apache.tajo.engine.parser.SQLErrorStrategy.reportNoViableAltException(SQLErrorStrategy.java:57)
	at org.apache.tajo.engine.parser.SQLErrorStrategy.reportError(SQLErrorStrategy.java:35)
	at org.apache.tajo.engine.parser.SQLParser.table_reference(SQLParser.java:10002)
	at org.apache.tajo.engine.parser.SQLParser.table_reference_list(SQLParser.java:9925)
	at org.apache.tajo.engine.parser.SQLParser.from_clause(SQLParser.java:9874)
	at org.apache.tajo.engine.parser.SQLParser.table_expression(SQLParser.java:9781)
	at org.apache.tajo.engine.parser.SQLParser.query_specification(SQLParser.java:13541)
	at org.apache.tajo.engine.parser.SQLParser.simple_table(SQLParser.java:13251)
	at org.apache.tajo.engine.parser.SQLParser.non_join_query_primary(SQLParser.java:13190)
	at org.apache.tajo.engine.parser.SQLParser.non_join_query_term(SQLParser.java:13029)
	at org.apache.tajo.engine.parser.SQLParser.non_join_query_expression(SQLParser.java:12841)
	at org.apache.tajo.engine.parser.SQLParser.query_expression_body(SQLParser.java:12759)
	at org.apache.tajo.engine.parser.SQLParser.query_expression(SQLParser.java:12710)
	at org.apache.tajo.engine.parser.SQLParser.data_statement(SQLParser.java:669)
	at org.apache.tajo.engine.parser.SQLParser.statement(SQLParser.java:422)
	at org.apache.tajo.engine.parser.SQLParser.sql(SQLParser.java:307)
	at org.apache.tajo.engine.parser.SQLAnalyzer.parse(SQLAnalyzer.java:65)
{code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)