Skip to content

Commit

Permalink
Replace stream with string join
Browse files Browse the repository at this point in the history
  • Loading branch information
electrum committed Jul 28, 2020
1 parent b57236f commit 03720b3
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@
import static io.prestosql.plugin.hive.HiveType.toHiveType;
import static io.prestosql.plugin.hive.metastore.StorageFormat.fromHiveStorageFormat;
import static io.prestosql.plugin.hive.util.CompressionConfigUtil.configureCompression;
import static java.lang.String.join;
import static java.util.stream.Collectors.joining;
import static org.apache.hadoop.hive.metastore.api.hive_metastoreConstants.FILE_INPUT_FORMAT;
import static org.apache.hadoop.hive.metastore.api.hive_metastoreConstants.META_TABLE_COLUMNS;
Expand Down Expand Up @@ -411,8 +412,7 @@ private static Properties createSchema(HiveStorageFormat format, List<String> co
TypeTranslator typeTranslator = new HiveTypeTranslator();
schema.setProperty(SERIALIZATION_LIB, format.getSerDe());
schema.setProperty(FILE_INPUT_FORMAT, format.getInputFormat());
schema.setProperty(META_TABLE_COLUMNS, columnNames.stream()
.collect(joining(",")));
schema.setProperty(META_TABLE_COLUMNS, join(",", columnNames));
schema.setProperty(META_TABLE_COLUMN_TYPES, columnTypes.stream()
.map(type -> toHiveType(typeTranslator, type))
.map(HiveType::getHiveTypeName)
Expand Down

0 comments on commit 03720b3

Please sign in to comment.