Skip to content

Commit a60add3

Browse files
committed
address feedback
1 parent 1f51587 commit a60add3

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

plugins/spark/v3.5/spark/src/main/java/org/apache/polaris/spark/PolarisRESTCatalog.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -152,9 +152,10 @@ public void close() throws IOException {
152152

153153
@Override
154154
public List<TableIdentifier> listGenericTables(Namespace ns) {
155-
if (!endpoints.contains(PolarisEndpoints.V1_LIST_GENERIC_TABLES)) {
156-
return ImmutableList.of();
157-
}
155+
Endpoint.check(endpoints, PolarisEndpoints.V1_LIST_GENERIC_TABLES);
156+
// if (!endpoints.contains(PolarisEndpoints.V1_LIST_GENERIC_TABLES)) {
157+
// return ImmutableList.of();
158+
// }
158159

159160
Map<String, String> queryParams = Maps.newHashMap();
160161
ImmutableList.Builder<TableIdentifier> tables = ImmutableList.builder();

plugins/spark/v3.5/spark/src/main/java/org/apache/polaris/spark/PolarisSparkCatalog.java

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,12 @@ public void renameTable(Identifier from, Identifier to)
114114

115115
@Override
116116
public Identifier[] listTables(String[] namespace) {
117-
return this.polarisCatalog.listGenericTables(Namespace.of(namespace)).stream()
118-
.map(ident -> Identifier.of(ident.namespace().levels(), ident.name()))
119-
.toArray(Identifier[]::new);
117+
try {
118+
return this.polarisCatalog.listGenericTables(Namespace.of(namespace)).stream()
119+
.map(ident -> Identifier.of(ident.namespace().levels(), ident.name()))
120+
.toArray(Identifier[]::new);
121+
} catch (UnsupportedOperationException ex) {
122+
return new Identifier[0];
123+
}
120124
}
121125
}

0 commit comments

Comments
 (0)