You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "Syed S. Albiz (JIRA)" <ji...@apache.org> on 2011/05/10 01:51:03 UTC

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

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


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

Posted by "John Sichi (JIRA)" <ji...@apache.org>.
    [ 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

Posted by "jiraposter@reviews.apache.org (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HIVE-2155?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13033173#comment-13033173 ] 

jiraposter@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
<https://reviews.apache.org/r/731/#comment1333>

    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
<https://reviews.apache.org/r/731/#comment1332>

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



ql/src/test/results/clientnegative/groupby_key.q.out
<https://reviews.apache.org/r/731/#comment1331>

    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.out fd62771 
bq.    ql/src/test/results/clientnegative/udf_coalesce.q.out a5279f5 
bq.    ql/src/test/results/clientnegative/udf_elt_wrong_args_len.q.out 22a085a 
bq.    ql/src/test/results/clientnegative/udf_elt_wrong_type.q.out fc83f23 
bq.    ql/src/test/results/clientnegative/udf_field_wrong_args_len.q.out 3bf97d9 
bq.    ql/src/test/results/clientnegative/udf_field_wrong_type.q.out 2a2e944 
bq.    ql/src/test/results/clientnegative/udf_if_not_bool.q.out a3c8902 
bq.    ql/src/test/results/clientnegative/udf_if_wrong_args_len.q.out 89b23c8 
bq.    ql/src/test/results/clientnegative/udf_in.q.out 50a6b98 
bq.    ql/src/test/results/clientnegative/udf_instr_wrong_args_len.q.out 7f66db7 
bq.    ql/src/test/results/clientnegative/udf_instr_wrong_type.q.out 89d8542 
bq.    ql/src/test/results/clientnegative/udf_locate_wrong_args_len.q.out 46613e8 
bq.    ql/src/test/results/clientnegative/udf_locate_wrong_type.q.out 42cc4b6 
bq.    ql/src/test/results/clientnegative/udf_size_wrong_args_len.q.out b05731e 
bq.    ql/src/test/results/clientnegative/udf_size_wrong_type.q.out 0c91c8f 
bq.    ql/src/test/results/clientnegative/udf_when_type_wrong.q.out bec3725 
bq.    ql/src/test/results/clientnegative/udf_when_type_wrong2.q.out 5b06467 
bq.    ql/src/test/results/clientnegative/udf_when_type_wrong3.q.out 6974dd7 
bq.    ql/src/test/results/clientnegative/udtf_not_supported1.q.out cc5f23b 
bq.    ql/src/test/results/clientnegative/udtf_not_supported2.q.out c8987ea 
bq.    ql/src/test/results/clientnegative/union.q.out 333230d 
bq.    ql/src/test/results/clientnegative/union2.q.out 1e6c782 
bq.    ql/src/test/results/clientnegative/union3.q.out PRE-CREATION 
bq.    ql/src/test/results/compiler/errors/ambiguous_table_col.q.out 1641ead 
bq.    ql/src/test/results/compiler/errors/duplicate_alias.q.out 1429744 
bq.    ql/src/test/results/compiler/errors/insert_wrong_number_columns.q.out 7efe359 
bq.    ql/src/test/results/compiler/errors/invalid_dot.q.out e63be5f 
bq.    ql/src/test/results/compiler/errors/invalid_function_param2.q.out f1f41a1 
bq.    ql/src/test/results/compiler/errors/invalid_index.q.out 77dc0c0 
bq.    ql/src/test/results/compiler/errors/invalid_list_index.q.out 3714b68 
bq.    ql/src/test/results/compiler/errors/invalid_list_index2.q.out c64b248 
bq.    ql/src/test/results/compiler/errors/invalid_map_index.q.out e241bc6 
bq.    ql/src/test/results/compiler/errors/invalid_map_index2.q.out 1c8d660 
bq.    ql/src/test/results/compiler/errors/nonkey_groupby.q.out 21a9f46 
bq.    ql/src/test/results/compiler/errors/unknown_column1.q.out 4d89065 
bq.    ql/src/test/results/compiler/errors/unknown_column2.q.out 43f31db 
bq.    ql/src/test/results/compiler/errors/unknown_column3.q.out d8ee8d0 
bq.    ql/src/test/results/compiler/errors/unknown_column4.q.out 24d8c87 
bq.    ql/src/test/results/compiler/errors/unknown_column5.q.out d15e993 
bq.    ql/src/test/results/compiler/errors/unknown_column6.q.out aac42d1 
bq.    ql/src/test/results/compiler/errors/unknown_function1.q.out 5180f38 
bq.    ql/src/test/results/compiler/errors/unknown_function2.q.out dcb97bc 
bq.    ql/src/test/results/compiler/errors/unknown_function3.q.out dcb97bc 
bq.    ql/src/test/results/compiler/errors/unknown_function4.q.out 5180f38 
bq.    ql/src/test/results/compiler/errors/unknown_table1.q.out ff92e4e 
bq.    ql/src/test/results/compiler/errors/unknown_table2.q.out 54185e4 
bq.    ql/src/test/results/compiler/errors/wrong_distinct1.q.out 74bc6e6 
bq.  
bq.  Diff: https://reviews.apache.org/r/731/diff
bq.  
bq.  
bq.  Testing
bq.  -------
bq.  
bq.  Regenerated testcase expected output for TestNegativeCliDriver/TestParseNegative/TestNegativeContribCliDriver
bq.  
bq.  
bq.  Thanks,
bq.  
bq.  Syed
bq.  
bq.



> 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] [Updated] (HIVE-2155) Improve error messages emitted during semantic analysis

