Skip to content

Commit

Permalink
Fix misuse of HashSet::new
Browse files Browse the repository at this point in the history
Fix a case where the column index was misused as a
HashSet capacity parameter.
  • Loading branch information
djsstarburst authored and sopel39 committed Sep 16, 2020
1 parent ebee077 commit d8cbadf
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ public static List<ColumnMapping> buildColumnMappings(
}

checkArgument(
projectionsForColumn.computeIfAbsent(column.getBaseHiveColumnIndex(), HashSet::new).add(column.getHiveColumnProjectionInfo()),
projectionsForColumn.computeIfAbsent(column.getBaseHiveColumnIndex(), columnIndex -> new HashSet<>()).add(column.getHiveColumnProjectionInfo()),
"duplicate column in columns list");

// Add regular mapping if projection is valid for partition schema, otherwise add an empty mapping
Expand Down

0 comments on commit d8cbadf

Please sign in to comment.