Skip to content

Commit

Permalink
Update h2o-core/src/main/java/water/parser/ParseDataset.java
Browse files Browse the repository at this point in the history
Co-authored-by: Marek Novotný <[email protected]>
  • Loading branch information
wendycwong and mn-mikke authored Oct 25, 2023
1 parent e4f2386 commit c21a63d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion h2o-core/src/main/java/water/parser/ParseDataset.java
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ public int compare(ParseWriter.ParseErr o1, ParseWriter.ParseErr o2) {
final int[] skippedColumns = setup.getSkippedColumns();
String[] newColumnTypes;
if (skippedColumns != null) { // need to remove column types of skipped columns
List<Integer> skippedColIndices = Arrays.stream(skippedColumns).boxed().collect(Collectors.toList());
Set<Integer> skippedColIndices = Arrays.stream(skippedColumns).boxed().collect(Collectors.toSet());
newColumnTypes = IntStream.range(0, originalColumnTypes.length).filter(x -> !(skippedColIndices.contains(x))).mapToObj(x -> originalColumnTypes[x]).toArray(String[]::new);
} else {
newColumnTypes = originalColumnTypes;
Expand Down

0 comments on commit c21a63d

Please sign in to comment.