Skip to content
This repository was archived by the owner on Oct 10, 2025. It is now read-only.

Support SET with dictionary - #5996

Merged
carminite merged 5 commits into
masterfrom
set-dict-format-support
Sep 10, 2025
Merged

carminite merged 5 commits into
masterfrom
set-dict-format-support

Conversation

@carminite

@carminite carminite commented Sep 9, 2025 •

Copy link
Copy Markdown
Contributor

Description

Supports the following syntax:

MATCH (n) SET n = $data where $data is a dict containing property keys and values.

NOTE that only property keys are allowed, not property expressions (like a.*). Nor are multiple assignments allowed (like SET n = { ... }, m = { ... } or SET n.var = val, m = { ... })

Associated docs (issue or PR):

Contributor agreement

@carminite carminite self-assigned this Sep 9, 2025
@github-actions

github-actions Bot commented Sep 9, 2025

Copy link
Copy Markdown

Benchmark Result

Master commit hash: 0888644db324122ccbf63664fec07e22e95c1f0a
Branch commit hash: bb86f8b3ff3eb2607087d11da8a75bb2fc39ca29

Query Group Query Name Mean Time - Commit (ms) Mean Time - Master (ms) Diff
ldbc_snb_ic q35 10.04 8.08 1.96 (24.19%)
recursive_join recursive-join-sparse 6.04 9.90 -3.86 (-38.96%)
Other queries
Query Group Query Name Mean Time - Commit (ms) Mean Time - Master (ms) Diff
aggregation q24 714.98 717.76 -2.78 (-0.39%)
aggregation q28 7712.07 7738.39 -26.32 (-0.34%)
filter q14 61.13 61.14 -0.02 (-0.03%)
filter q15 61.86 59.81 2.06 (3.44%)
filter q16 281.61 281.81 -0.19 (-0.07%)
filter q17 388.07 388.99 -0.92 (-0.24%)
filter q18 1838.38 1859.93 -21.55 (-1.16%)
filter zonemap-node 24.04 23.26 0.78 (3.35%)
filter zonemap-node-lhs-cast 24.25 23.49 0.75 (3.21%)
filter zonemap-node-null 23.90 23.10 0.80 (3.48%)
filter zonemap-rel 5541.90 5639.76 -97.86 (-1.74%)
fixed_size_expr_evaluator q07 629.77 635.37 -5.60 (-0.88%)
fixed_size_expr_evaluator q08 922.09 927.14 -5.05 (-0.54%)
fixed_size_expr_evaluator q09 919.96 924.08 -4.12 (-0.45%)
fixed_size_expr_evaluator q10 193.88 201.51 -7.63 (-3.79%)
fixed_size_expr_evaluator q11 193.52 200.35 -6.83 (-3.41%)
fixed_size_expr_evaluator q12 172.32 177.71 -5.39 (-3.03%)
fixed_size_expr_evaluator q13 1528.89 1512.03 16.86 (1.11%)
fixed_size_seq_scan q23 54.92 53.99 0.93 (1.72%)
join q29 824.15 806.89 17.26 (2.14%)
join q30 1800.50 1759.82 40.68 (2.31%)
join q31 6.06 5.40 0.66 (12.26%)
join SelectiveTwoHopJoin 53.70 50.36 3.34 (6.64%)
ldbc_snb_ic q36 101.64 96.89 4.75 (4.90%)
ldbc_snb_is q32 4.91 5.34 -0.44 (-8.16%)
ldbc_snb_is q33 13.27 15.45 -2.18 (-14.10%)
ldbc_snb_is q34 1.43 1.28 0.15 (11.90%)
limit push-down-limit-into-distinct 1987.48 1986.50 0.97 (0.05%)
multi-rel multi-rel-large-scan 1416.19 1480.31 -64.12 (-4.33%)
multi-rel multi-rel-lookup 7.66 8.44 -0.78 (-9.30%)
multi-rel multi-rel-small-scan 199.90 189.71 10.19 (5.37%)
order_by q25 62.95 62.74 0.21 (0.33%)
order_by q26 386.22 384.83 1.40 (0.36%)
order_by q27 1310.86 1320.41 -9.55 (-0.72%)
recursive_join recursive-join-bidirection 324.07 345.95 -21.88 (-6.32%)
recursive_join recursive-join-dense 7130.40 7087.58 42.83 (0.60%)
recursive_join recursive-join-path 23484.47 23253.18 231.28 (0.99%)
recursive_join recursive-join-trail 7074.52 7053.92 20.60 (0.29%)
scan_after_filter q01 105.90 115.15 -9.25 (-8.03%)
scan_after_filter q02 93.85 101.56 -7.71 (-7.59%)
shortest_path_ldbc100 q37 143.24 146.16 -2.92 (-2.00%)
shortest_path_ldbc100 q38 302.09 359.28 -57.20 (-15.92%)
shortest_path_ldbc100 q39 101.72 103.23 -1.51 (-1.46%)
shortest_path_ldbc100 q40 521.65 511.56 10.10 (1.97%)
var_size_expr_evaluator q03 2121.09 2129.11 -8.02 (-0.38%)
var_size_expr_evaluator q04 2117.03 2278.03 -161.00 (-7.07%)
var_size_expr_evaluator q05 2562.17 2631.90 -69.73 (-2.65%)
var_size_expr_evaluator q06 1279.95 1291.32 -11.37 (-0.88%)
var_size_seq_scan q19 1363.88 1372.55 -8.67 (-0.63%)
var_size_seq_scan q20 2617.33 2677.14 -59.82 (-2.23%)
var_size_seq_scan q21 2163.73 2183.98 -20.25 (-0.93%)
var_size_seq_scan q22 110.31 109.44 0.87 (0.79%)

@andyfengHKU andyfengHKU left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall LGTM just need more testing.

for (auto& setItem : ctx.oC_SetItem()) {
setClause->addSetItem(transformSetItem(*setItem));
if (ctx.kU_Properties()) {
KU_ASSERT(ctx.kU_Properties()->oC_PropertyKeyName().size() ==

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to assert. This is guaranteed by the grammar.

Comment thread test/test_files/dml_node/set/set_read.test Outdated
Comment thread test/test_files/dml_node/set/set_read.test
@carminite
carminite merged commit 2f52795 into master Sep 10, 2025
6 checks passed
@carminite
carminite deleted the set-dict-format-support branch September 10, 2025 16:55
@codecov

codecov Bot commented Sep 10, 2025 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.33%. Comparing base (1256974) to head (8ebf4c9).
⚠️ Report is 3 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #5996   +/-   ##
=======================================
  Coverage   86.32%   86.33%           
=======================================
  Files        1456     1456           
  Lines       65790    65802   +12     
  Branches     8029     8031    +2     
=======================================
+ Hits        56793    56807   +14     
+ Misses       8739     8736    -3     
- Partials      258      259    +1     
Flag Coverage Δ
in-mem 81.01% <100.00%> (-0.01%) ⬇️
on-disk 86.40% <100.00%> (+<0.01%) ⬆️
recovery 86.40% <100.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

hakuuww pushed a commit that referenced this pull request Sep 12, 2025
* Test for multiple set support

* Implement SET by dictionary + basic tests

* ci: auto code format

* write analogous tests for SET by dict to existing SET tests

---------

Co-authored-by: CI Bot <carminite@users.noreply.github.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants