Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
GMHDBJD committed Feb 21, 2024
1 parent 42a5664 commit 919075f
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions pkg/sqlmodel/multirow.go
Original file line number Diff line number Diff line change
Expand Up @@ -178,10 +178,11 @@ func GenUpdateSQL(changes ...*RowChange) (string, []any) {
var skipColIdx []int
for i, col := range first.sourceTableInfo.Columns {
if _, ok := targetGeneratedColSet[col.Name.L]; ok {
// non cdc visible column's value won't be in `RowChange`
if model.IsColCDCVisible(col) {
skipColIdx = append(skipColIdx, i)
}
skipColIdx = append(skipColIdx, i)
//// non cdc visible column's value won't be in `RowChange`
//if model.IsColCDCVisible(col) {
// skipColIdx = append(skipColIdx, i)
//}
continue
}
assignValueColumnCount++
Expand Down Expand Up @@ -254,10 +255,11 @@ func GenInsertSQL(tp DMLType, changes ...*RowChange) (string, []interface{}) {
generatedColumns := generatedColumnsNameSet(first.targetTableInfo.Columns)
for i, col := range first.sourceTableInfo.Columns {
if _, ok := generatedColumns[col.Name.L]; ok {
// non cdc visible column's value won't be in `RowChange`
if model.IsColCDCVisible(col) {
skipColIdx = append(skipColIdx, i)
}
skipColIdx = append(skipColIdx, i)
//// non cdc visible column's value won't be in `RowChange`
//if model.IsColCDCVisible(col) {
// skipColIdx = append(skipColIdx, i)
//}
continue
}

Expand Down

0 comments on commit 919075f

Please sign in to comment.