From 45e4c231488f1b8479b8bf5d8cfc63f882eae486 Mon Sep 17 00:00:00 2001 From: Dain Sundstrom Date: Mon, 15 Nov 2021 18:52:39 -0800 Subject: [PATCH] Remove owner from Iceberg materialized system table --- .../IcebergMaterializedViewDefinition.java | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergMaterializedViewDefinition.java b/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergMaterializedViewDefinition.java index cea746fbdf0b..af3f4d32906c 100644 --- a/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergMaterializedViewDefinition.java +++ b/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergMaterializedViewDefinition.java @@ -47,7 +47,6 @@ public class IcebergMaterializedViewDefinition private final Optional schema; private final List columns; private final Optional comment; - private final String owner; public static String encodeMaterializedViewData(IcebergMaterializedViewDefinition definition) { @@ -75,8 +74,7 @@ public static IcebergMaterializedViewDefinition fromConnectorMaterializedViewDef definition.getColumns().stream() .map(column -> new Column(column.getName(), column.getType())) .collect(toImmutableList()), - definition.getComment(), - definition.getOwner()); + definition.getComment()); } @JsonCreator @@ -85,15 +83,13 @@ public IcebergMaterializedViewDefinition( @JsonProperty("catalog") Optional catalog, @JsonProperty("schema") Optional schema, @JsonProperty("columns") List columns, - @JsonProperty("comment") Optional comment, - @JsonProperty("owner") String owner) + @JsonProperty("comment") Optional comment) { this.originalSql = requireNonNull(originalSql, "originalSql is null"); this.catalog = requireNonNull(catalog, "catalog is null"); this.schema = requireNonNull(schema, "schema is null"); this.columns = List.copyOf(requireNonNull(columns, "columns is null")); this.comment = requireNonNull(comment, "comment is null"); - this.owner = requireNonNull(owner, "owner is null"); if (catalog.isEmpty() && schema.isPresent()) { throw new IllegalArgumentException("catalog must be present if schema is present"); @@ -133,12 +129,6 @@ public Optional getComment() return comment; } - @JsonProperty - public String getOwner() - { - return owner; - } - @Override public String toString() { @@ -148,7 +138,6 @@ public String toString() schema.ifPresent(value -> joiner.add("schema=" + value)); joiner.add("columns=" + columns); comment.ifPresent(value -> joiner.add("comment=" + value)); - joiner.add("owner=" + owner); return getClass().getSimpleName() + joiner; }