[jira] [Commented] (HIVE-9923) No clear message when "from" is missing

2015-04-21 Thread Yongzhi Chen (JIRA)

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

Yongzhi Chen commented on HIVE-9923:


Thanks [~szehon] and [~csun] for reviewing it.

> No clear message when "from" is missing
> ---
>
> Key: HIVE-9923
> URL: https://issues.apache.org/jira/browse/HIVE-9923
> Project: Hive
>  Issue Type: Bug
>Affects Versions: 1.0.0
>Reporter: Jeff Zhang
>Assignee: Yongzhi Chen
> Fix For: 1.2.0
>
> Attachments: HIVE-9923.1.patch, HIVE-9923.2.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 sb1.name, sb2.age 
> student_bucketed sb1 join student_bucketed sb2 on sb1.name=sb2.name;
> FAILED: NullPointerException null
> {code}



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


[jira] [Commented] (HIVE-9923) No clear message when "from" is missing

2015-04-20 Thread Chao Sun (JIRA)

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

Chao Sun commented on HIVE-9923:


+1. Sorry for the late review.

> No clear message when "from" is missing
> ---
>
> Key: HIVE-9923
> URL: https://issues.apache.org/jira/browse/HIVE-9923
> Project: Hive
>  Issue Type: Bug
>Affects Versions: 1.0.0
>Reporter: Jeff Zhang
>Assignee: Yongzhi Chen
> Attachments: HIVE-9923.1.patch, HIVE-9923.2.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 sb1.name, sb2.age 
> student_bucketed sb1 join student_bucketed sb2 on sb1.name=sb2.name;
> FAILED: NullPointerException null
> {code}



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


[jira] [Commented] (HIVE-9923) No clear message when "from" is missing

2015-04-17 Thread Szehon Ho (JIRA)

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

Szehon Ho commented on HIVE-9923:
-

It looks good on my side, +1

> No clear message when "from" is missing
> ---
>
> Key: HIVE-9923
> URL: https://issues.apache.org/jira/browse/HIVE-9923
> Project: Hive
>  Issue Type: Bug
>Affects Versions: 1.0.0
>Reporter: Jeff Zhang
>Assignee: Yongzhi Chen
> Attachments: HIVE-9923.1.patch, HIVE-9923.2.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 sb1.name, sb2.age 
> student_bucketed sb1 join student_bucketed sb2 on sb1.name=sb2.name;
> FAILED: NullPointerException null
> {code}



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


[jira] [Commented] (HIVE-9923) No clear message when "from" is missing

2015-04-17 Thread Chao (JIRA)

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

Chao commented on HIVE-9923:


OK, will take a look at this.

> No clear message when "from" is missing
> ---
>
> Key: HIVE-9923
> URL: https://issues.apache.org/jira/browse/HIVE-9923
> Project: Hive
>  Issue Type: Bug
>Affects Versions: 1.0.0
>Reporter: Jeff Zhang
>Assignee: Yongzhi Chen
> Attachments: HIVE-9923.1.patch, HIVE-9923.2.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 sb1.name, sb2.age 
> student_bucketed sb1 join student_bucketed sb2 on sb1.name=sb2.name;
> FAILED: NullPointerException null
> {code}



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


[jira] [Commented] (HIVE-9923) No clear message when "from" is missing

2015-04-17 Thread Yongzhi Chen (JIRA)

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

Yongzhi Chen commented on HIVE-9923:


And the 3 non minimr failures appear in this build too:
http://ec2-174-129-184-35.compute-1.amazonaws.com/jenkins/job/PreCommit-HIVE-TRUNK-Build/3470/testReport/

> No clear message when "from" is missing
> ---
>
> Key: HIVE-9923
> URL: https://issues.apache.org/jira/browse/HIVE-9923
> Project: Hive
>  Issue Type: Bug
>Affects Versions: 1.0.0
>Reporter: Jeff Zhang
>Assignee: Yongzhi Chen
> Attachments: HIVE-9923.1.patch, HIVE-9923.2.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 sb1.name, sb2.age 
> student_bucketed sb1 join student_bucketed sb2 on sb1.name=sb2.name;
> FAILED: NullPointerException null
> {code}



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


[jira] [Commented] (HIVE-9923) No clear message when "from" is missing

2015-04-17 Thread Yongzhi Chen (JIRA)

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

Yongzhi Chen commented on HIVE-9923:


[~szehon] or [~csun], could you review the code? Thanks

