radondb / radon

RadonDB is an open source, cloud-native MySQL database for building global, scalable cloud services
https://radondb.io/
GNU General Public License v3.0
1.8k stars 217 forks source link

.*: complete insert/replace statement #708 #709

Closed hustjieke closed 3 years ago

hustjieke commented 3 years ago

[summary] compute insert/replace statement.

  1. add [HIGH_PRIORITY | LOW_PRIORITY | DELAYED] options for Insert, add [LOW_PRIORITY | DELAYED] options for Replace Statement.
  2. remove "on duplicate key update" for Replace Statement, this is a bug.
  3. add support for "PARTITION" to parse, but the function hasn't implement yet.
  4. add support for writing data without columns, like: "insert into t values ...."
  5. refactor some code on insert plan.

[test case] src/planner/insert_plan_test.go src/proxy/insert_test.go src/vendor/github.com/xelabs/go-mysqlstack/sqlparser/parse_test.go

[patch codecov] src/planner/insert_plan.go 93.7% src/proxy/insert.go 87.0% src/vendor/github.com/xelabs/go-mysqlstack/sqlparser/ast.go 96.6%

codecov[bot] commented 3 years ago

Codecov Report

Merging #709 (f1529a0) into master (7637ccb) will decrease coverage by 0%. The diff coverage is 90%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master   #709   +/-   ##
=====================================
- Coverage      89%    89%   -1%     
=====================================
  Files         131    131           
  Lines        9284   9308   +24     
=====================================
+ Hits         8271   8286   +15     
- Misses        672    676    +4     
- Partials      341    346    +5     
Impacted Files Coverage Δ
src/proxy/insert.go 81% <77%> (-19%) :arrow_down:
src/planner/insert_plan.go 90% <91%> (-4%) :arrow_down:
src/router/compute.go 100% <100%> (ø)
src/router/global.go 83% <100%> (ø)
src/router/hash.go 98% <100%> (ø)
src/router/list.go 91% <100%> (ø)
src/router/router.go 86% <100%> (ø)
src/router/single.go 83% <100%> (ø)
src/backend/txn.go 86% <0%> (-2%) :arrow_down:
src/backend/connection.go 89% <0%> (+1%) :arrow_up:
... and 1 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 7637ccb...f1529a0. Read the comment docs.

BohuTANG commented 3 years ago

This feature is really cool, I need @andyli029 to review it first.

andyli029 commented 3 years ago

LGTM

BohuTANG commented 3 years ago

LGTM