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

Trim Unnecessary Quote for CLI JSON output #4643

Merged
merged 3 commits into from
Dec 17, 2024
Merged

Conversation

SterlingT3485
Copy link
Collaborator

@SterlingT3485 SterlingT3485 commented Dec 17, 2024

Description

Before, in printJsonExecutionResult, we always add quotes to the value, instead, we should only add these quotes when the value is a string or a blob.

Fixes #4634

Contributor agreement

Copy link

Benchmark Result

Master commit hash: 2bb28c28819a081c63229f651b447c7a2653fd54
Branch commit hash: bdec9ee3e35ce1345cd3b38eee3dfb0e3d7bbda5

Query Group Query Name Mean Time - Commit (ms) Mean Time - Master (ms) Diff
aggregation q24 656.23 654.40 1.83 (0.28%)
aggregation q28 11475.75 12365.31 -889.56 (-7.19%)
filter q14 124.86 133.10 -8.24 (-6.19%)
filter q15 123.78 134.69 -10.91 (-8.10%)
filter q16 313.99 306.93 7.06 (2.30%)
filter q17 443.64 455.36 -11.72 (-2.57%)
filter q18 1972.40 1936.22 36.18 (1.87%)
filter zonemap-node 86.10 94.77 -8.67 (-9.15%)
filter zonemap-node-lhs-cast 86.29 94.88 -8.59 (-9.05%)
filter zonemap-rel 5460.34 5415.07 45.27 (0.84%)
fixed_size_expr_evaluator q07 572.03 578.82 -6.79 (-1.17%)
fixed_size_expr_evaluator q08 800.42 806.06 -5.65 (-0.70%)
fixed_size_expr_evaluator q09 810.13 809.88 0.25 (0.03%)
fixed_size_expr_evaluator q10 235.46 244.55 -9.08 (-3.72%)
fixed_size_expr_evaluator q11 228.75 237.48 -8.73 (-3.68%)
fixed_size_expr_evaluator q12 227.16 233.86 -6.69 (-2.86%)
fixed_size_expr_evaluator q13 1477.93 1485.24 -7.30 (-0.49%)
fixed_size_seq_scan q23 108.18 125.00 -16.82 (-13.46%)
join q29 603.84 639.31 -35.47 (-5.55%)
join q30 1583.87 1592.03 -8.16 (-0.51%)
join q31 5.26 4.68 0.57 (12.25%)
join SelectiveTwoHopJoin 52.57 55.08 -2.51 (-4.56%)
ldbc_snb_ic q35 2671.02 2663.93 7.09 (0.27%)
ldbc_snb_ic q36 555.87 519.73 36.14 (6.95%)
ldbc_snb_is q32 5.92 5.78 0.14 (2.36%)
ldbc_snb_is q33 11.07 13.62 -2.55 (-18.74%)
ldbc_snb_is q34 1.25 1.22 0.03 (2.46%)
multi-rel multi-rel-large-scan 1235.93 1405.14 -169.21 (-12.04%)
multi-rel multi-rel-lookup 31.01 31.58 -0.57 (-1.81%)
multi-rel multi-rel-small-scan 69.77 89.21 -19.44 (-21.79%)
order_by q25 141.26 137.18 4.08 (2.98%)
order_by q26 452.93 457.64 -4.72 (-1.03%)
order_by q27 1498.32 1465.38 32.94 (2.25%)
recursive_join recursive-join-bidirection 292.55 286.09 6.46 (2.26%)
recursive_join recursive-join-dense 7412.46 5568.82 1843.64 (33.11%)
recursive_join recursive-join-path 23789.94 23972.72 -182.77 (-0.76%)
recursive_join recursive-join-sparse 14440.78 14774.18 -333.39 (-2.26%)
recursive_join recursive-join-trail 7365.74 6285.52 1080.22 (17.19%)
scan_after_filter q01 174.67 178.31 -3.64 (-2.04%)
scan_after_filter q02 158.41 163.58 -5.17 (-3.16%)
shortest_path_ldbc100 q37 93.89 88.54 5.36 (6.05%)
shortest_path_ldbc100 q38 362.56 347.84 14.72 (4.23%)
shortest_path_ldbc100 q39 61.02 59.23 1.79 (3.02%)
shortest_path_ldbc100 q40 409.19 454.80 -45.61 (-10.03%)
var_size_expr_evaluator q03 2116.95 2070.25 46.69 (2.26%)
var_size_expr_evaluator q04 2301.66 2231.07 70.59 (3.16%)
var_size_expr_evaluator q05 2692.01 2617.03 74.98 (2.87%)
var_size_expr_evaluator q06 1346.35 1323.27 23.08 (1.74%)
var_size_seq_scan q19 1513.04 1451.24 61.80 (4.26%)
var_size_seq_scan q20 2448.37 2368.65 79.73 (3.37%)
var_size_seq_scan q21 2326.51 2268.49 58.02 (2.56%)
var_size_seq_scan q22 130.12 127.41 2.72 (2.13%)

Copy link

codecov bot commented Dec 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 86.51%. Comparing base (881912a) to head (d3e8824).
Report is 2 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #4643   +/-   ##
=======================================
  Coverage   86.51%   86.51%           