> No clear message when "from" is missing
> ---
>
> Key: HIVE-9923
> URL: https://issues.apache.org/jira/browse/HIVE-9923
> Project: Hive
>  Issue Type: Bug
>Affects Versions: 1.0.0
>Reporter: Jeff Zhang
>Assignee: Yongzhi Chen
> Attachments: HIVE-9923.1.patch, HIVE-9923.2.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 sb1.name, sb2.age 
> student_bucketed sb1 join student_bucketed sb2 on sb1.name=sb2.name;
> FAILED: NullPointerException null
> {code}



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


[jira] [Commented] (HIVE-9923) No clear message when "from" is missing

2015-04-17 Thread Yongzhi Chen (JIRA)

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

Yongzhi Chen commented on HIVE-9923:


The 16 test failures are not related to the change.
1. 13 minimr failures appear in many other precommit builds.
2. org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_union_view failed 23 
times in precommit builds.
3. two failure: 
org.apache.hadoop.hive.thrift.TestHadoop20SAuthBridge.testMetastoreProxyUser
org.apache.hadoop.hive.thrift.TestHadoop20SAuthBridge.testSaslWithHiveMetaStore 
does not call parser related code.


> No clear message when "from" is missing
> ---
>
> Key: HIVE-9923
> URL: https://issues.apache.org/jira/browse/HIVE-9923
> Project: Hive
>  Issue Type: Bug
>Affects Versions: 1.0.0
>Reporter: Jeff Zhang
>Assignee: Yongzhi Chen
> Attachments: HIVE-9923.1.patch, HIVE-9923.2.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 sb1.name, sb2.age 
> student_bucketed sb1 join student_bucketed sb2 on sb1.name=sb2.name;
> FAILED: NullPointerException null
> {code}



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


[jira] [Commented] (HIVE-9923) No clear message when "from" is missing

2015-04-17 Thread Hive QA (JIRA)

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

Hive QA commented on HIVE-9923:
---



{color:red}Overall{color}: -1 at least one tests failed

Here are the results of testing the latest attachment:
https://issues.apache.org/jira/secure/attachment/12725916/HIVE-9923.2.patch

{color:red}ERROR:{color} -1 due to 16 failed/errored test(s), 8712 tests 
executed
*Failed tests:*
{noformat}
TestMinimrCliDriver-bucketmapjoin6.q-constprog_partitioner.q-infer_bucket_sort_dyn_part.q-and-1-more
 - did not produce a TEST-*.xml file
TestMinimrCliDriver-external_table_with_space_in_location_path.q-infer_bucket_sort_merge.q-auto_sortmerge_join_16.q-and-1-more
 - did not produce a TEST-*.xml file
TestMinimrCliDriver-groupby2.q-import_exported_table.q-bucketizedhiveinputformat.q-and-1-more
 - did not produce a TEST-*.xml file
TestMinimrCliDriver-index_bitmap3.q-stats_counter_partitioned.q-temp_table_external.q-and-1-more
 - did not produce a TEST-*.xml file
TestMinimrCliDriver-infer_bucket_sort_map_operators.q-join1.q-bucketmapjoin7.q-and-1-more
 - did not produce a TEST-*.xml file
TestMinimrCliDriver-infer_bucket_sort_num_buckets.q-disable_merge_for_bucketing.q-uber_reduce.q-and-1-more
 - did not produce a TEST-*.xml file
TestMinimrCliDriver-infer_bucket_sort_reducers_power_two.q-scriptfile1.q-scriptfile1_win.q-and-1-more
 - did not produce a TEST-*.xml file
TestMinimrCliDriver-leftsemijoin_mr.q-load_hdfs_file_with_space_in_the_name.q-root_dir_external_table.q-and-1-more
 - did not produce a TEST-*.xml file
TestMinimrCliDriver-list_bucket_dml_10.q-bucket_num_reducers.q-bucket6.q-and-1-more
 - did not produce a TEST-*.xml file
TestMinimrCliDriver-load_fs2.q-file_with_header_footer.q-ql_rewrite_gbtoidx_cbo_1.q-and-1-more
 - did not produce a TEST-*.xml file
TestMinimrCliDriver-parallel_orderby.q-reduce_deduplicate.q-ql_rewrite_gbtoidx_cbo_2.q-and-1-more
 - did not produce a TEST-*.xml file
TestMinimrCliDriver-ql_rewrite_gbtoidx.q-smb_mapjoin_8.q - did not produce a 
TEST-*.xml file
TestMinimrCliDriver-schemeAuthority2.q-bucket4.q-input16_cc.q-and-1-more - did 
not produce a TEST-*.xml file
org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_union_view
org.apache.hadoop.hive.thrift.TestHadoop20SAuthBridge.testMetastoreProxyUser
org.apache.hadoop.hive.thrift.TestHadoop20SAuthBridge.testSaslWithHiveMetaStore
{noformat}

