You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "luoyuxia (Jira)" <ji...@apache.org> on 2022/08/15 03:12:00 UTC
[jira] [Commented] (FLINK-28956) FIx non-multi insert statement fall into multi insert logic in Hive dialect
[ https://issues.apache.org/jira/browse/FLINK-28956?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17579501#comment-17579501 ]
luoyuxia commented on FLINK-28956:
----------------------------------
To fix it, we need a more strict check.
> FIx non-multi insert statement fall into multi insert logic in Hive dialect
> ----------------------------------------------------------------------------
>
> Key: FLINK-28956
> URL: https://issues.apache.org/jira/browse/FLINK-28956
> Project: Flink
> Issue Type: Bug
> Components: Connectors / Hive
> Reporter: luoyuxia
> Priority: Major
>
> In [FLINK-27387|https://issues.apache.org/jira/browse/FLINK-27387], we support multi insert statment in Hive dialect, but the check for multi insert statment is not strict which will result non-multi insert statement fall into such logic.
> For example,
>
> {code:java}
> with cte as (select t.a as a,t.a as b,t.a as c from t where t.b is null) select * from cte {code}
>
> . The AST for it is [TOK_CTE, TOK_FROM, TOK_INSERT], then it
> will be mistaken as multi-insert statement
>
> {code:java}
> private boolean isMultiDestQuery(HiveParserASTNode astNode) {
> // Hive's multi dest insert will always be [FROM, INSERT+]
> // so, if it's children count is more than 2, it should be a multi-dest query
> return astNode.getChildCount() > 2;
> } {code}
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)