File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed
presto-iceberg/src/main/java/com/facebook/presto/iceberg Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ public PrestoIcebergSchema(
45
45
this .schemaId = schemaId ;
46
46
this .columns = ImmutableList .copyOf (requireNonNull (columns , "columns is null" ));
47
47
this .columnNameToIdMapping = ImmutableMap .copyOf (requireNonNull (columnNameToIdMapping , "columnNameToIdMapping is null" ));
48
- this .aliases = aliases != null ? ImmutableMap .copyOf (aliases ) : null ;
48
+ this .aliases = aliases != null ? ImmutableMap .copyOf (aliases ) : ImmutableMap . of () ;
49
49
this .identifierFieldIds = ImmutableSet .copyOf (requireNonNull (identifierFieldIds , "identifierFieldIds is null" ));
50
50
}
51
51
Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ public static Schema toIcebergSchema(PrestoIcebergSchema schema)
45
45
schema .getColumns ().stream ()
46
46
.map (nestedField -> toIcebergNestedField (nestedField , schema .getColumnNameToIdMapping ()))
47
47
.collect (toImmutableList ()),
48
- schema .getAliases (),
48
+ schema .getAliases (). isEmpty () ? null : schema . getAliases () ,
49
49
schema .getIdentifierFieldIds ());
50
50
}
51
51
}
You can’t perform that action at this time.
0 commit comments