Skip to content

Commit aedd7dd

Browse files
authored
fix(table): method 'where' apply 2 times selection function (#962)
1 parent aa65d80 commit aedd7dd

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

core/src/main/java/tech/tablesaw/api/Table.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -758,10 +758,7 @@ public Table where(Selection selection) {
758758
}
759759

760760
public Table where(Function<Table, Selection> selection) {
761-
Table tempTable = where(selection.apply(this));
762-
Table newTable = tempTable.emptyCopy(tempTable.rowCount());
763-
Rows.copyRowsToTable(selection.apply(this), this, newTable);
764-
return newTable;
761+
return where(selection.apply(this));
765762
}
766763

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

0 commit comments

Comments
 (0)