hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Wei Zheng (JIRA)" <>
Subject [jira] [Commented] (HIVE-15891) Detect query rewrite scenario for UPDATE/DELETE/MERGE and fail fast
Date Thu, 16 Feb 2017 00:55:41 GMT


Wei Zheng commented on HIVE-15891:

I tried that, and it works for existing tests that contain subquery. But this check will fail
MERGE statement.
    if (!hasSubQuery) {
      throw new RuntimeException("A matching node should have been found, otherwise it means
" +
          "this is an UPDATE/DELETE/MERGE query but the AST got modified!");
Do we want to add another condition to rule out MERGE?

> Detect query rewrite scenario for UPDATE/DELETE/MERGE and fail fast
> -------------------------------------------------------------------
>                 Key: HIVE-15891
>                 URL:
>             Project: Hive
>          Issue Type: Bug
>          Components: Transactions
>    Affects Versions: 2.2.0
>            Reporter: Wei Zheng
>            Assignee: Wei Zheng
>         Attachments: HIVE-15891.1.patch, HIVE-15891.2.patch
> Currently ACID UpdateDeleteSemanticAnalyzer directly manipulates the AST tree but it's
different from the general approach of modifying the token stream and thus will cause AST
tree mismatch if there is any rewrite happening after UpdateDeleteSemanticAnalyzer.
> The long term solution will be to rewrite the AST handling logic in UpdateDeleteSemanticAnalyzer,
to make it consistent with the general approach.
> This ticket will for now detect the error prone cases and fail early. 

This message was sent by Atlassian JIRA

View raw message