CECTC / dbpack

A db proxy for distributed transaction, read write splitting and sharding! Support any language! It can be deployed as a sidecar in a pod.
https://cectc.github.io/dbpack-doc/#/en-us/
Apache License 2.0
357 stars 46 forks source link

feat: support join #283

Closed dk-lockdown closed 1 year ago

dk-lockdown commented 1 year ago

ref: https://github.com/cectc/dbpack/issues/

Ⅰ. Describe what this PR did

Supports join, only supports the join of two tables, can join with the global table, and can also join tables with the same topology. Tables with the same topology can be considered as ER relationship tables.

Ⅱ. Does this pull request fix one issue?

Ⅲ. Why don't you add test cases (unit test/integration test)?

Ⅳ. Describe how to verify it

check integration test result

image

Ⅴ. Special notes for reviews

codecov-commenter commented 1 year ago

Codecov Report

Merging #283 (1a14725) into dev (e0557a4) will increase coverage by 0.45%. The diff coverage is 72.15%.

@@            Coverage Diff             @@
##              dev     #283      +/-   ##
==========================================
+ Coverage   42.63%   43.08%   +0.45%     
==========================================
  Files          91       91              
  Lines       10473    10588     +115     
==========================================
+ Hits         4465     4562      +97     
- Misses       5516     5539      +23     
+ Partials      492      487       -5     
Impacted Files Coverage Δ
pkg/cond/sharding_algorithm.go 0.00% <ø> (ø)
pkg/misc/misc.go 67.64% <0.00%> (-11.67%) :arrow_down:
pkg/optimize/optimize_update.go 0.00% <0.00%> (ø)
pkg/topo/topo.go 68.75% <14.28%> (-6.69%) :arrow_down:
pkg/cond/algo_number_range.go 42.13% <21.42%> (-1.58%) :arrow_down:
pkg/cond/algo_number_mod.go 19.28% <23.07%> (+0.05%) :arrow_up:
pkg/plan/query.go 57.75% <88.88%> (+20.25%) :arrow_up:
pkg/optimize/optimize_delete.go 75.51% <100.00%> (+3.51%) :arrow_up:
pkg/optimize/optimize_insert.go 45.52% <100.00%> (+1.17%) :arrow_up:
pkg/optimize/optimize_select.go 72.97% <100.00%> (+3.95%) :arrow_up:
... and 2 more

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more