Skip to content

Commit

Permalink
fix(table): method 'where' apply 2 times selection function (#962)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhiwen95 authored Jul 22, 2021
1 parent aa65d80 commit aedd7dd
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions core/src/main/java/tech/tablesaw/api/Table.java
Original file line number Diff line number Diff line change
Expand Up @@ -758,10 +758,7 @@ public Table where(Selection selection) {
}

public Table where(Function<Table, Selection> selection) {
Table tempTable = where(selection.apply(this));
Table newTable = tempTable.emptyCopy(tempTable.rowCount());
Rows.copyRowsToTable(selection.apply(this), this, newTable);
return newTable;
return where(selection.apply(this));
}

public Table dropWhere(Function<Table, Selection> selection) {
Expand Down

0 comments on commit aedd7dd

Please sign in to comment.