Posted by "Syed S. Albiz (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HIVE-2155?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Syed S. Albiz updated HIVE-2155:
--------------------------------

    Status: Patch Available  (was: Open)

> 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

Posted by "jiraposter@reviews.apache.org (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HIVE-2155?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13032753#comment-13032753 ] 

jiraposter@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_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/test/results/clientnegative/udtf_not_supported1.q.out cc5f23b 
  ql/src/test/results/clientnegative/udtf_not_supported2.q.out c8987ea 
  ql/src/test/results/clientnegative/union.q.out 333230d 
  ql/src/test/results/clientnegative/union2.q.out 1e6c782 
  ql/src/test/results/clientnegative/union3.q.out PRE-CREATION 
  ql/src/test/results/compiler/errors/ambiguous_table_col.q.out 1641ead 
  ql/src/test/results/compiler/errors/duplicate_alias.q.out 1429744 
  ql/src/test/results/compiler/errors/insert_wrong_number_columns.q.out 7efe359 
  ql/src/test/results/compiler/errors/invalid_dot.q.out e63be5f 
  ql/src/test/results/compiler/errors/invalid_function_param2.q.out f1f41a1 
  ql/src/test/results/compiler/errors/invalid_index.q.out 77dc0c0 
  ql/src/test/results/compiler/errors/invalid_list_index.q.out 3714b68 
  ql/src/test/results/compiler/errors/invalid_list_index2.q.out c64b248 
  ql/src/test/results/compiler/errors/invalid_map_index.q.out e241bc6 
  ql/src/test/results/compiler/errors/invalid_map_index2.q.out 1c8d660 
  ql/src/test/results/compiler/errors/nonkey_groupby.q.out 21a9f46 
  ql/src/test/results/compiler/errors/unknown_column1.q.out 4d89065 
  ql/src/test/results/compiler/errors/unknown_column2.q.out 43f31db 
  ql/src/test/results/compiler/errors/unknown_column3.q.out d8ee8d0 
  ql/src/test/results/compiler/errors/unknown_column4.q.out 24d8c87 
  ql/src/test/results/compiler/errors/unknown_column5.q.out d15e993 
  ql/src/test/results/compiler/errors/unknown_column6.q.out aac42d1 
  ql/src/test/results/compiler/errors/unknown_function1.q.out 5180f38 
  ql/src/test/results/compiler/errors/unknown_function2.q.out dcb97bc 
  ql/src/test/results/compiler/errors/unknown_function3.q.out dcb97bc 
  ql/src/test/results/compiler/errors/unknown_function4.q.out 5180f38 
  ql/src/test/results/compiler/errors/unknown_table1.q.out ff92e4e 
  ql/src/test/results/compiler/errors/unknown_table2.q.out 54185e4 
  ql/src/test/results/compiler/errors/wrong_distinct1.q.out 74bc6e6 

Diff: https://reviews.apache.org/r/731/diff


Testing
-------