Test results: 
http://ec2-174-129-184-35.compute-1.amazonaws.com/jenkins/job/PreCommit-HIVE-TRUNK-Build/3468/testReport
Console output: 
http://ec2-174-129-184-35.compute-1.amazonaws.com/jenkins/job/PreCommit-HIVE-TRUNK-Build/3468/console
Test logs: 
http://ec2-174-129-184-35.compute-1.amazonaws.com/logs/PreCommit-HIVE-TRUNK-Build-3468/

Messages:
{noformat}
Executing org.apache.hive.ptest.execution.PrepPhase
Executing org.apache.hive.ptest.execution.ExecutionPhase
Executing org.apache.hive.ptest.execution.ReportingPhase
Tests exited with: TestsFailedException: 16 tests failed
{noformat}

This message is automatically generated.

ATTACHMENT ID: 12725916 - PreCommit-HIVE-TRUNK-Build

> No clear message when "from" is missing
> ---
>
> Key: HIVE-9923
> URL: https://issues.apache.org/jira/browse/HIVE-9923
> Project: Hive
>  Issue Type: Bug
>Affects Versions: 1.0.0
>Reporter: Jeff Zhang
>Assignee: Yongzhi Chen
> Attachments: HIVE-9923.1.patch, HIVE-9923.2.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 sb1.name, sb2.age 
> student_bucketed sb1 join student_bucketed sb2 on sb1.name=sb2.name;
> FAILED: NullPointerException null
> {code}



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


[jira] [Commented] (HIVE-9923) No clear message when "from" is missing

2015-04-16 Thread Yongzhi Chen (JIRA)

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

Yongzhi Chen commented on HIVE-9923:


Hive support simple select without from statement (when there is a UDF). When 
select  in an insert statement, hive need the from clause. The new patch only 
check from clause null or not in the insert statement. 

> No clear message when "from" is missing
> ---
>
> Key: HIVE-9923
> URL: https://issues.apache.org/jira/browse/HIVE-9923
> 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 sb1.name, sb2.age 
> student_bucketed sb1 join student_bucketed sb2 on sb1.name=sb2.name;
> FAILED: NullPointerException null
> {code}



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


[jira] [Commented] (HIVE-9923) No clear message when "from" is missing

2015-04-15 Thread Hive QA (JIRA)

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

Hive QA commented on HIVE-9923:
---



{color:red}Overall{color}: -1 at least one tests failed

Here are the results of testing the latest attachment:
https://issues.apache.org/jira/secure/attachment/12725615/HIVE-9923.1.patch

{color:red}ERROR:{color} -1 due to 57 failed/errored test(s), 8690 tests 
executed
*Failed tests:*
{noformat}
TestMinimrCliDriver-bucketmapjoin6.q-constprog_partitioner.q-infer_bucket_sort_dyn_part.q-and-1-more
 - did not produce a TEST-*.xml file
TestMinimrCliDriver-external_table_with_space_in_location_path.q-infer_bucket_sort_merge.q-auto_sortmerge_join_16.q-and-1-more
 - did not produce a TEST-*.xml file
TestMinimrCliDriver-groupby2.q-import_exported_table.q-bucketizedhiveinputformat.q-and-1-more
 - did not produce a TEST-*.xml file
TestMinimrCliDriver-index_bitmap3.q-stats_counter_partitioned.q-temp_table_external.q-and-1-more
 - did not produce a TEST-*.xml file
TestMinimrCliDriver-infer_bucket_sort_map_operators.q-join1.q-bucketmapjoin7.q-and-1-more
 - did not produce a TEST-*.xml file
TestMinimrCliDriver-infer_bucket_sort_num_buckets.q-disable_merge_for_bucketing.q-uber_reduce.q-and-1-more
 - did not produce a TEST-*.xml file
TestMinimrCliDriver-infer_bucket_sort_reducers_power_two.q-scriptfile1.q-scriptfile1_win.q-and-1-more
 - did not produce a TEST-*.xml file
TestMinimrCliDriver-leftsemijoin_mr.q-load_hdfs_file_with_space_in_the_name.q-root_dir_external_table.q-and-1-more
 - did not produce a TEST-*.xml file
TestMinimrCliDriver-list_bucket_dml_10.q-bucket_num_reducers.q-bucket6.q-and-1-more
 - did not produce a TEST-*.xml file
TestMinimrCliDriver-load_fs2.q-file_with_header_footer.q-ql_rewrite_gbtoidx_cbo_1.q-and-1-more
 - did not produce a TEST-*.xml file
