kasakrisz commented on code in PR #4748: URL: https://github.com/apache/hive/pull/4748#discussion_r1351718594
########## 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: The current solution is working. The odd class structure of `ConvertAstToSearchArg` was introduced earlier but I think there is room for improvement since you are touching it anyways: 1. Triggering the parse should be moved from the constructor to a method. 2. Also the class name `ConvertAstToSearchArg` is misleading * because it is more like a method name. * we are not converting AST but `ExprNodeDesc` tree How about `SearchArgumentConverter` ? 3. The result of the conversion should be some result object (like `SearchArgumentConverter.Result`) which wraps both the `SearchArgument` and the boolean property `isPartial` -- 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: gitbox-unsubscr...@hive.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org For additional commands, e-mail: gitbox-h...@hive.apache.org