use of io.trino.plugin.hive.HiveTableProperties.ANALYZE_COLUMNS_PROPERTY in project trino by trinodb.
the class HiveMetadata method getTableMetadata.
@Override
public ConnectorTableMetadata getTableMetadata(ConnectorSession session, ConnectorTableHandle tableHandle) {
HiveTableHandle hiveTableHandle = (HiveTableHandle) tableHandle;
ConnectorTableMetadata tableMetadata = getTableMetadata(session, hiveTableHandle.getSchemaTableName());
return hiveTableHandle.getAnalyzeColumnNames().map(columnNames -> new ConnectorTableMetadata(tableMetadata.getTable(), tableMetadata.getColumns(), ImmutableMap.<String, Object>builder().putAll(tableMetadata.getProperties()).put(ANALYZE_COLUMNS_PROPERTY, columnNames).buildOrThrow(), tableMetadata.getComment())).orElse(tableMetadata);
}
Aggregations