SourabhBadhya commented on code in PR #4748:
URL: https://github.com/apache/hive/pull/4748#discussion_r1350426717
##########
ql/src/java/org/apache/hadoop/hive/ql/parse/UpdateDeleteSemanticAnalyzer.java:
##########
@@ -287,6 +299,29 @@ private void reparseAndSuperAnalyze(ASTNode tree, Table
mTable, ASTNode tabNameN
}
}
+ private void checkAndPerformStorageMetadataUpdate(Table table,
HiveStorageHandler storageHandler) {
+ if (!deleting() || storageHandler == null) {
+ return;
+ }
+ Map<String, TableScanOperator> topOps = getParseContext().getTopOps();
+ if (!topOps.containsKey(table.getTableName())) {
+ return;
+ }
+ ExprNodeGenericFuncDesc hiveFilter = getParseContext().getTopOps()
+ .get(table.getTableName()).getConf().getFilterExpr();
+ if (hiveFilter == null ||
!ConvertAstToSearchArg.isCompleteConversion(ctx.getConf(), hiveFilter)) {
Review Comment:
Yes `isCompleteConversion` means that every leaf node of the hive filter can
be converted to a leaf entity in SearchArgument. This ensures that deletes
happen the right way and we dont delete anything using partial filters.
Actually, `hasResiduals` doesn't make sense since the search argument does not
have complete filter but has partial filters if every leaf node cannot be
converted to its leaf entity.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]