From 30c6d91d92fa985dd57da85f4da2eca7e3fe0296 Mon Sep 17 00:00:00 2001 From: Dain Sundstrom Date: Sun, 21 Nov 2021 18:18:32 -0800 Subject: [PATCH] Fix listTablePrivileges when owner is not set listTablePrivileges is used internally when altering tables, so must work even when Hive permission system is not used. --- .../trino/plugin/hive/HiveMetastoreClosure.java | 2 +- .../plugin/hive/metastore/HiveMetastore.java | 3 ++- .../hive/metastore/RecordingHiveMetastore.java | 2 +- .../SemiTransactionalHiveMetastore.java | 17 +++++++++++------ .../plugin/hive/metastore/UserTableKey.java | 8 ++++---- .../metastore/alluxio/AlluxioHiveMetastore.java | 2 +- .../metastore/cache/CachingHiveMetastore.java | 8 ++++---- .../hive/metastore/file/FileHiveMetastore.java | 14 +++++++------- .../hive/metastore/glue/GlueHiveMetastore.java | 2 +- .../metastore/thrift/BridgingHiveMetastore.java | 2 +- .../metastore/thrift/ThriftHiveMetastore.java | 11 +++++------ .../hive/metastore/thrift/ThriftMetastore.java | 3 ++- .../metastore/TestRecordingHiveMetastore.java | 4 ++-- .../metastore/UnimplementedHiveMetastore.java | 2 +- .../thrift/InMemoryThriftMetastore.java | 2 +- .../CountingAccessFileHiveMetastore.java | 2 +- 16 files changed, 45 insertions(+), 39 deletions(-) diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveMetastoreClosure.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveMetastoreClosure.java index f963bd3bdcb3..c9411fe33993 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveMetastoreClosure.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveMetastoreClosure.java @@ -291,7 +291,7 @@ public void revokeTablePrivileges(String databaseName, String tableName, String delegate.revokeTablePrivileges(databaseName, tableName, tableOwner, grantee, privileges); } - public Set listTablePrivileges(String databaseName, String tableName, String tableOwner, Optional principal) + public Set listTablePrivileges(String databaseName, String tableName, Optional tableOwner, Optional principal) { return delegate.listTablePrivileges(databaseName, tableName, tableOwner, principal); } diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/HiveMetastore.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/HiveMetastore.java index 37f9da5e3eb9..8f88365b9e42 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/HiveMetastore.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/HiveMetastore.java @@ -137,9 +137,10 @@ default void updatePartitionStatistics(HiveIdentity identity, Table table, Strin void revokeTablePrivileges(String databaseName, String tableName, String tableOwner, HivePrincipal grantee, Set privileges); /** + * @param tableOwner * @param principal when empty, all table privileges are returned */ - Set listTablePrivileges(String databaseName, String tableName, String tableOwner, Optional principal); + Set listTablePrivileges(String databaseName, String tableName, Optional tableOwner, Optional principal); boolean isImpersonationEnabled(); diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/RecordingHiveMetastore.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/RecordingHiveMetastore.java index bc1374704302..7efe91e92714 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/RecordingHiveMetastore.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/RecordingHiveMetastore.java @@ -436,7 +436,7 @@ public void alterPartition(HiveIdentity identity, String databaseName, String ta } @Override - public Set listTablePrivileges(String databaseName, String tableName, String tableOwner, Optional principal) + public Set listTablePrivileges(String databaseName, String tableName, Optional tableOwner, Optional principal) { return loadValue( tablePrivilegesCache, diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/SemiTransactionalHiveMetastore.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/SemiTransactionalHiveMetastore.java index 705d889a7fcf..5d532fb301e2 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/SemiTransactionalHiveMetastore.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/SemiTransactionalHiveMetastore.java @@ -1120,7 +1120,7 @@ public synchronized Set listTablePrivileges(HiveIdentity iden SchemaTableName schemaTableName = new SchemaTableName(databaseName, tableName); Action tableAction = tableActions.get(schemaTableName); if (tableAction == null) { - return delegate.listTablePrivileges(databaseName, tableName, getRequiredTableOwner(identity, databaseName, tableName), principal); + return delegate.listTablePrivileges(databaseName, tableName, getExistingTable(identity, databaseName, tableName).getOwner(), principal); } switch (tableAction.getType()) { case ADD: @@ -1128,19 +1128,24 @@ public synchronized Set listTablePrivileges(HiveIdentity iden if (principal.isPresent() && principal.get().getType() == PrincipalType.ROLE) { return ImmutableSet.of(); } - String owner = tableAction.getData().getTable().getOwner().orElseThrow(); - if (principal.isPresent() && !principal.get().getName().equals(owner)) { + Optional owner = tableAction.getData().getTable().getOwner(); + if (owner.isEmpty()) { + // todo the existing logic below seem off. Only permissions held by the table owner are returned return ImmutableSet.of(); } - Collection privileges = tableAction.getData().getPrincipalPrivileges().getUserPrivileges().get(owner); + String ownerUsername = owner.orElseThrow(); + if (principal.isPresent() && !principal.get().getName().equals(ownerUsername)) { + return ImmutableSet.of(); + } + Collection privileges = tableAction.getData().getPrincipalPrivileges().getUserPrivileges().get(ownerUsername); return ImmutableSet.builder() .addAll(privileges) - .add(new HivePrivilegeInfo(OWNERSHIP, true, new HivePrincipal(USER, owner), new HivePrincipal(USER, owner))) + .add(new HivePrivilegeInfo(OWNERSHIP, true, new HivePrincipal(USER, ownerUsername), new HivePrincipal(USER, ownerUsername))) .build(); case INSERT_EXISTING: case DELETE_ROWS: case UPDATE: - return delegate.listTablePrivileges(databaseName, tableName, getRequiredTableOwner(identity, databaseName, tableName), principal); + return delegate.listTablePrivileges(databaseName, tableName, getExistingTable(identity, databaseName, tableName).getOwner(), principal); case DROP: throw new TableNotFoundException(schemaTableName); case DROP_PRESERVE_DATA: diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/UserTableKey.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/UserTableKey.java index 1d5122e9e47f..8176f0b8bb9d 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/UserTableKey.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/UserTableKey.java @@ -30,14 +30,14 @@ public class UserTableKey private final Optional principal; private final String database; private final String table; - private final String owner; + private final Optional owner; @JsonCreator public UserTableKey( @JsonProperty("principal") Optional principal, @JsonProperty("database") String database, @JsonProperty("table") String table, - @JsonProperty("owner") String owner) + @JsonProperty("owner") Optional owner) { this.principal = requireNonNull(principal, "principal is null"); this.database = requireNonNull(database, "database is null"); @@ -64,7 +64,7 @@ public String getTable() } @JsonProperty - public String getOwner() + public Optional getOwner() { return owner; } @@ -103,7 +103,7 @@ public String toString() .add("principal", principal) .add("table", table) .add("database", database) - .add("owner", owner) + .add("owner", owner.orElse(null)) .toString(); } } diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/alluxio/AlluxioHiveMetastore.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/alluxio/AlluxioHiveMetastore.java index 567ef89c3ed4..7ab24d4684b5 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/alluxio/AlluxioHiveMetastore.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/alluxio/AlluxioHiveMetastore.java @@ -478,7 +478,7 @@ public void revokeTablePrivileges(String databaseName, String tableName, String } @Override - public Set listTablePrivileges(String databaseName, String tableName, String tableOwner, Optional principal) + public Set listTablePrivileges(String databaseName, String tableName, Optional tableOwner, Optional principal) { throw new TrinoException(NOT_SUPPORTED, "listTablePrivileges"); } diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/cache/CachingHiveMetastore.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/cache/CachingHiveMetastore.java index 1398be9874ab..585475a34247 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/cache/CachingHiveMetastore.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/cache/CachingHiveMetastore.java @@ -911,12 +911,12 @@ public void revokeTablePrivileges(String databaseName, String tableName, String private void invalidateTablePrivilegeCacheEntries(String databaseName, String tableName, String tableOwner, HivePrincipal grantee) { // some callers of xxxxTablePrivileges use Optional.of(grantee), some Optional.empty() (to get all privileges), so have to invalidate them both - tablePrivilegesCache.invalidate(new UserTableKey(Optional.of(grantee), databaseName, tableName, tableOwner)); - tablePrivilegesCache.invalidate(new UserTableKey(Optional.empty(), databaseName, tableName, tableOwner)); + tablePrivilegesCache.invalidate(new UserTableKey(Optional.of(grantee), databaseName, tableName, Optional.of(tableOwner))); + tablePrivilegesCache.invalidate(new UserTableKey(Optional.empty(), databaseName, tableName, Optional.of(tableOwner))); } @Override - public Set listTablePrivileges(String databaseName, String tableName, String tableOwner, Optional principal) + public Set listTablePrivileges(String databaseName, String tableName, Optional tableOwner, Optional principal) { return get(tablePrivilegesCache, new UserTableKey(principal, databaseName, tableName, tableOwner)); } @@ -968,7 +968,7 @@ public boolean isImpersonationEnabled() return delegate.isImpersonationEnabled(); } - private Set loadTablePrivileges(String databaseName, String tableName, String tableOwner, Optional principal) + private Set loadTablePrivileges(String databaseName, String tableName, Optional tableOwner, Optional principal) { return delegate.listTablePrivileges(databaseName, tableName, tableOwner, principal); } diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/file/FileHiveMetastore.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/file/FileHiveMetastore.java index e3437fa5a510..4d18feda83a6 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/file/FileHiveMetastore.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/file/FileHiveMetastore.java @@ -17,6 +17,7 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; +import com.google.common.collect.ImmutableSet.Builder; import com.google.common.collect.Sets; import com.google.common.io.ByteStreams; import io.airlift.json.JsonCodec; @@ -1094,16 +1095,15 @@ public synchronized Map> getPartitionsByNames(HiveId } @Override - public synchronized Set listTablePrivileges(String databaseName, String tableName, String tableOwner, Optional principal) + public synchronized Set listTablePrivileges(String databaseName, String tableName, Optional tableOwner, Optional principal) { Table table = getRequiredTable(databaseName, tableName); Path permissionsDirectory = getPermissionsDirectory(table); if (principal.isEmpty()) { - HivePrincipal owner = new HivePrincipal(USER, tableOwner); - return ImmutableSet.builder() - .addAll(readAllPermissions(permissionsDirectory)) - .add(new HivePrivilegeInfo(OWNERSHIP, true, owner, owner)) - .build(); + Builder privileges = ImmutableSet.builder() + .addAll(readAllPermissions(permissionsDirectory)); + tableOwner.ifPresent(owner -> privileges.add(new HivePrivilegeInfo(OWNERSHIP, true, new HivePrincipal(USER, owner), new HivePrincipal(USER, owner)))); + return privileges.build(); } ImmutableSet.Builder result = ImmutableSet.builder(); if (principal.get().getType() == USER && table.getOwner().orElseThrow().equals(principal.get().getName())) { @@ -1122,7 +1122,7 @@ public synchronized void grantTablePrivileges(String databaseName, String tableN @Override public synchronized void revokeTablePrivileges(String databaseName, String tableName, String tableOwner, HivePrincipal grantee, Set privileges) { - Set currentPrivileges = listTablePrivileges(databaseName, tableName, tableOwner, Optional.of(grantee)); + Set currentPrivileges = listTablePrivileges(databaseName, tableName, Optional.of(tableOwner), Optional.of(grantee)); Set privilegesToRemove = privileges.stream() .map(p -> new HivePrivilegeInfo(p.getHivePrivilege(), p.isGrantOption(), p.getGrantor(), grantee)) .collect(toImmutableSet()); diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/glue/GlueHiveMetastore.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/glue/GlueHiveMetastore.java index 4f4973e3d8ee..8fd680e87972 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/glue/GlueHiveMetastore.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/glue/GlueHiveMetastore.java @@ -1102,7 +1102,7 @@ public void revokeTablePrivileges(String databaseName, String tableName, String } @Override - public Set listTablePrivileges(String databaseName, String tableName, String tableOwner, Optional principal) + public Set listTablePrivileges(String databaseName, String tableName, Optional tableOwner, Optional principal) { return ImmutableSet.of(); } diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/thrift/BridgingHiveMetastore.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/thrift/BridgingHiveMetastore.java index 5a3968d12731..b58ebbfc587a 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/thrift/BridgingHiveMetastore.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/thrift/BridgingHiveMetastore.java @@ -460,7 +460,7 @@ public void revokeTablePrivileges(String databaseName, String tableName, String } @Override - public Set listTablePrivileges(String databaseName, String tableName, String tableOwner, Optional principal) + public Set listTablePrivileges(String databaseName, String tableName, Optional tableOwner, Optional principal) { return delegate.listTablePrivileges(databaseName, tableName, tableOwner, principal); } diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/thrift/ThriftHiveMetastore.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/thrift/ThriftHiveMetastore.java index 826068115216..0220069928b2 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/thrift/ThriftHiveMetastore.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/thrift/ThriftHiveMetastore.java @@ -1452,7 +1452,7 @@ public void grantTablePrivileges(String databaseName, String tableName, String t .stopOnIllegalExceptions() .run("grantTablePrivileges", stats.getGrantTablePrivileges().wrap(() -> { try (ThriftMetastoreClient metastoreClient = createMetastoreClient()) { - Set existingPrivileges = listTablePrivileges(databaseName, tableName, tableOwner, Optional.of(grantee)); + Set existingPrivileges = listTablePrivileges(databaseName, tableName, Optional.of(tableOwner), Optional.of(grantee)); Set privilegesToGrant = new HashSet<>(requestedPrivileges); Iterator iterator = privilegesToGrant.iterator(); @@ -1503,7 +1503,7 @@ public void revokeTablePrivileges(String databaseName, String tableName, String .stopOnIllegalExceptions() .run("revokeTablePrivileges", stats.getRevokeTablePrivileges().wrap(() -> { try (ThriftMetastoreClient metastoreClient = createMetastoreClient()) { - Set existingHivePrivileges = listTablePrivileges(databaseName, tableName, tableOwner, Optional.of(grantee)).stream() + Set existingHivePrivileges = listTablePrivileges(databaseName, tableName, Optional.of(tableOwner), Optional.of(grantee)).stream() .map(HivePrivilegeInfo::getHivePrivilege) .collect(toImmutableSet()); @@ -1529,7 +1529,7 @@ public void revokeTablePrivileges(String databaseName, String tableName, String } @Override - public Set listTablePrivileges(String databaseName, String tableName, String tableOwner, Optional principal) + public Set listTablePrivileges(String databaseName, String tableName, Optional tableOwner, Optional principal) { try { return retry() @@ -1539,15 +1539,14 @@ public Set listTablePrivileges(String databaseName, String ta ImmutableSet.Builder privileges = ImmutableSet.builder(); List hiveObjectPrivilegeList; if (principal.isEmpty()) { - HivePrincipal ownerPrincipal = new HivePrincipal(USER, tableOwner); - privileges.add(new HivePrivilegeInfo(OWNERSHIP, true, ownerPrincipal, ownerPrincipal)); + tableOwner.ifPresent(owner -> privileges.add(new HivePrivilegeInfo(OWNERSHIP, true, new HivePrincipal(USER, owner), new HivePrincipal(USER, owner)))); hiveObjectPrivilegeList = client.listPrivileges( null, null, new HiveObjectRef(TABLE, databaseName, tableName, null, null)); } else { - if (principal.get().getType() == USER && tableOwner.equals(principal.get().getName())) { + if (tableOwner.isPresent() && principal.get().getType() == USER && tableOwner.get().equals(principal.get().getName())) { privileges.add(new HivePrivilegeInfo(OWNERSHIP, true, principal.get(), principal.get())); } hiveObjectPrivilegeList = client.listPrivileges( diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/thrift/ThriftMetastore.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/thrift/ThriftMetastore.java index cb9aedbd49c2..10298c32edb3 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/thrift/ThriftMetastore.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/thrift/ThriftMetastore.java @@ -112,9 +112,10 @@ public interface ThriftMetastore void revokeTablePrivileges(String databaseName, String tableName, String tableOwner, HivePrincipal grantee, Set privileges); /** + * @param tableOwner * @param principal when empty, all table privileges are returned */ - Set listTablePrivileges(String databaseName, String tableName, String tableOwner, Optional principal); + Set listTablePrivileges(String databaseName, String tableName, Optional tableOwner, Optional principal); boolean isImpersonationEnabled(); diff --git a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/metastore/TestRecordingHiveMetastore.java b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/metastore/TestRecordingHiveMetastore.java index 41afdd06b160..d06114059cea 100644 --- a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/metastore/TestRecordingHiveMetastore.java +++ b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/metastore/TestRecordingHiveMetastore.java @@ -171,7 +171,7 @@ private void validateMetadata(HiveMetastore hiveMetastore) assertEquals(hiveMetastore.getPartitionNamesByFilter(HIVE_CONTEXT, "database", "table", PARTITION_COLUMN_NAMES, TupleDomain.all()), Optional.of(ImmutableList.of("value"))); assertEquals(hiveMetastore.getPartitionNamesByFilter(HIVE_CONTEXT, "database", "table", PARTITION_COLUMN_NAMES, TUPLE_DOMAIN), Optional.of(ImmutableList.of("value"))); assertEquals(hiveMetastore.getPartitionsByNames(HIVE_CONTEXT, TABLE, ImmutableList.of("value")), ImmutableMap.of("value", Optional.of(PARTITION))); - assertEquals(hiveMetastore.listTablePrivileges("database", "table", "owner", Optional.of(new HivePrincipal(USER, "user"))), ImmutableSet.of(PRIVILEGE_INFO)); + assertEquals(hiveMetastore.listTablePrivileges("database", "table", Optional.of("owner"), Optional.of(new HivePrincipal(USER, "user"))), ImmutableSet.of(PRIVILEGE_INFO)); assertEquals(hiveMetastore.listRoles(), ImmutableSet.of("role")); assertEquals(hiveMetastore.listRoleGrants(new HivePrincipal(USER, "user")), ImmutableSet.of(ROLE_GRANT)); assertEquals(hiveMetastore.listGrantedPrincipals("role"), ImmutableSet.of(ROLE_GRANT)); @@ -301,7 +301,7 @@ public Map> getPartitionsByNames(HiveIdentity identi } @Override - public Set listTablePrivileges(String databaseName, String tableName, String tableOwner, Optional principal) + public Set listTablePrivileges(String databaseName, String tableName, Optional tableOwner, Optional principal) { if (databaseName.equals("database") && tableName.equals("table") && principal.get().getType() == USER && principal.get().getName().equals("user")) { return ImmutableSet.of(PRIVILEGE_INFO); diff --git a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/metastore/UnimplementedHiveMetastore.java b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/metastore/UnimplementedHiveMetastore.java index b9297ee230ca..60257dcebdce 100644 --- a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/metastore/UnimplementedHiveMetastore.java +++ b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/metastore/UnimplementedHiveMetastore.java @@ -218,7 +218,7 @@ public void alterPartition(HiveIdentity identity, String databaseName, String ta } @Override - public Set listTablePrivileges(String databaseName, String tableName, String tableOwner, Optional prestoPrincipal) + public Set listTablePrivileges(String databaseName, String tableName, Optional tableOwner, Optional prestoPrincipal) { throw new UnsupportedOperationException(); } diff --git a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/metastore/thrift/InMemoryThriftMetastore.java b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/metastore/thrift/InMemoryThriftMetastore.java index 0e2916df4195..4ad6f58b3eb3 100644 --- a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/metastore/thrift/InMemoryThriftMetastore.java +++ b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/metastore/thrift/InMemoryThriftMetastore.java @@ -535,7 +535,7 @@ public Set listRoleGrants(HivePrincipal principal) } @Override - public Set listTablePrivileges(String databaseName, String tableName, String tableOwner, Optional principal) + public Set listTablePrivileges(String databaseName, String tableName, Optional tableOwner, Optional principal) { return ImmutableSet.of(); } diff --git a/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/CountingAccessFileHiveMetastore.java b/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/CountingAccessFileHiveMetastore.java index 65d382af87d7..7802da958b0e 100644 --- a/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/CountingAccessFileHiveMetastore.java +++ b/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/CountingAccessFileHiveMetastore.java @@ -293,7 +293,7 @@ public void revokeTablePrivileges(String databaseName, String tableName, String } @Override - public Set listTablePrivileges(String databaseName, String tableName, String tableOwner, Optional principal) + public Set listTablePrivileges(String databaseName, String tableName, Optional tableOwner, Optional principal) { throw new UnsupportedOperationException(); }