deniskuzZ commented on code in PR #4482:
URL: https://github.com/apache/hive/pull/4482#discussion_r1268197942
##########
ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java:
##########
@@ -2399,12 +2399,16 @@ private void getMetaData(QB qb, ReadEntity parentInput)
}
boolean isTableWrittenTo =
qb.getParseInfo().isInsertIntoTable(ts.tableHandle.getDbName(),
- ts.tableHandle.getTableName(), ts.tableHandle.getBranchName());
+ ts.tableHandle.getTableName(), ts.tableHandle.getSnapshotRef());
isTableWrittenTo |= (qb.getParseInfo().getInsertOverwriteTables().
get(getUnescapedName((ASTNode) ast.getChild(0),
ts.tableHandle.getDbName()).toLowerCase()) != null);
assert isTableWrittenTo :
"Inconsistent data structure detected: we are writing to " +
ts.tableHandle + " in " +
name + " but it's not in isInsertIntoTable() or
getInsertOverwriteTables()";
+ Boolean isTableTag =
Optional.ofNullable(ts.tableHandle.getSnapshotRef()).map(HiveUtils::checkTableTag)
+ .orElse(false);
+ assert isTableWrittenTo && !isTableTag : "Don't support write
(insert/delete/update/merge) to iceberg tag " +
Review Comment:
assert would be removed in runtime, show we throw
UnsupportedOperatiionEException here?
--
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]