hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yongzhi Chen (JIRA)" <>
Subject [jira] [Commented] (HIVE-9923) No clear message when "from" is missing
Date Wed, 15 Apr 2015 16:13:58 GMT


Yongzhi Chen commented on HIVE-9923:

The NullPointerException stack is:
Caused by: java.lang.NullPointerException
	at org.apache.hadoop.hive.ql.parse.HiveParser.regularBody(
	at org.apache.hadoop.hive.ql.parse.HiveParser.queryStatementExpressionBody(
	at org.apache.hadoop.hive.ql.parse.HiveParser.queryStatementExpression(
	at org.apache.hadoop.hive.ql.parse.HiveParser.execStatement(
	at org.apache.hadoop.hive.ql.parse.HiveParser.statement(
	at org.apache.hadoop.hive.ql.parse.ParseDriver.parse(
	at org.apache.hadoop.hive.ql.parse.ParseDriver.parse(
	at org.apache.hadoop.hive.ql.Driver.compile(
	at org.apache.hadoop.hive.ql.Driver.compile(
	at org.apache.hadoop.hive.ql.Driver.compileInternal(
	at org.apache.hadoop.hive.ql.Driver.compileAndRespond(
	at org.apache.hive.service.cli.operation.SQLOperation.prepare(
	... 27 more

It is from
                           if ( state.backtracking==0 ) {(s!=null?((CommonTree)s.tree):null).getChild(1).replaceChildren(0,
0, (i!=null?((CommonTree)i.tree):null));}
Where there is no from key word, the getChild(1) will be null, then the exception thrown.
When insert with select statement, a "from" should be required not optional. Make the parser
change to let it error out before reach getChild(1). 

> No clear message when "from" is missing
> ---------------------------------------
>                 Key: HIVE-9923
>                 URL:
>             Project: Hive
>          Issue Type: Bug
>    Affects Versions: 1.0.0
>            Reporter: Jeff Zhang
>            Assignee: Yongzhi Chen
>         Attachments: HIVE-9923.1.patch
> For the following sql, "from" is missing but it throw NPE which is not clear for user.
> {code}
> hive> insert overwrite directory '/tmp/hive-3' select, sb2.age student_bucketed
sb1 join student_bucketed sb2 on;
> FAILED: NullPointerException null
> {code}

This message was sent by Atlassian JIRA

View raw message