Skip to content

Commit

Permalink
Upgrade Coral to 1.0.42
Browse files Browse the repository at this point in the history
This brings no user-visible changes.
  • Loading branch information
findepi committed Apr 15, 2021
1 parent c7c4550 commit d28bc9f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion plugin/trino-hive/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@

<dependency>
<groupId>com.linkedin.coral</groupId>
<artifactId>coral-presto</artifactId>
<artifactId>coral-trino</artifactId>
</dependency>

<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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<ViewColumn> 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,
Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
<dep.errorprone.version>2.5.1</dep.errorprone.version>
<dep.testcontainers.version>1.15.1</dep.testcontainers.version>
<dep.docker-java.version>3.2.7</dep.docker-java.version>
<dep.coral.version>1.0.37</dep.coral.version>
<dep.coral.version>1.0.42</dep.coral.version>
<dep.confluent.version>5.5.2</dep.confluent.version>

<!--
Expand Down Expand Up @@ -1065,7 +1065,7 @@

<dependency>
<groupId>com.linkedin.coral</groupId>
<artifactId>coral-presto</artifactId>
<artifactId>coral-trino</artifactId>
<version>${dep.coral.version}</version>
</dependency>

Expand Down

0 comments on commit d28bc9f

Please sign in to comment.