Regenerated testcase expected output for TestNegativeCliDriver/TestParseNegative/TestNegativeContribCliDriver


Thanks,

Syed



> 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] [Updated] (HIVE-2155) Improve error messages emitted during semantic analysis

Posted by "Syed S. Albiz (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HIVE-2155?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Syed S. Albiz updated HIVE-2155:
--------------------------------

    Attachment: HIVE-2155.3.patch

Instead of changing the overall structure, I decided to move the logic to print that context token into the new generateErrorMessage method, which prevents breaking existing error messages which rely on that behavior of an error token finishing the message.

> 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

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ 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

Posted by "John Sichi (JIRA)" <ji...@apache.org>.
    [ 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

Posted by "John Sichi (JIRA)" <ji...@apache.org>.
    [ 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] [Updated] (HIVE-2155) Improve error messages emitted during semantic analysis

Posted by "Syed S. Albiz (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HIVE-2155?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Syed S. Albiz updated HIVE-2155:
--------------------------------

    Attachment: HIVE-2155.2.patch

Removed some trailing whitespace

> 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] [Updated] (HIVE-2155) Improve error messages emitted during semantic analysis

Posted by "Syed S. Albiz (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HIVE-2155?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Syed S. Albiz updated HIVE-2155:
--------------------------------

    Attachment: HIVE-2155.5.patch

Regenerate the TestParseNegative bucket, and modify the existing ugly testcases to use the new "Error encountered near" strings.

> 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] [Updated] (HIVE-2155) Improve error messages emitted during semantic analysis

Posted by "Syed S. Albiz (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HIVE-2155?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Syed S. Albiz updated HIVE-2155:
--------------------------------

    Attachment: HIVE-2155.4.patch

Updated patch based on reviewboard comments (Changes described there)

> 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

Posted by "jiraposter@reviews.apache.org (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HIVE-2155?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13032169#comment-13032169 ] 

jiraposter@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/test/results/clientnegative/udtf_not_supported1.q.out cc5f23b 
  ql/src/test/results/clientnegative/udtf_not_supported2.q.out c8987ea 
  ql/src/test/results/clientnegative/union.q.out 333230d 
  ql/src/test/results/clientnegative/union2.q.out 1e6c782 
  ql/src/test/results/clientnegative/union3.q.out PRE-CREATION 
  ql/src/test/results/compiler/errors/ambiguous_table_col.q.out 1641ead 
  ql/src/test/results/compiler/errors/duplicate_alias.q.out 1429744 
  ql/src/test/results/compiler/errors/insert_wrong_number_columns.q.out 7efe359 
  ql/src/test/results/compiler/errors/invalid_dot.q.out e63be5f 
  ql/src/test/results/compiler/errors/invalid_function_param2.q.out f1f41a1 
  ql/src/test/results/compiler/errors/invalid_index.q.out 77dc0c0 
  ql/src/test/results/compiler/errors/invalid_list_index.q.out 3714b68 
  ql/src/test/results/compiler/errors/invalid_list_index2.q.out c64b248 
  ql/src/test/results/compiler/errors/invalid_map_index.q.out e241bc6 
  ql/src/test/results/compiler/errors/invalid_map_index2.q.out 1c8d660 
  ql/src/test/results/compiler/errors/nonkey_groupby.q.out 21a9f46 
  ql/src/test/results/compiler/errors/unknown_column1.q.out 4d89065 
  ql/src/test/results/compiler/errors/unknown_column2.q.out 43f31db 
  ql/src/test/results/compiler/errors/unknown_column3.q.out d8ee8d0 
  ql/src/test/results/compiler/errors/unknown_column4.q.out 24d8c87 
  ql/src/test/results/compiler/errors/unknown_column5.q.out d15e993 
  ql/src/test/results/compiler/errors/unknown_column6.q.out aac42d1 
  ql/src/test/results/compiler/errors/unknown_function1.q.out 5180f38 
  ql/src/test/results/compiler/errors/unknown_function2.q.out dcb97bc 
  ql/src/test/results/compiler/errors/unknown_function3.q.out dcb97bc 
  ql/src/test/results/compiler/errors/unknown_function4.q.out 5180f38 
  ql/src/test/results/compiler/errors/unknown_table1.q.out ff92e4e 
  ql/src/test/results/compiler/errors/unknown_table2.q.out 54185e4 
  ql/src/test/results/compiler/errors/wrong_distinct1.q.out 74bc6e6 

