[ https://issues.apache.org/jira/browse/FLINK-28956?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
luoyuxia updated FLINK-28956: ----------------------------- Fix Version/s: 1.16.0 > 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: Critical > Labels: pull-request-available > Fix For: 1.16.0 > > > 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)