[jira] [Commented] (HIVE-2155) Improve error messages emitted during semantic analysis

2011-07-13 Thread Hudson (JIRA)

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

Hudson commented on HIVE-2155:
--

Integrated in Hive-trunk-h0.21 #824 (See 
[https://builds.apache.org/job/Hive-trunk-h0.21/824/])
HIVE-2281. Regression introduced from HIVE-2155 (Syed S. Albiz via Ning 
Zhang)

nzhang : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1146100
Files : 
* /hive/trunk/ql/src/test/results/clientnegative/nonkey_groupby.q.out
* /hive/trunk/ql/src/test/queries/clientnegative/nonkey_groupby.q
* 
/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/TypeCheckProcFactory.java


> Improve error messages emitted during semantic analysis
> ---
>
> Key: HIVE-2155
> URL: https://issues.apache.org/jira/browse/HIVE-2155
> Project: Hive
>  Issue Type: Improvement
>Reporter: Syed S. Albiz
>Assignee: Syed S. Albiz
> Fix For: 0.8.0
>
> Attachments: HIVE-2155.1.patch, HIVE-2155.2.patch, HIVE-2155.3.patch, 
> HIVE-2155.4.patch, HIVE-2155.5.patch
>
>
> Follow-up to HIVE-1731.
> A number of issues raised in HIVE-1731 were caused by SemanticAnalyzer not 
> reporting errors correctly.
> Specifically, the following issues need to be addressed:
> - Line numbers are not always provided and sometimes emitted as (0:-1), which 
> is useless
> - Insufficient or unclear context strings are provided
> Specific issues described in HIVE-1731:
> FAILED: Error in semantic analysis: Schema of both sides of union should 
> match: destinationid:_col1 _col2
> * No line/col numbers, context strings provide internal aliases instead of 
> actual column names
> FAILED: Error in semantic analysis: line 0:-1 Both Left and Right Aliases 
> Encountered in Join time
> * Incorrect line/col number info, no context strings to describe the aliases 
> encountered
> FAILED: Error in semantic analysis: AS clause has an invalid number of aliases
> * No line/col numbers, not context string to show the aliases encountered
> FAILED: Error in semantic analysis: line 1:94 Expression Not In Group By Key a
> * testcase: SELECT a.id, VAR(a.cnt) FROM mytable a
> * Context string is unhelpful, needs to provide the actual expression, not 
> just the table reference

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (HIVE-2155) Improve error messages emitted during semantic analysis

2011-05-16 Thread Hudson (JIRA)

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

Hudson commented on HIVE-2155:
--

Integrated in Hive-trunk-h0.20 #732 (See 
[https://builds.apache.org/hudson/job/Hive-trunk-h0.20/732/])
HIVE-2155. Improve error messages emitted during semantic analysis
(Syed Albiz via jvs)


> Improve error messages emitted during semantic analysis
> ---
>
> Key: HIVE-2155
> URL: https://issues.apache.org/jira/browse/HIVE-2155
> Project: Hive
>  Issue Type: Improvement
>Reporter: Syed S. Albiz
>Assignee: Syed S. Albiz
> Fix For: 0.8.0
>
> Attachments: HIVE-2155.1.patch, HIVE-2155.2.patch, HIVE-2155.3.patch, 
> HIVE-2155.4.patch, HIVE-2155.5.patch
>
>
> Follow-up to HIVE-1731.
> A number of issues raised in HIVE-1731 were caused by SemanticAnalyzer not 
> reporting errors correctly.
> Specifically, the following issues need to be addressed:
> - Line numbers are not always provided and sometimes emitted as (0:-1), which 
> is useless
> - Insufficient or unclear context strings are provided
> Specific issues described in HIVE-1731:
> FAILED: Error in semantic analysis: Schema of both sides of union should 
> match: destinationid:_col1 _col2
> * No line/col numbers, context strings provide internal aliases instead of 
> actual column names
> FAILED: Error in semantic analysis: line 0:-1 Both Left and Right Aliases 
> Encountered in Join time
> * Incorrect line/col number info, no context strings to describe the aliases 
> encountered
> FAILED: Error in semantic analysis: AS clause has an invalid number of aliases
> * No line/col numbers, not context string to show the aliases encountered
> FAILED: Error in semantic analysis: line 1:94 Expression Not In Group By Key a
> * testcase: SELECT a.id, VAR(a.cnt) FROM mytable a
> * Context string is unhelpful, needs to provide the actual expression, not 
> just the table reference

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (HIVE-2155) Improve error messages emitted during semantic analysis

2011-05-16 Thread John Sichi (JIRA)

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

John Sichi commented on HIVE-2155:
--

+1.  Will commit when tests pass.


> Improve error messages emitted during semantic analysis
> ---
>
> Key: HIVE-2155
> URL: https://issues.apache.org/jira/browse/HIVE-2155
> Project: Hive
>  Issue Type: Improvement
>Reporter: Syed S. Albiz
>Assignee: Syed S. Albiz
> Attachments: HIVE-2155.1.patch, HIVE-2155.2.patch, HIVE-2155.3.patch, 
> HIVE-2155.4.patch, HIVE-2155.5.patch
>
>
> Follow-up to HIVE-1731.
> A number of issues raised in HIVE-1731 were caused by SemanticAnalyzer not 
> reporting errors correctly.
> Specifically, the following issues need to be addressed:
> - Line numbers are not always provided and sometimes emitted as (0:-1), which 
> is useless
> - Insufficient or unclear context strings are provided
> Specific issues described in HIVE-1731:
> FAILED: Error in semantic analysis: Schema of both sides of union should 
> match: destinationid:_col1 _col2
> * No line/col numbers, context strings provide internal aliases instead of 
> actual column names
> FAILED: Error in semantic analysis: line 0:-1 Both Left and Right Aliases 
> Encountered in Join time
> * Incorrect line/col number info, no context strings to describe the aliases 
> encountered
> FAILED: Error in semantic analysis: AS clause has an invalid number of aliases
> * No line/col numbers, not context string to show the aliases encountered
> FAILED: Error in semantic analysis: line 1:94 Expression Not In Group By Key a
> * testcase: SELECT a.id, VAR(a.cnt) FROM mytable a
> * Context string is unhelpful, needs to provide the actual expression, not 
> just the table reference

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (HIVE-2155) Improve error messages emitted during semantic analysis

2011-05-16 Thread John Sichi (JIRA)

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

John Sichi commented on HIVE-2155:
--

I added *'s on a bunch of places that should be using the new "Encountered 
near" phrasing.

Also, the fugliness is still there for the GROUP BY stuff.  Those internal 
nodes should never be printed at all.  Did you look into trying to get it to 
print the column instead of the table?


> Improve error messages emitted during semantic analysis
> ---
>
> Key: HIVE-2155
> URL: https://issues.apache.org/jira/browse/HIVE-2155
> Project: Hive
>  Issue Type: Improvement
>Reporter: Syed S. Albiz
>Assignee: Syed S. Albiz
> Attachments: HIVE-2155.1.patch, HIVE-2155.2.patch, HIVE-2155.3.patch, 
> HIVE-2155.4.patch
>
>
> Follow-up to HIVE-1731.
> A number of issues raised in HIVE-1731 were caused by SemanticAnalyzer not 
> reporting errors correctly.
> Specifically, the following issues need to be addressed:
> - Line numbers are not always provided and sometimes emitted as (0:-1), which 
> is useless
> - Insufficient or unclear context strings are provided
> Specific issues described in HIVE-1731:
> FAILED: Error in semantic analysis: Schema of both sides of union should 
> match: destinationid:_col1 _col2
> * No line/col numbers, context strings provide internal aliases instead of 
> actual column names
> FAILED: Error in semantic analysis: line 0:-1 Both Left and Right Aliases 
> Encountered in Join time
> * Incorrect line/col number info, no context strings to describe the aliases 
> encountered
> FAILED: Error in semantic analysis: AS clause has an invalid number of aliases
> * No line/col numbers, not context string to show the aliases encountered
> FAILED: Error in semantic analysis: line 1:94 Expression Not In Group By Key a
> * testcase: SELECT a.id, VAR(a.cnt) FROM mytable a
> * Context string is unhelpful, needs to provide the actual expression, not 
> just the table reference

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (HIVE-2155) Improve error messages emitted during semantic analysis

2011-05-13 Thread jirapos...@reviews.apache.org (JIRA)

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

jirapos...@reviews.apache.org commented on HIVE-2155:
-


---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/731/
---

(Updated 2011-05-14 01:05:47.070322)


Review request for hive and John Sichi.


Changes
---

Made the following changes:
- Updated existing error messages to use the 'Error encountered near https://issues.apache.org/jira/browse/HIVE-2155


Diffs (updated)
-

  common/src/java/org/apache/hadoop/hive/conf/HiveConf.java dc96a1f 
  ql/src/java/org/apache/hadoop/hive/ql/parse/BaseSemanticAnalyzer.java 2fe37b6 
  ql/src/java/org/apache/hadoop/hive/ql/parse/ErrorMsg.java 4ddf5b9 
  ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java 9cb407c 
  ql/src/java/org/apache/hadoop/hive/ql/parse/TypeCheckProcFactory.java bca37fd 
  ql/src/test/queries/clientnegative/union3.q PRE-CREATION 
  ql/src/test/results/clientnegative/analyze_view.q.out ef76106 
  ql/src/test/results/clientnegative/clusterbydistributeby.q.out 4c1ebfb 
  ql/src/test/results/clientnegative/clusterbysortby.q.out f76d4a7 
  ql/src/test/results/clientnegative/clustern3.q.out da71016 
  ql/src/test/results/clientnegative/clustern4.q.out 1519e48 
  ql/src/test/results/clientnegative/create_view_failure3.q.out 70e365a 
  ql/src/test/results/clientnegative/ctas.q.out a39fb7c 
  ql/src/test/results/clientnegative/ddltime.q.out 11d00c3 
  ql/src/test/results/clientnegative/drop_partition_failure.q.out 1a0ac10 
  ql/src/test/results/clientnegative/dyn_part2.q.out cc0cd3c 
  ql/src/test/results/clientnegative/dyn_part_merge.q.out cab97f7 
  ql/src/test/results/clientnegative/fileformat_void_input.q.out 5a7a05a 
  ql/src/test/results/clientnegative/groupby_key.q.out c6218a4 
  ql/src/test/results/clientnegative/input1.q.out 73f1657 
  ql/src/test/results/clientnegative/input2.q.out 0c460a6 
  ql/src/test/results/clientnegative/invalid_create_tbl1.q.out d091d8c 
  ql/src/test/results/clientnegative/invalid_t_alter1.q.out f7ae626 
  ql/src/test/results/clientnegative/invalid_t_alter2.q.out f7ae626 
  ql/src/test/results/clientnegative/invalid_t_create1.q.out d091d8c 
  ql/src/test/results/clientnegative/invalid_t_create2.q.out d091d8c 
  ql/src/test/results/clientnegative/invalid_t_create3.q.out d091d8c 
  ql/src/test/results/clientnegative/invalid_t_transform.q.out d091d8c 
  ql/src/test/results/clientnegative/invalidate_view1.q.out 9f61228 
  ql/src/test/results/clientnegative/joinneg.q.out d85d508 
  ql/src/test/results/clientnegative/line_terminator.q.out b672bd8 
  ql/src/test/results/clientnegative/load_part_nospec.q.out 251c7e1 
  ql/src/test/results/clientnegative/load_wrong_noof_part.q.out 4d8c8d8 
  ql/src/test/results/clientnegative/nopart_insert.q.out 42bca76 
  ql/src/test/results/clientnegative/nopart_load.q.out 31376c8 
  ql/src/test/results/clientnegative/notable_alias3.q.out d48d5e1 
  ql/src/test/results/clientnegative/orderbysortby.q.out 73b83a4 
  ql/src/test/results/clientnegative/regex_col_1.q.out 7547858 
  ql/src/test/results/clientnegative/regex_col_2.q.out f570010 
  ql/src/test/results/clientnegative/regex_col_groupby.q.out 8497718 
  ql/src/test/results/clientnegative/semijoin1.q.out 739931f 
  ql/src/test/results/clientnegative/semijoin2.q.out 2b418de 
  ql/src/test/results/clientnegative/semijoin3.q.out a803b50 
  ql/src/test/results/clientnegative/semijoin4.q.out 86a834b 
  ql/src/test/results/clientnegative/split_sample_out_of_range.q.out 0761955 
  ql/src/test/results/clientnegative/split_sample_wrong_format.q.out 19b1417 
  ql/src/test/results/clientnegative/strict_orderby.q.out 2d3ba6b 
  ql/src/test/results/clientnegative/subq_insert.q.out 8c3ce79 
  ql/src/test/results/clientnegative/udf_array_contains_wrong1.q.out d6b98b4 
  ql/src/test/results/clientnegative/udf_array_contains_wrong2.q.out 7b8dca6 
  ql/src/test/results/clientnegative/udf_case_type_wrong.q.out 75b9638 
  ql/src/test/results/clientnegative/udf_case_type_wrong2.q.out 126fa4e 
  ql/src/test/results/clientnegative/udf_case_type_wrong3.q.out fd62771 
  ql/src/test/results/clientnegative/udf_coalesce.q.out a5279f5 
  ql/src/test/results/clientnegative/udf_elt_wrong_args_len.q.out 22a085a 
  ql/src/test/results/clientnegative/udf_elt_wrong_type.q.out fc83f23 
  ql/src/test/results/clientnegative/udf_field_wrong_args_len.q.out 3bf97d9 
  ql/src/test/results/clientnegative/udf_field_wrong_type.q.out 2a2e944 
  ql/src/test/results/clientnegative/udf_if_not_bool.q.out a3c8902 
  ql/src/test/results/clientnegative/udf_if_wrong_args_len.q.out 89b23c8 
  ql/src/test/results/clientnegative/udf_in.q.out 50a6b98 
  ql/src/test/results/clientnegative/udf_instr_wron

[jira] [Commented] (HIVE-2155) Improve error messages emitted during semantic analysis

2011-05-13 Thread jirapos...@reviews.apache.org (JIRA)

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

jirapos...@reviews.apache.org commented on HIVE-2155:
-


---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/731/#review669
---



ql/src/test/results/clientnegative/create_view_failure3.q.out


This is an example where an existing error should have been using the new 
"Error encountered...".  You can either take care of these now, or open a 
followup for that.



ql/src/test/results/clientnegative/ddltime.q.out


Need a period before "Error encountered...".  That's true in general;.




ql/src/test/results/clientnegative/groupby_key.q.out


This is kinda ugly...


- John


On 2011-05-12 23:44:48, Syed Albiz wrote:
bq.  
bq.  ---
bq.  This is an automatically generated e-mail. To reply, visit:
bq.  https://reviews.apache.org/r/731/
bq.  ---
bq.  
bq.  (Updated 2011-05-12 23:44:48)
bq.  
bq.  
bq.  Review request for hive and John Sichi.
bq.  
bq.  
bq.  Summary
bq.  ---
bq.  
bq.  Attaches line/column number to the vast majority of SemanticExceptions 
thrown. In addition, the context strings for the error messages relating to 
UNION ALLs and GROUP BY keys have been changed to provide more meaningful 
context.
bq.  
bq.  
bq.  This addresses bug HIVE-2155.
bq.  https://issues.apache.org/jira/browse/HIVE-2155
bq.  
bq.  
bq.  Diffs
bq.  -
bq.  
bq.common/src/java/org/apache/hadoop/hive/conf/HiveConf.java dc96a1f 
bq.ql/src/java/org/apache/hadoop/hive/ql/parse/BaseSemanticAnalyzer.java 
2fe37b6 
bq.ql/src/java/org/apache/hadoop/hive/ql/parse/ErrorMsg.java 4ddf5b9 
bq.ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java 
9cb407c 
bq.ql/src/java/org/apache/hadoop/hive/ql/parse/TypeCheckProcFactory.java 
bca37fd 
bq.ql/src/test/queries/clientnegative/union3.q PRE-CREATION 
bq.ql/src/test/results/clientnegative/analyze_view.q.out ef76106 
bq.ql/src/test/results/clientnegative/clusterbydistributeby.q.out 4c1ebfb 
bq.ql/src/test/results/clientnegative/clusterbysortby.q.out f76d4a7 
bq.ql/src/test/results/clientnegative/clustern3.q.out da71016 
bq.ql/src/test/results/clientnegative/clustern4.q.out 1519e48 
bq.ql/src/test/results/clientnegative/create_view_failure3.q.out 70e365a 
bq.ql/src/test/results/clientnegative/ddltime.q.out 11d00c3 
bq.ql/src/test/results/clientnegative/drop_partition_failure.q.out 1a0ac10 
bq.ql/src/test/results/clientnegative/dyn_part2.q.out cc0cd3c 
bq.ql/src/test/results/clientnegative/fileformat_void_input.q.out 5a7a05a 
bq.ql/src/test/results/clientnegative/groupby_key.q.out c6218a4 
bq.ql/src/test/results/clientnegative/input1.q.out 73f1657 
bq.ql/src/test/results/clientnegative/input2.q.out 0c460a6 
bq.ql/src/test/results/clientnegative/invalidate_view1.q.out 9f61228 
bq.ql/src/test/results/clientnegative/joinneg.q.out d85d508 
bq.ql/src/test/results/clientnegative/line_terminator.q.out b672bd8 
bq.ql/src/test/results/clientnegative/load_wrong_noof_part.q.out 4d8c8d8 
bq.ql/src/test/results/clientnegative/nopart_insert.q.out 42bca76 
bq.ql/src/test/results/clientnegative/notable_alias3.q.out d48d5e1 
bq.ql/src/test/results/clientnegative/orderbysortby.q.out 73b83a4 
bq.ql/src/test/results/clientnegative/regex_col_1.q.out 7547858 
bq.ql/src/test/results/clientnegative/regex_col_2.q.out f570010 
bq.ql/src/test/results/clientnegative/regex_col_groupby.q.out 8497718 
bq.ql/src/test/results/clientnegative/semijoin1.q.out 739931f 
bq.ql/src/test/results/clientnegative/semijoin2.q.out 2b418de 
bq.ql/src/test/results/clientnegative/semijoin3.q.out a803b50 
bq.ql/src/test/results/clientnegative/semijoin4.q.out 86a834b 
bq.ql/src/test/results/clientnegative/split_sample_out_of_range.q.out 
0761955 
bq.ql/src/test/results/clientnegative/split_sample_wrong_format.q.out 
19b1417 
bq.ql/src/test/results/clientnegative/strict_orderby.q.out 2d3ba6b 
bq.ql/src/test/results/clientnegative/subq_insert.q.out 8c3ce79 
bq.ql/src/test/results/clientnegative/udf_array_contains_wrong1.q.out 
d6b98b4 
bq.ql/src/test/results/clientnegative/udf_array_contains_wrong2.q.out 
7b8dca6 
bq.ql/src/test/results/clientnegative/udf_case_type_wrong.q.out 75b9638 
bq.ql/src/test/results/clientnegative/udf_case_type_wrong2.q.out 126fa4e 
bq.ql/src/test/results/clientnegative/udf_case_type_wrong3.q.o

[jira] [Commented] (HIVE-2155) Improve error messages emitted during semantic analysis

2011-05-13 Thread John Sichi (JIRA)

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

John Sichi commented on HIVE-2155:
--

Added a few comments in review board.

> Improve error messages emitted during semantic analysis
> ---
>
> Key: HIVE-2155
> URL: https://issues.apache.org/jira/browse/HIVE-2155
> Project: Hive
>  Issue Type: Improvement
>Reporter: Syed S. Albiz
>Assignee: Syed S. Albiz
> Attachments: HIVE-2155.1.patch, HIVE-2155.2.patch, HIVE-2155.3.patch
>
>
> Follow-up to HIVE-1731.
> A number of issues raised in HIVE-1731 were caused by SemanticAnalyzer not 
> reporting errors correctly.
> Specifically, the following issues need to be addressed:
> - Line numbers are not always provided and sometimes emitted as (0:-1), which 
> is useless
> - Insufficient or unclear context strings are provided
> Specific issues described in HIVE-1731:
> FAILED: Error in semantic analysis: Schema of both sides of union should 
> match: destinationid:_col1 _col2
> * No line/col numbers, context strings provide internal aliases instead of 
> actual column names
> FAILED: Error in semantic analysis: line 0:-1 Both Left and Right Aliases 
> Encountered in Join time
> * Incorrect line/col number info, no context strings to describe the aliases 
> encountered
> FAILED: Error in semantic analysis: AS clause has an invalid number of aliases
> * No line/col numbers, not context string to show the aliases encountered
> FAILED: Error in semantic analysis: line 1:94 Expression Not In Group By Key a
> * testcase: SELECT a.id, VAR(a.cnt) FROM mytable a
> * Context string is unhelpful, needs to provide the actual expression, not 
> just the table reference

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (HIVE-2155) Improve error messages emitted during semantic analysis

2011-05-12 Thread jirapos...@reviews.apache.org (JIRA)

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

jirapos...@reviews.apache.org commented on HIVE-2155:
-


---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/731/
---

(Updated 2011-05-12 23:44:48.689718)


Review request for hive and John Sichi.


Changes
---

Updated based on John's comments in the JIRA, instead of changing the overall 
structure, I decided to move the logic to print that context token into the new 
generateErrorMessage, which prevents breaking existing error messages which 
rely on that behavior.


Summary
---

Attaches line/column number to the vast majority of SemanticExceptions thrown. 
In addition, the context strings for the error messages relating to UNION ALLs 
and GROUP BY keys have been changed to provide more meaningful context.


This addresses bug HIVE-2155.
https://issues.apache.org/jira/browse/HIVE-2155


Diffs (updated)
-

  common/src/java/org/apache/hadoop/hive/conf/HiveConf.java dc96a1f 
  ql/src/java/org/apache/hadoop/hive/ql/parse/BaseSemanticAnalyzer.java 2fe37b6 
  ql/src/java/org/apache/hadoop/hive/ql/parse/ErrorMsg.java 4ddf5b9 
  ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java 9cb407c 
  ql/src/java/org/apache/hadoop/hive/ql/parse/TypeCheckProcFactory.java bca37fd 
  ql/src/test/queries/clientnegative/union3.q PRE-CREATION 
  ql/src/test/results/clientnegative/analyze_view.q.out ef76106 
  ql/src/test/results/clientnegative/clusterbydistributeby.q.out 4c1ebfb 
  ql/src/test/results/clientnegative/clusterbysortby.q.out f76d4a7 
  ql/src/test/results/clientnegative/clustern3.q.out da71016 
  ql/src/test/results/clientnegative/clustern4.q.out 1519e48 
  ql/src/test/results/clientnegative/create_view_failure3.q.out 70e365a 
  ql/src/test/results/clientnegative/ddltime.q.out 11d00c3 
  ql/src/test/results/clientnegative/drop_partition_failure.q.out 1a0ac10 
  ql/src/test/results/clientnegative/dyn_part2.q.out cc0cd3c 
  ql/src/test/results/clientnegative/fileformat_void_input.q.out 5a7a05a 
  ql/src/test/results/clientnegative/groupby_key.q.out c6218a4 
  ql/src/test/results/clientnegative/input1.q.out 73f1657 
  ql/src/test/results/clientnegative/input2.q.out 0c460a6 
  ql/src/test/results/clientnegative/invalidate_view1.q.out 9f61228 
  ql/src/test/results/clientnegative/joinneg.q.out d85d508 
  ql/src/test/results/clientnegative/line_terminator.q.out b672bd8 
  ql/src/test/results/clientnegative/load_wrong_noof_part.q.out 4d8c8d8 
  ql/src/test/results/clientnegative/nopart_insert.q.out 42bca76 
  ql/src/test/results/clientnegative/notable_alias3.q.out d48d5e1 
  ql/src/test/results/clientnegative/orderbysortby.q.out 73b83a4 
  ql/src/test/results/clientnegative/regex_col_1.q.out 7547858 
  ql/src/test/results/clientnegative/regex_col_2.q.out f570010 
  ql/src/test/results/clientnegative/regex_col_groupby.q.out 8497718 
  ql/src/test/results/clientnegative/semijoin1.q.out 739931f 
  ql/src/test/results/clientnegative/semijoin2.q.out 2b418de 
  ql/src/test/results/clientnegative/semijoin3.q.out a803b50 
  ql/src/test/results/clientnegative/semijoin4.q.out 86a834b 
  ql/src/test/results/clientnegative/split_sample_out_of_range.q.out 0761955 
  ql/src/test/results/clientnegative/split_sample_wrong_format.q.out 19b1417 
  ql/src/test/results/clientnegative/strict_orderby.q.out 2d3ba6b 
  ql/src/test/results/clientnegative/subq_insert.q.out 8c3ce79 
  ql/src/test/results/clientnegative/udf_array_contains_wrong1.q.out d6b98b4 
  ql/src/test/results/clientnegative/udf_array_contains_wrong2.q.out 7b8dca6 
  ql/src/test/results/clientnegative/udf_case_type_wrong.q.out 75b9638 
  ql/src/test/results/clientnegative/udf_case_type_wrong2.q.out 126fa4e 
  ql/src/test/results/clientnegative/udf_case_type_wrong3.q.out fd62771 
  ql/src/test/results/clientnegative/udf_coalesce.q.out a5279f5 
  ql/src/test/results/clientnegative/udf_elt_wrong_args_len.q.out 22a085a 
  ql/src/test/results/clientnegative/udf_elt_wrong_type.q.out fc83f23 
  ql/src/test/results/clientnegative/udf_field_wrong_args_len.q.out 3bf97d9 
  ql/src/test/results/clientnegative/udf_field_wrong_type.q.out 2a2e944 
  ql/src/test/results/clientnegative/udf_if_not_bool.q.out a3c8902 
  ql/src/test/results/clientnegative/udf_if_wrong_args_len.q.out 89b23c8 
  ql/src/test/results/clientnegative/udf_in.q.out 50a6b98 
  ql/src/test/results/clientnegative/udf_instr_wrong_args_len.q.out 7f66db7 
  ql/src/test/results/clientnegative/udf_instr_wrong_type.q.out 89d8542 
  ql/src/test/results/clientnegative/udf_locate_wrong_args_len.q.out 46613e8 
  ql/src/test/results/clientnegative/udf_locate_wrong_type.q.out 42cc4b6 
  ql/src/test/results/clientnegative/udf_size_wr

[jira] [Commented] (HIVE-2155) Improve error messages emitted during semantic analysis

2011-05-11 Thread John Sichi (JIRA)

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

John Sichi commented on HIVE-2155:
--

One comment:  Hive currently has this strange convention where it appends a 
context token onto an error message, without always explaining how it relates 
to the error.  For example, 

{noformat}
In strict mode, if ORDER BY is specified, LIMIT must also be specified 'key'
{noformat}

Here the 'key' on the end is really confusing.  It should be something like

{noformat}
In strict mode, if ORDER BY is specified, LIMIT must also be specified; error 
encountered near token 'key'
{noformat}

This patch increases the number of places where we do this, so I think we need 
to improve the existing convention as part of it.  I'm not sure if the 
suggestion above is generic enough.


> Improve error messages emitted during semantic analysis
> ---
>
> Key: HIVE-2155
> URL: https://issues.apache.org/jira/browse/HIVE-2155
> Project: Hive
>  Issue Type: Improvement
>Reporter: Syed S. Albiz
>Assignee: Syed S. Albiz
> Attachments: HIVE-2155.1.patch, HIVE-2155.2.patch
>
>
> Follow-up to HIVE-1731.
> A number of issues raised in HIVE-1731 were caused by SemanticAnalyzer not 
> reporting errors correctly.
> Specifically, the following issues need to be addressed:
> - Line numbers are not always provided and sometimes emitted as (0:-1), which 
> is useless
> - Insufficient or unclear context strings are provided
> Specific issues described in HIVE-1731:
> FAILED: Error in semantic analysis: Schema of both sides of union should 
> match: destinationid:_col1 _col2
> * No line/col numbers, context strings provide internal aliases instead of 
> actual column names
> FAILED: Error in semantic analysis: line 0:-1 Both Left and Right Aliases 
> Encountered in Join time
> * Incorrect line/col number info, no context strings to describe the aliases 
> encountered
> FAILED: Error in semantic analysis: AS clause has an invalid number of aliases
> * No line/col numbers, not context string to show the aliases encountered
> FAILED: Error in semantic analysis: line 1:94 Expression Not In Group By Key a
> * testcase: SELECT a.id, VAR(a.cnt) FROM mytable a
> * Context string is unhelpful, needs to provide the actual expression, not 
> just the table reference

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (HIVE-2155) Improve error messages emitted during semantic analysis

2011-05-11 Thread jirapos...@reviews.apache.org (JIRA)

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

jirapos...@reviews.apache.org commented on HIVE-2155:
-


---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/731/
---

Review request for hive and John Sichi.


Summary
---

Attaches line/column number to the vast majority of SemanticExceptions thrown. 
In addition, the context strings for the error messages relating to UNION ALLs 
and GROUP BY keys have been changed to provide more meaningful context.


This addresses bug HIVE-2155.
https://issues.apache.org/jira/browse/HIVE-2155


Diffs
-

  common/src/java/org/apache/hadoop/hive/conf/HiveConf.java dc96a1f 
  ql/src/java/org/apache/hadoop/hive/ql/parse/BaseSemanticAnalyzer.java 2fe37b6 
  ql/src/java/org/apache/hadoop/hive/ql/parse/ErrorMsg.java 4ddf5b9 
  ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java 9cb407c 
  ql/src/java/org/apache/hadoop/hive/ql/parse/TypeCheckProcFactory.java bca37fd 
  ql/src/test/queries/clientnegative/union3.q PRE-CREATION 
  ql/src/test/results/clientnegative/analyze_view.q.out ef76106 
  ql/src/test/results/clientnegative/clusterbydistributeby.q.out 4c1ebfb 
  ql/src/test/results/clientnegative/clusterbysortby.q.out f76d4a7 
  ql/src/test/results/clientnegative/clustern3.q.out da71016 
  ql/src/test/results/clientnegative/clustern4.q.out 1519e48 
  ql/src/test/results/clientnegative/create_view_failure3.q.out 70e365a 
  ql/src/test/results/clientnegative/ddltime.q.out 11d00c3 
  ql/src/test/results/clientnegative/drop_partition_failure.q.out 1a0ac10 
  ql/src/test/results/clientnegative/dyn_part2.q.out cc0cd3c 
  ql/src/test/results/clientnegative/fileformat_void_input.q.out 5a7a05a 
  ql/src/test/results/clientnegative/groupby_key.q.out c6218a4 
  ql/src/test/results/clientnegative/input1.q.out 73f1657 
  ql/src/test/results/clientnegative/input2.q.out 0c460a6 
  ql/src/test/results/clientnegative/invalidate_view1.q.out 9f61228 
  ql/src/test/results/clientnegative/joinneg.q.out d85d508 
  ql/src/test/results/clientnegative/line_terminator.q.out b672bd8 
  ql/src/test/results/clientnegative/load_wrong_noof_part.q.out 4d8c8d8 
  ql/src/test/results/clientnegative/nopart_insert.q.out 42bca76 
  ql/src/test/results/clientnegative/notable_alias3.q.out d48d5e1 
  ql/src/test/results/clientnegative/orderbysortby.q.out 73b83a4 
  ql/src/test/results/clientnegative/regex_col_1.q.out 7547858 
  ql/src/test/results/clientnegative/regex_col_2.q.out f570010 
  ql/src/test/results/clientnegative/regex_col_groupby.q.out 8497718 
  ql/src/test/results/clientnegative/semijoin1.q.out 739931f 
  ql/src/test/results/clientnegative/semijoin2.q.out 2b418de 
  ql/src/test/results/clientnegative/semijoin3.q.out a803b50 
  ql/src/test/results/clientnegative/semijoin4.q.out 86a834b 
  ql/src/test/results/clientnegative/split_sample_out_of_range.q.out 0761955 
  ql/src/test/results/clientnegative/split_sample_wrong_format.q.out 19b1417 
  ql/src/test/results/clientnegative/strict_orderby.q.out 2d3ba6b 
  ql/src/test/results/clientnegative/subq_insert.q.out 8c3ce79 
  ql/src/test/results/clientnegative/udf_array_contains_wrong1.q.out d6b98b4 
  ql/src/test/results/clientnegative/udf_array_contains_wrong2.q.out 7b8dca6 
  ql/src/test/results/clientnegative/udf_case_type_wrong.q.out 75b9638 
  ql/src/test/results/clientnegative/udf_case_type_wrong2.q.out 126fa4e 
  ql/src/test/results/clientnegative/udf_case_type_wrong3.q.out fd62771 
  ql/src/test/results/clientnegative/udf_coalesce.q.out a5279f5 
  ql/src/test/results/clientnegative/udf_elt_wrong_args_len.q.out 22a085a 
  ql/src/test/results/clientnegative/udf_elt_wrong_type.q.out fc83f23 
  ql/src/test/results/clientnegative/udf_field_wrong_args_len.q.out 3bf97d9 
  ql/src/test/results/clientnegative/udf_field_wrong_type.q.out 2a2e944 
  ql/src/test/results/clientnegative/udf_if_not_bool.q.out a3c8902 
  ql/src/test/results/clientnegative/udf_if_wrong_args_len.q.out 89b23c8 
  ql/src/test/results/clientnegative/udf_in.q.out 50a6b98 
  ql/src/test/results/clientnegative/udf_instr_wrong_args_len.q.out 7f66db7 
  ql/src/test/results/clientnegative/udf_instr_wrong_type.q.out 89d8542 
  ql/src/test/results/clientnegative/udf_locate_wrong_args_len.q.out 46613e8 
  ql/src/test/results/clientnegative/udf_locate_wrong_type.q.out 42cc4b6 
  ql/src/test/results/clientnegative/udf_size_wrong_args_len.q.out b05731e 
  ql/src/test/results/clientnegative/udf_size_wrong_type.q.out 0c91c8f 
  ql/src/test/results/clientnegative/udf_when_type_wrong.q.out bec3725 
  ql/src/test/results/clientnegative/udf_when_type_wrong2.q.out 5b06467 
  ql/src/test/results/clientnegative/udf_when_type_wrong3.q.out 6974dd7 
  ql/src/t