rdblue commented on code in PR #9620:
URL: https://github.com/apache/iceberg/pull/9620#discussion_r1483615535
##########
core/src/main/java/org/apache/iceberg/view/ViewMetadata.java:
##########
@@ -510,5 +521,29 @@ static List<ViewHistoryEntry>
updateHistory(List<ViewHistoryEntry> history, Set<
private <U extends MetadataUpdate> Stream<U> changes(Class<U> updateClass)
{
return
changes.stream().filter(updateClass::isInstance).map(updateClass::cast);
}
+
+ private void checkIfDialectIsDropped(ViewVersion previous, ViewVersion
current) {
+ Set<String> baseDialects = sqlDialectsFor(previous);
+ Set<String> updatedDialects = sqlDialectsFor(current);
+
+ Preconditions.checkState(
+ updatedDialects.containsAll(baseDialects),
+ "Cannot replace view due to loss of view representations
(%s=false):\nPrevious representations: %s\nNew representations: %s",
Review Comment:
"representations" should be "dialects" 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]