Skip to content

Commit

Permalink
Nitty nit
Browse files Browse the repository at this point in the history
Signed-off-by: Matt Lord <mattalord@gmail.com>
  • Loading branch information
mattlord committed Sep 10, 2023
1 parent 75cba90 commit 1842c99
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion go/vt/sqlparser/parsed_query.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ func (pq *ParsedQuery) AppendFromRow(buf *bytes2.Buffer, fields []*querypb.Field
case querypb.Type_JSON:
if col.length < 0 { // An SQL NULL and not an actual JSON value
buf.WriteString(sqltypes.NullStr)
} else { // A JSON value (which may be an JSON null literal value)
} else { // A JSON value (which may be a JSON null literal value)
buf2 := row.Values[col.offset : col.offset+col.length]
vv, err := vjson.MarshalSQLValue(buf2)
if err != nil {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ func (tp *TablePlan) applyChange(rowChange *binlogdatapb.RowChange, executor fun
if field.Type == querypb.Type_JSON {
if vals[i].IsNull() { // An SQL NULL and not an actual JSON value
newVal = &sqltypes.NULL
} else { // A JSON value (which may be an JSON null literal value)
} else { // A JSON value (which may be a JSON null literal value)
newVal, err = vjson.MarshalSQLValue(vals[i].Raw())
if err != nil {
return nil, err
Expand Down

0 comments on commit 1842c99

Please sign in to comment.