Skip to content

Commit

Permalink
opt: Add execbuilder support for Delete operator
Browse files Browse the repository at this point in the history
Build the deleteNode for the CBO Delete operator.

Also, fix bug in processSourceRow, which was incorrectly returning mutation
columns. Only return the subset of sourceVals that were requested.

Release note: None
  • Loading branch information
andy-kimball committed Jan 8, 2019
1 parent d9115b8 commit 78b6068
Show file tree
Hide file tree
Showing 14 changed files with 1,365 additions and 518 deletions.
4 changes: 2 additions & 2 deletions pkg/sql/logictest/testdata/logic_test/delete
Original file line number Diff line number Diff line change
Expand Up @@ -153,13 +153,13 @@ statement ok
INSERT INTO unindexed VALUES (1, 9), (8, 2), (3, 7), (6, 4)

query II
DELETE FROM unindexed WHERE k > 1 AND v < 7 ORDER BY v DESC RETURNING v,k
DELETE FROM unindexed WHERE k > 1 AND v < 7 ORDER BY v DESC LIMIT 2 RETURNING v,k
----
4 6
2 8

query II
DELETE FROM unindexed ORDER BY v RETURNING k,v
DELETE FROM unindexed ORDER BY v LIMIT 2 RETURNING k,v
----
3 7
1 9
Expand Down
Loading

0 comments on commit 78b6068

Please sign in to comment.