Diff: https://reviews.apache.org/r/731/diff


Testing
-------

Regenerated testcase expected output for TestNegativeCliDriver/TestParseNegative/TestNegativeContribCliDriver


Thanks,

Syed



> 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
>
>
> 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

Posted by "John Sichi (JIRA)" <ji...@apache.org>.
    [ 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

Posted by "jiraposter@reviews.apache.org (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HIVE-2155?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13033406#comment-13033406 ] 

jiraposter@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 <tokenbq. ' format
- Added the period to the error message
- Fixed the generation of GROUP BY context string to be less fugly (generate the context string off the AST token one level below the top of the stack that contains the invalid column reference instead of the table alias.


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/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_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/test/results/clientnegative/udtf_not_supported1.q.out cc5f23b 
  ql/src/test/results/clientnegative/udtf_not_supported2.q.out c8987ea 
  ql/src/test/results/clientnegative/union.q.out 333230d 
  ql/src/test/results/clientnegative/union2.q.out 1e6c782 
  ql/src/test/results/clientnegative/union3.q.out PRE-CREATION 
  ql/src/test/results/compiler/errors/ambiguous_table_col.q.out 1641ead 
  ql/src/test/results/compiler/errors/duplicate_alias.q.out 1429744 
  ql/src/test/results/compiler/errors/insert_wrong_number_columns.q.out 7efe359 
  ql/src/test/results/compiler/errors/invalid_dot.q.out e63be5f 
  ql/src/test/results/compiler/errors/invalid_function_param2.q.out f1f41a1 
  ql/src/test/results/compiler/errors/invalid_index.q.out 77dc0c0 
  ql/src/test/results/compiler/errors/invalid_list_index.q.out 3714b68 
  ql/src/test/results/compiler/errors/invalid_list_index2.q.out c64b248 
  ql/src/test/results/compiler/errors/invalid_map_index.q.out e241bc6 
  ql/src/test/results/compiler/errors/invalid_map_index2.q.out 1c8d660 
  ql/src/test/results/compiler/errors/nonkey_groupby.q.out 21a9f46 
  ql/src/test/results/compiler/errors/unknown_column1.q.out 4d89065 
  ql/src/test/results/compiler/errors/unknown_column2.q.out 43f31db 
  ql/src/test/results/compiler/errors/unknown_column3.q.out d8ee8d0 
  ql/src/test/results/compiler/errors/unknown_column4.q.out 24d8c87 
  ql/src/test/results/compiler/errors/unknown_column5.q.out d15e993 
  ql/src/test/results/compiler/errors/unknown_column6.q.out aac42d1 
  ql/src/test/results/compiler/errors/unknown_function1.q.out 5180f38 
  ql/src/test/results/compiler/errors/unknown_function2.q.out dcb97bc 
  ql/src/test/results/compiler/errors/unknown_function3.q.out dcb97bc 
  ql/src/test/results/compiler/errors/unknown_function4.q.out 5180f38 
  ql/src/test/results/compiler/errors/unknown_table1.q.out ff92e4e 
  ql/src/test/results/compiler/errors/unknown_table2.q.out 54185e4 
  ql/src/test/results/compiler/errors/wrong_distinct1.q.out 74bc6e6 

Diff: https://reviews.apache.org/r/731/diff


Testing
-------

Regenerated testcase expected output for TestNegativeCliDriver/TestParseNegative/TestNegativeContribCliDriver


Thanks,

Syed



> 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] [Updated] (HIVE-2155) Improve error messages emitted during semantic analysis

Posted by "John Sichi (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HIVE-2155?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

John Sichi updated HIVE-2155:
-----------------------------

       Resolution: Fixed
    Fix Version/s: 0.8.0
     Hadoop Flags: [Reviewed]
           Status: Resolved  (was: Patch Available)

Committed.  Thanks Syed!

> 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

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ 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] [Updated] (HIVE-2155) Improve error messages emitted during semantic analysis

Posted by "Syed S. Albiz (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HIVE-2155?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Syed S. Albiz updated HIVE-2155:
--------------------------------

    Attachment: HIVE-2155.1.patch

This patch (review board still not accepting new registrations) 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

> 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
>
>
> 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