Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement drop/add property with if exists #4598

Merged
merged 4 commits into from
Dec 5, 2024
Merged

Conversation

acquamarin
Copy link
Collaborator

@acquamarin acquamarin commented Dec 4, 2024

Closes #4583
This PR implements: ADD IF NOT EXISTS and DROP IF EXISTS clause.

ADD IF NOT EXISTS: Adds the property if the property doesn't exist in the table.
DROP IF EXISTS: Drops the property only when the property doesn't exist in the table.

Copy link

github-actions bot commented Dec 4, 2024

Benchmark Result

Master commit hash: 07f24e9267cf00ecd747884ebc56bf14a98c1376
Branch commit hash: da8e8d0bc7678e1fb19707762d001db84e0eb6c3

Query Group Query Name Mean Time - Commit (ms) Mean Time - Master (ms) Diff
aggregation q24 646.30 647.39 -1.10 (-0.17%)
aggregation q28 11973.04 11474.82 498.22 (4.34%)
filter q14 127.13 125.15 1.98 (1.58%)
filter q15 123.47 127.45 -3.98 (-3.12%)
filter q16 304.25 303.34 0.91 (0.30%)
filter q17 446.39 442.77 3.61 (0.82%)
filter q18 1972.99 1950.88 22.11 (1.13%)
filter zonemap-node 86.50 88.20 -1.71 (-1.93%)
filter zonemap-node-lhs-cast 88.03 88.87 -0.84 (-0.94%)
filter zonemap-rel 5687.55 5581.07 106.49 (1.91%)
fixed_size_expr_evaluator q07 574.72 588.28 -13.57 (-2.31%)
fixed_size_expr_evaluator q08 803.19 807.30 -4.11 (-0.51%)
fixed_size_expr_evaluator q09 803.55 805.83 -2.28 (-0.28%)
fixed_size_expr_evaluator q10 237.65 244.38 -6.73 (-2.75%)
fixed_size_expr_evaluator q11 229.35 235.93 -6.58 (-2.79%)
fixed_size_expr_evaluator q12 227.03 233.73 -6.70 (-2.87%)
fixed_size_expr_evaluator q13 1451.81 1451.11 0.70 (0.05%)
fixed_size_seq_scan q23 113.19 115.29 -2.11 (-1.83%)
join q29 625.49 623.62 1.87 (0.30%)
join q30 1358.38 1468.98 -110.60 (-7.53%)
join q31 5.21 5.43 -0.22 (-4.02%)
ldbc_snb_ic q35 452.47 407.73 44.73 (10.97%)
ldbc_snb_ic q36 133.79 129.30 4.49 (3.47%)
ldbc_snb_is q32 3.12 5.51 -2.39 (-43.35%)
ldbc_snb_is q33 12.18 12.93 -0.75 (-5.83%)
ldbc_snb_is q34 1.55 1.40 0.16 (11.32%)
multi-rel multi-rel-large-scan 1214.03 1252.53 -38.50 (-3.07%)
multi-rel multi-rel-lookup 23.06 5.37 17.69 (329.35%)
multi-rel multi-rel-small-scan 82.52 79.11 3.41 (4.31%)
order_by q25 130.57 131.05 -0.49 (-0.37%)
order_by q26 449.33 472.05 -22.72 (-4.81%)
order_by q27 1461.75 1460.61 1.13 (0.08%)
scan_after_filter q01 170.52 170.27 0.25 (0.15%)
scan_after_filter q02 154.48 155.46 -0.98 (-0.63%)
shortest_path_ldbc100 q37 90.30 96.85 -6.54 (-6.76%)
shortest_path_ldbc100 q38 453.54 440.24 13.30 (3.02%)
shortest_path_ldbc100 q39 61.37 60.80 0.57 (0.94%)
shortest_path_ldbc100 q40 509.51 521.72 -12.21 (-2.34%)
var_size_expr_evaluator q03 2139.42 2054.98 84.44 (4.11%)
var_size_expr_evaluator q04 2256.99 2274.81 -17.82 (-0.78%)
var_size_expr_evaluator q05 2586.00 2675.84 -89.84 (-3.36%)
var_size_expr_evaluator q06 1346.24 1348.91 -2.67 (-0.20%)
var_size_seq_scan q19 1440.22 1452.24 -12.02 (-0.83%)
var_size_seq_scan q20 2622.93 2602.29 20.64 (0.79%)
var_size_seq_scan q21 2265.28 2267.26 -1.98 (-0.09%)
var_size_seq_scan q22 125.16 126.46 -1.30 (-1.03%)

@acquamarin acquamarin requested a review from ray6080 December 4, 2024 19:49
test/test_files/ddl/ddl.test Show resolved Hide resolved
@acquamarin acquamarin merged commit 9dd061c into master Dec 5, 2024
@acquamarin acquamarin deleted the alter-table-conflict branch December 5, 2024 03:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature: ADD IF NOT EXISTS and DROP IF EXISTS to ALTER TABLE command
2 participants