nastra commented on code in PR #16819:
URL: https://github.com/apache/iceberg/pull/16819#discussion_r3427664227
##########
spark/v4.1/spark/src/main/java/org/apache/iceberg/spark/SparkSessionCatalog.java:
##########
@@ -428,21 +437,43 @@ public UnboundFunction loadFunction(Identifier ident)
throws NoSuchFunctionExcep
public Identifier[] listViews(String... namespace) {
try {
if (null != asViewCatalog) {
- return asViewCatalog.listViews(namespace);
+ Identifier[] views = asViewCatalog.listViews(namespace);
+ if (isViewCatalog()) {
+ views =
+ ArrayUtil.concat(Identifier.class, views,
getSessionCatalog().listViews(namespace));
+ }
+
+ return ArrayUtil.concat(Identifier.class, views,
listSessionCatalogViews(namespace));
Review Comment:
what happens if we show that there is view X in one catalog and view Y in
the other catalog and we try to create a view with the same name as X or Y?
If we decide to add something to listViews that that means we must be
consistent across all the other catalog operations and I don't think we are.
That's why I'm hesitant with this change, but maybe I'm missing something
--
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]