=======================================
  Files        1369     1369           
  Lines       57983    57983           
  Branches     7209     7208    -1     
=======================================
+ Hits        50165    50166    +1     
+ Misses       7650     7649    -1     
  Partials      168      168           

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

Copy link
Collaborator

@MSebanc MSebanc left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link

Benchmark Result

Master commit hash: 45013c15a8468c484614370ba1cc9b7e476a59fc
Branch commit hash: aaf76bc8b5a7f386aec267bfdeb2a469d8451365

Query Group Query Name Mean Time - Commit (ms) Mean Time - Master (ms) Diff
aggregation q24 651.56 648.90 2.66 (0.41%)
aggregation q28 11325.10 11682.05 -356.95 (-3.06%)
filter q14 126.63 125.74 0.89 (0.71%)
filter q15 125.05 128.46 -3.41 (-2.66%)
filter q16 303.68 315.75 -12.06 (-3.82%)
filter q17 445.84 444.63 1.21 (0.27%)
filter q18 2002.61 1991.88 10.73 (0.54%)
filter zonemap-node 86.83 86.55 0.28 (0.32%)
filter zonemap-node-lhs-cast 86.47 86.17 0.30 (0.35%)
filter zonemap-rel 5729.77 5709.56 20.20 (0.35%)
fixed_size_expr_evaluator q07 571.94 572.49 -0.55 (-0.10%)
fixed_size_expr_evaluator q08 802.03 803.29 -1.25 (-0.16%)
fixed_size_expr_evaluator q09 802.96 804.64 -1.68 (-0.21%)
fixed_size_expr_evaluator q10 236.09 236.06 0.04 (0.02%)
fixed_size_expr_evaluator q11 229.76 228.26 1.50 (0.66%)
fixed_size_expr_evaluator q12 225.27 225.33 -0.06 (-0.03%)
fixed_size_expr_evaluator q13 1453.12 1452.82 0.30 (0.02%)
fixed_size_seq_scan q23 110.77 112.11 -1.34 (-1.20%)
join q29 633.10 636.11 -3.02 (-0.47%)
join q30 1557.69 1538.05 19.64 (1.28%)
join q31 6.33 7.22 -0.88 (-12.24%)
join SelectiveTwoHopJoin 53.35 56.38 -3.02 (-5.36%)
ldbc_snb_ic q35 2658.09 2652.94 5.15 (0.19%)
ldbc_snb_ic q36 528.59 540.74 -12.14 (-2.25%)
ldbc_snb_is q32 3.14 3.41 -0.27 (-7.88%)
ldbc_snb_is q33 11.98 12.12 -0.14 (-1.17%)
ldbc_snb_is q34 1.23 1.18 0.05 (3.81%)
multi-rel multi-rel-large-scan 1291.25 1201.36 89.89 (7.48%)
multi-rel multi-rel-lookup 10.49 28.11 -17.63 (-62.69%)
multi-rel multi-rel-small-scan 91.90 94.65 -2.75 (-2.90%)
order_by q25 128.12 128.98 -0.87 (-0.67%)
order_by q26 448.59 450.91 -2.33 (-0.52%)
order_by q27 1483.30 1498.71 -15.41 (-1.03%)
recursive_join recursive-join-bidirection 276.32 307.56 -31.24 (-10.16%)
recursive_join recursive-join-dense 5155.97 6215.03 -1059.06 (-17.04%)
recursive_join recursive-join-path 22918.56 23775.95 -857.39 (-3.61%)
recursive_join recursive-join-sparse 13745.09 14611.94 -866.85 (-5.93%)
recursive_join recursive-join-trail 5423.43 6561.09 -1137.67 (-17.34%)
scan_after_filter q01 171.16 172.92 -1.75 (-1.01%)
scan_after_filter q02 155.06 157.24 -2.19 (-1.39%)
shortest_path_ldbc100 q37 87.99 87.13 0.86 (0.98%)
shortest_path_ldbc100 q38 340.11 369.42 -29.31 (-7.93%)
shortest_path_ldbc100 q39 61.28 58.80 2.48 (4.22%)
shortest_path_ldbc100 q40 456.26 398.32 57.95 (14.55%)
var_size_expr_evaluator q03 2123.42 2104.12 19.29 (0.92%)
var_size_expr_evaluator q04 2301.85 2278.12 23.73 (1.04%)
var_size_expr_evaluator q05 2559.57 2726.42 -166.85 (-6.12%)
var_size_expr_evaluator q06 1343.87 1348.45 -4.58 (-0.34%)
var_size_seq_scan q19 1475.98 1463.03 12.94 (0.88%)
var_size_seq_scan q20 2697.60 2651.30 46.30 (1.75%)
var_size_seq_scan q21 2296.53 2252.35 44.18 (1.96%)
var_size_seq_scan q22 127.58 125.65 1.93 (1.54%)

@SterlingT3485 SterlingT3485 merged commit 109012e into master Dec 17, 2024
25 checks passed
@SterlingT3485 SterlingT3485 deleted the output_mode_json branch December 17, 2024 21:16
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.

Bug: Json output mode incorrectly serializes arrays
2 participants