Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
b9920ec
sql parse done
gouhongshen Aug 29, 2025
d51c73a
update bvt
gouhongshen Aug 29, 2025
06cdebe
next version should be 3.1.0
gouhongshen Aug 29, 2025
9c6cad4
fix bvt
gouhongshen Aug 29, 2025
ef89d79
data branch create table done
gouhongshen Sep 2, 2025
19be7b3
rebase main
gouhongshen Oct 9, 2025
fec925f
snapshot diff can collect the changes
gouhongshen Oct 10, 2025
abf3b66
snapshot diff can do simple diff
gouhongshen Oct 12, 2025
cd9846c
snapshot diff can handle tombstone
gouhongshen Oct 13, 2025
d6e9065
debug table commit ts
gouhongshen Oct 14, 2025
044d98f
standalone diff done
gouhongshen Oct 15, 2025
7e9bddb
fix 1
gouhongshen Oct 15, 2025
45495a3
snapshot diff done
gouhongshen Oct 16, 2025
1b3be47
snapshot merge basic ok
gouhongshen Oct 16, 2025
21a3006
snapshot merge done
gouhongshen Oct 16, 2025
d2672e8
snapshot merge has bug
gouhongshen Oct 16, 2025
18afefc
snapshot merge has bug
gouhongshen Oct 16, 2025
ac0eb56
data branch diff/merge avalible
gouhongshen Oct 17, 2025
b5c6736
opt
gouhongshen Oct 17, 2025
6efc445
opt
gouhongshen Oct 19, 2025
38cc403
fix no pk, duplicate rows
gouhongshen Oct 19, 2025
c668ad6
fix sca
gouhongshen Oct 19, 2025
880d044
fix bvt
gouhongshen Oct 19, 2025
aa5248b
fix bvt
gouhongshen Oct 20, 2025
7d16347
fix bvt
gouhongshen Oct 20, 2025
568d722
log time spent
gouhongshen Oct 20, 2025
9a7b5ad
fix
gouhongshen Oct 20, 2025
358b110
fix
gouhongshen Oct 21, 2025
9a7a9e4
fix
gouhongshen Oct 21, 2025
0b7c2f2
fix
gouhongshen Oct 21, 2025
1799295
fix
gouhongshen Oct 21, 2025
b0f1acd
adding log
gouhongshen Oct 22, 2025
caab994
adding log
gouhongshen Oct 22, 2025
23370ed
test one, including the prev commit
gouhongshen Oct 22, 2025
5f3381b
can do the experiments
LeftHandCold Oct 23, 2025
76005a3
adding diff output option and fix sca
gouhongshen Oct 24, 2025
8d2914b
update parallel setup
gouhongshen Oct 24, 2025
34a7aea
update
gouhongshen Oct 24, 2025
47962f7
reuse code
gouhongshen Oct 27, 2025
666672e
update
gouhongshen Oct 28, 2025
359f10c
fix ut, bvt
gouhongshen Oct 28, 2025
7f72376
fix sca
gouhongshen Oct 28, 2025
bf66bf8
fix sca && bvt
gouhongshen Oct 28, 2025
a1451d6
adding coverage
gouhongshen Oct 28, 2025
d1d8643
fix ut, sca
gouhongshen Oct 29, 2025
057bf8a
Merge branch 'main' into mo_branch
gouhongshen Oct 29, 2025
1768e49
Merge branch 'main' into mo_branch
gouhongshen Oct 29, 2025
2c9ed61
Merge branch 'main' into mo_branch
gouhongshen Oct 30, 2025
647420f
Merge branch 'main' into mo_branch
mergify[bot] Oct 30, 2025
933dda0
Merge branch 'main' into mo_branch
gouhongshen Oct 30, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions cgo/lib.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@ package cgo

/*
#cgo CFLAGS: -O3 -std=c99
#cgo LDFLAGS: -lm
*/
import "C"
13 changes: 13 additions & 0 deletions pkg/bootstrap/versions/v4_0_0/cluster_upgrade_list.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,14 @@ package v4_0_0
import (
"github.com/matrixorigin/matrixone/pkg/bootstrap/versions"
"github.com/matrixorigin/matrixone/pkg/catalog"
"github.com/matrixorigin/matrixone/pkg/frontend"
"github.com/matrixorigin/matrixone/pkg/predefine"
"github.com/matrixorigin/matrixone/pkg/util/executor"
)

