use of io.trino.plugin.iceberg.UnknownTableTypeException in project trino by trinodb.
the class GlueIcebergTableOperations method getRefreshedLocation.
@Override
protected String getRefreshedLocation() {
Table table = getTable();
if (isPrestoView(table.getParameters()) && isHiveOrPrestoView(table.getTableType())) {
// this is a Presto Hive view, hence not a table
throw new TableNotFoundException(getSchemaTableName());
}
if (!isIcebergTable(table.getParameters())) {
throw new UnknownTableTypeException(getSchemaTableName());
}
String metadataLocation = table.getParameters().get(METADATA_LOCATION_PROP);
if (metadataLocation == null) {
throw new TrinoException(ICEBERG_INVALID_METADATA, format("Table is missing [%s] property: %s", METADATA_LOCATION_PROP, getSchemaTableName()));
}
return metadataLocation;
}
use of io.trino.plugin.iceberg.UnknownTableTypeException in project trino by trinodb.
the class AbstractMetastoreTableOperations method getRefreshedLocation.
@Override
protected final String getRefreshedLocation() {
Table table = getTable();
if (isPrestoView(table) && isHiveOrPrestoView(table)) {
// this is a Hive view, hence not a table
throw new TableNotFoundException(getSchemaTableName());
}
if (!isIcebergTable(table)) {
throw new UnknownTableTypeException(getSchemaTableName());
}
String metadataLocation = table.getParameters().get(METADATA_LOCATION_PROP);
if (metadataLocation == null) {
throw new TrinoException(ICEBERG_INVALID_METADATA, format("Table is missing [%s] property: %s", METADATA_LOCATION_PROP, getSchemaTableName()));
}
return metadataLocation;
}
Aggregations