TestMinimrCliDriver-parallel_orderby.q-reduce_deduplicate.q-ql_rewrite_gbtoidx_cbo_2.q-and-1-more
 - did not produce a TEST-*.xml file
TestMinimrCliDriver-ql_rewrite_gbtoidx.q-smb_mapjoin_8.q - did not produce a 
TEST-*.xml file
TestMinimrCliDriver-schemeAuthority2.q-bucket4.q-input16_cc.q-and-1-more - did 
not produce a TEST-*.xml file
org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_select_dummy_source
org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_timestamp_literal
org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_udf_add_months
org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_udf_bitwise_shiftleft
org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_udf_bitwise_shiftright
org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_udf_bitwise_shiftrightunsigned
org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_udf_cbrt
org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_udf_current_database
org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_udf_date_add
org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_udf_date_sub
org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_udf_decode
org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_udf_factorial
org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_udf_format_number
org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_udf_from_utc_timestamp
org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_udf_get_json_object
org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_udf_last_day
org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_udf_levenshtein
org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_udf_months_between
org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_udf_soundex
org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_udf_to_utc_timestamp
org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_udf_trunc
org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_udtf_stack
org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_union_view
org.apache.hadoop.hive.cli.TestMiniTezCliDriver.testCliDriver_explainuser_1
org.apache.hadoop.hive.cli.TestMiniTezCliDriver.testCliDriver_select_dummy_source
org.apache.hadoop.hive.cli.TestNegativeCliDriver.testNegativeCliDriver_ptf_negative_DistributeByOrderBy
org.apache.hadoop.hive.cli.TestNegativeCliDriver.testNegativeCliDriver_ptf_negative_PartitionBySortBy
org.apache.hadoop.hive.cli.TestNegativeCliDriver.testNegativeCliDriver_select_star_suffix
org.apache.hadoop.hive.cli.TestNegativeCliDriver.testNegativeCliDriver_select_udtf_alias
org.apache.hadoop.hive.cli.TestNegativeCliDriver.testNegativeCliDriver_subquery_missing_from
org.apache.hadoop.hive.cli.TestNegativeCliDriver.testNegativeCliDriver_timestamp_literal
org.apache.hadoop.hive.cli.TestNegativeCliDriver.testNegativeCliDriver_udf_add_months_error_1
org.apache.hadoop.hive.cli.TestNegativeCliDriver.testNegativeCliDriver_udf_add_months_error_2
org.apache.hadoop.hive.cli.TestNegativeCliDriver.testNegativeCliDriver_udf_last_day_error_1
org.apache.hadoop.hive.cli.TestNegativeCliDriver.testNegativeCliDriver_udf_last_day_

[jira] [Commented] (HIVE-9923) No clear message when "from" is missing

2015-04-15 Thread Yongzhi Chen (JIRA)

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

Yongzhi Chen commented on HIVE-9923:


The NullPointerException stack is:
{noformat}
Caused by: java.lang.NullPointerException
at 
org.apache.hadoop.hive.ql.parse.HiveParser.regularBody(HiveParser.java:40882)
at 
org.apache.hadoop.hive.ql.parse.HiveParser.queryStatementExpressionBody(HiveParser.java:40059)
at 
org.apache.hadoop.hive.ql.parse.HiveParser.queryStatementExpression(HiveParser.java:39929)
at 
org.apache.hadoop.hive.ql.parse.HiveParser.execStatement(HiveParser.java:1574)
at 
org.apache.hadoop.hive.ql.parse.HiveParser.statement(HiveParser.java:1093)
at 
org.apache.hadoop.hive.ql.parse.ParseDriver.parse(ParseDriver.java:202)
at 
org.apache.hadoop.hive.ql.parse.ParseDriver.parse(ParseDriver.java:166)
at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:396)
at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:308)
at org.apache.hadoop.hive.ql.Driver.compileInternal(Driver.java:1122)
at org.apache.hadoop.hive.ql.Driver.compileAndRespond(Driver.java:1116)
at 
org.apache.hive.service.cli.operation.SQLOperation.prepare(SQLOperation.java:110)
... 27 more

{noformat}
It is from HiveParser.java:
{noformat}
   if ( state.backtracking==0 ) 
{(s!=null?((CommonTree)s.tree):null).getChild(1).replaceChildren(0, 0, 
(i!=null?((CommonTree)i.tree):null));}
{noformat}
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: https://issues.apache.org/jira/browse/HIVE-9923
> 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 sb1.name, sb2.age 
> student_bucketed sb1 join student_bucketed sb2 on sb1.name=sb2.name;
> FAILED: NullPointerException null
> {code}



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