dengzhhu653 commented on code in PR #5890: URL: https://github.com/apache/hive/pull/5890#discussion_r2163372239
########## standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/DirectSqlUpdatePart.java: ########## @@ -1254,19 +1159,17 @@ public List<Void> run(List<Long> input) throws Exception { List<FieldSchema> newCols = sdIdToNewColumns.get(sdId); // Use the new column descriptor only if the old column descriptor differs from the new one. - if (oldCols == null || !oldCols.equals(newCols)) { - if (oldCols != null && newCols != null) { - Long newCdId = getDataStoreId(MColumnDescriptor.class); - newCdIds.add(newCdId); - newCdIdToCols.put(newCdId, newCols); - oldCdIdToNewCdId.put(cdId, newCdId); - sdIdToNewCdId.put(sdId, newCdId); - for (int i = 0; i < oldCols.size(); i++) { - FieldSchema oldCol = oldCols.get(i); - int newIdx = newCols.indexOf(oldCol); - if (newIdx != -1) { - oldCdIdToColIdxPairs.computeIfAbsent(cdId, k -> new ArrayList<>()).add(Pair.of(i, newIdx)); - } + if (!oldCols.equals(newCols) && newCols != null) { Review Comment: no, the `oldCols` is created here: https://github.com/apache/hive/blob/83d5fdd5a196754d38e5c0d92d1833a28af05608/standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/DirectSqlUpdatePart.java#L1157 -- 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