hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "jiraposter@reviews.apache.org (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HIVE-2155) Improve error messages emitted during semantic analysis
Date Thu, 12 May 2011 23:46:47 GMT

    [ 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

Mime
View raw message