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

Support attach relational database with schema #4639

Merged
merged 1 commit into from
Dec 17, 2024
Merged

Conversation

acquamarin
Copy link
Collaborator

This PR supports attaching relational database (postgres, duckdb) with schema option.
The grammar is:

ATTACH '<DB_CONNECTION>' AS <DB_ALIAS> (TYPE <DB_TYPE>,  SCHEMA='')

Copy link

Benchmark Result

Master commit hash: 24e669d1e6ae109a4d163b342c7fb501b949074a
Branch commit hash: 45f92887451ace74d21e3696ae6eced2eddf5b4e

Query Group Query Name Mean Time - Commit (ms) Mean Time - Master (ms) Diff
aggregation q24 644.74 649.76 -5.02 (-0.77%)
aggregation q28 11999.98 11896.14 103.84 (0.87%)
filter q14 125.60 127.08 -1.48 (-1.16%)
filter q15 129.87 134.60 -4.73 (-3.52%)
filter q16 302.42 304.62 -2.20 (-0.72%)
filter q17 446.88 446.44 0.45 (0.10%)
filter q18 1998.35 1991.50 6.85 (0.34%)
filter zonemap-node 88.96 88.65 0.31 (0.35%)
filter zonemap-node-lhs-cast 88.07 86.24 1.83 (2.12%)
filter zonemap-rel 5780.76 5734.73 46.03 (0.80%)
fixed_size_expr_evaluator q07 573.03 581.14 -8.11 (-1.39%)
fixed_size_expr_evaluator q08 801.70 815.94 -14.24 (-1.75%)
fixed_size_expr_evaluator q09 803.19 806.06 -2.87 (-0.36%)
fixed_size_expr_evaluator q10 236.83 240.30 -3.48 (-1.45%)
fixed_size_expr_evaluator q11 230.01 232.31 -2.30 (-0.99%)
fixed_size_expr_evaluator q12 227.35 229.21 -1.86 (-0.81%)
fixed_size_expr_evaluator q13 1454.24 1465.91 -11.67 (-0.80%)
fixed_size_seq_scan q23 111.29 114.22 -2.93 (-2.56%)
join q29 582.06 599.51 -17.45 (-2.91%)
join q30 1497.24 1571.22 -73.99 (-4.71%)
join q31 4.72 4.88 -0.16 (-3.33%)
join SelectiveTwoHopJoin 49.81 47.54 2.27 (4.78%)
ldbc_snb_ic q35 2621.54 2629.10 -7.56 (-0.29%)
ldbc_snb_ic q36 543.85 542.96 0.89 (0.16%)
ldbc_snb_is q32 5.25 4.25 1.00 (23.64%)
ldbc_snb_is q33 13.70 11.73 1.98 (16.85%)
ldbc_snb_is q34 1.12 1.18 -0.05 (-4.54%)
multi-rel multi-rel-large-scan 1232.84 1212.90 19.94 (1.64%)
multi-rel multi-rel-lookup 10.03 22.35 -12.32 (-55.13%)
multi-rel multi-rel-small-scan 90.76 77.07 13.69 (17.76%)
order_by q25 129.72 131.86 -2.14 (-1.63%)
order_by q26 447.78 450.99 -3.21 (-0.71%)
order_by q27 1495.56 1512.70 -17.14 (-1.13%)
recursive_join recursive-join-bidirection 273.33 272.65 0.68 (0.25%)
recursive_join recursive-join-dense 4793.97 6338.61 -1544.64 (-24.37%)
recursive_join recursive-join-path 22990.18 23739.55 -749.37 (-3.16%)
recursive_join recursive-join-sparse 13807.16 14344.63 -537.47 (-3.75%)
recursive_join recursive-join-trail 4484.74 6826.60 -2341.86 (-34.30%)
scan_after_filter q01 172.48 172.53 -0.04 (-0.02%)
scan_after_filter q02 154.93 156.09 -1.16 (-0.74%)
shortest_path_ldbc100 q37 82.55 86.81 -4.26 (-4.91%)
shortest_path_ldbc100 q38 365.17 333.62 31.55 (9.46%)
shortest_path_ldbc100 q39 57.06 57.34 -0.28 (-0.49%)
shortest_path_ldbc100 q40 416.22 415.87 0.34 (0.08%)
var_size_expr_evaluator q03 2131.79 2104.76 27.03 (1.28%)
var_size_expr_evaluator q04 2302.00 2289.01 12.99 (0.57%)
var_size_expr_evaluator q05 2595.57 2575.55 20.02 (0.78%)
var_size_expr_evaluator q06 1343.44 1351.14 -7.70 (-0.57%)
var_size_seq_scan q19 1482.55 1475.86 6.69 (0.45%)
var_size_seq_scan q20 2693.66 2736.49 -42.84 (-1.57%)
var_size_seq_scan q21 2301.29 2282.99 18.29 (0.80%)
var_size_seq_scan q22 126.67 127.78 -1.11 (-0.87%)

Copy link

codecov bot commented Dec 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 86.52%. Comparing base (24e669d) to head (d27412d).
Report is 3 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #4639   +/-   ##
=======================================
  Coverage   86.52%   86.52%           
=======================================
  Files        1369     1369           
  Lines       57973    57973           
  Branches     7208     7208           
=======================================
+ Hits        50161    50163    +2     
+ Misses       7645     7643    -2     
  Partials      167      167           

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

@acquamarin acquamarin merged commit 45013c1 into master Dec 17, 2024
25 checks passed
@acquamarin acquamarin deleted the attach-with-schema branch December 17, 2024 15:38
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.

2 participants