var clusterUpgEntries = []versions.UpgradeEntry{
upg_mo_iscp_task,
upg_create_mo_branch_metadata,
}

var upg_mo_iscp_task = versions.UpgradeEntry{
Expand All @@ -35,3 +37,14 @@ var upg_mo_iscp_task = versions.UpgradeEntry{
return ok, err
},
}

var upg_create_mo_branch_metadata = versions.UpgradeEntry{
Schema: catalog.MO_CATALOG,
TableName: catalog.MO_BRANCH_METADATA,
UpgType: versions.CREATE_NEW_TABLE,
UpgSql: frontend.MoCatalogBranchMetadataDDL,
CheckFunc: func(txn executor.TxnExecutor, accountId uint32) (bool, error) {
exist, err := versions.CheckTableDefinition(txn, accountId, catalog.MO_CATALOG, catalog.MO_BRANCH_METADATA)
return exist, err
},
}
2 changes: 2 additions & 0 deletions pkg/catalog/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,8 @@ const (

MO_ISCP_LOG = "mo_iscp_log"
MO_STORED_PROCEDURE = "mo_stored_procedure"

MO_BRANCH_METADATA = "mo_branch_metadata"
)

func IsSystemTable(id uint64) bool {
Expand Down
4 changes: 3 additions & 1 deletion pkg/common/const.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@

package common

import "fmt"
import (
"fmt"
)

const (
KiB = 1024
Expand Down
101 changes: 101 additions & 0 deletions pkg/container/types/encoding.go
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,107 @@ func DecodeValue(val []byte, t T) any {
}
}

func CompareValues(left, right any, t T) int {
switch t {
case T_bool:
lVal := left.(bool)
rVal := right.(bool)

if lVal && !rVal {
return 1
} else if !lVal && rVal {
return -1
} else {
return 0
}
case T_int8:
lVal := left.(int8)
rVal := right.(int8)
return int(lVal - rVal)
case T_int16:
lVal := left.(int16)
rVal := right.(int16)
return int(lVal - rVal)
case T_int32:
lVal := left.(int32)
rVal := right.(int32)
return int(lVal - rVal)
case T_int64:
lVal := left.(int64)
rVal := right.(int64)
return int(lVal - rVal)
case T_uint8:
lVal := left.(uint8)
rVal := right.(uint8)
return int(lVal - rVal)
case T_uint16:
lVal := left.(uint16)
rVal := right.(uint16)
return int(lVal - rVal)
case T_uint32:
lVal := left.(uint32)
rVal := right.(uint32)
return int(lVal - rVal)
case T_uint64:
lVal := left.(uint64)
rVal := right.(uint64)
return int(lVal - rVal)
case T_float32:
lVal := left.(float32)
rVal := right.(float32)
return int(lVal - rVal)
case T_float64:
lVal := left.(float64)
rVal := right.(float64)
return int(lVal - rVal)
case T_decimal64:
lVal := left.(Decimal64)
rVal := right.(Decimal64)
return lVal.Compare(rVal)
case T_decimal128:
lVal := left.(Decimal128)
rVal := right.(Decimal128)
return lVal.Compare(rVal)
case T_date:
lVal := left.(Date)
rVal := right.(Date)
return int(lVal - rVal)
case T_time:
lVal := left.(Time)
rVal := right.(Time)
return int(lVal - rVal)
case T_timestamp:
lVal := left.(Timestamp)
rVal := right.(Timestamp)
return int(lVal - rVal)
case T_datetime:
lVal := left.(Datetime)
rVal := right.(Datetime)
return int(lVal - rVal)
case T_uuid:
lVal := left.(Uuid)
rVal := right.(Uuid)
return lVal.Compare(rVal)
case T_TS:
lVal := left.(TS)
rVal := right.(TS)
return lVal.Compare(&rVal)
case T_Rowid:
lVal := left.(Rowid)
rVal := right.(Rowid)
return lVal.Compare(&rVal)
case T_char, T_varchar, T_blob, T_json, T_text, T_binary, T_varbinary,
T_array_float32, T_array_float64, T_datalink:
return bytes.Compare(left.([]byte), right.([]byte))
case T_enum:
lVal := left.(Enum)
rVal := right.(Enum)
return int(lVal - rVal)
default:
panic(fmt.Sprintf("CompareValues unsupported type %v", t))
}
}

func EncodeValue(val any, t T) []byte {
switch t {
case T_bool:
Expand Down
Loading
Loading