From d28bc9f15c62874cba7e50cafe34458e32866a56 Mon Sep 17 00:00:00 2001 From: Piotr Findeisen Date: Sun, 11 Apr 2021 15:21:38 +0200 Subject: [PATCH] Upgrade Coral to 1.0.42 This brings no user-visible changes. --- plugin/trino-hive/pom.xml | 2 +- .../main/java/io/trino/plugin/hive/ViewReaderUtil.java | 9 +++++---- pom.xml | 4 ++-- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/plugin/trino-hive/pom.xml b/plugin/trino-hive/pom.xml index 7a79f8ddc3821..8c52068cce875 100644 --- a/plugin/trino-hive/pom.xml +++ b/plugin/trino-hive/pom.xml @@ -187,7 +187,7 @@ com.linkedin.coral - coral-presto + coral-trino diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/ViewReaderUtil.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/ViewReaderUtil.java index 24b11afea73b6..3d0180b5223d4 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/ViewReaderUtil.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/ViewReaderUtil.java @@ -15,7 +15,7 @@ import com.linkedin.coral.hive.hive2rel.HiveMetastoreClient; import com.linkedin.coral.hive.hive2rel.HiveToRelConverter; -import com.linkedin.coral.presto.rel2presto.RelToPrestoConverter; +import com.linkedin.coral.trino.rel2trino.RelToTrinoConverter; import io.airlift.json.JsonCodec; import io.airlift.json.JsonCodecFactory; import io.airlift.json.ObjectMapperProvider; @@ -163,15 +163,16 @@ public ConnectorViewDefinition decodeViewData(String viewSql, Table table, Catal try { HiveToRelConverter hiveToRelConverter = HiveToRelConverter.create(metastoreClient); RelNode rel = hiveToRelConverter.convertView(table.getDatabaseName(), table.getTableName()); - RelToPrestoConverter rel2Presto = new RelToPrestoConverter(); - String prestoSql = rel2Presto.convert(rel); + RelToTrinoConverter relToTrino = new RelToTrinoConverter(); + String trinoSql = relToTrino.convert(rel); RelDataType rowType = rel.getRowType(); List columns = rowType.getFieldList().stream() .map(field -> new ViewColumn( field.getName(), typeManager.fromSqlType(getTypeString(field.getType())).getTypeId())) .collect(toImmutableList()); - return new ConnectorViewDefinition(prestoSql, + return new ConnectorViewDefinition( + trinoSql, Optional.of(catalogName.toString()), Optional.of(table.getDatabaseName()), columns, diff --git a/pom.xml b/pom.xml index 3abc18c1d3a81..bab987d9ff9cd 100644 --- a/pom.xml +++ b/pom.xml @@ -61,7 +61,7 @@ 2.5.1 1.15.1 3.2.7 - 1.0.37 + 1.0.42 5.5.2