Skip to content

Commit

Permalink
fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
James Cor committed Jan 14, 2024
1 parent d1a25ef commit 026d13a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion go/vt/sqlparser/ast.go
Original file line number Diff line number Diff line change
Expand Up @@ -5929,7 +5929,11 @@ type CharExpr struct {

// Format formats the node.
func (node *CharExpr) Format(buf *TrackedBuffer) {
buf.Myprintf("char(%v using %s)", node.Exprs, node.Type)
if node.Type == "" {
buf.Myprintf("CHAR(%v)", node.Exprs)
return
}
buf.Myprintf("CHAR(%v USING %s)", node.Exprs, node.Type)
}

func (node *CharExpr) walkSubtree(visit Visit) error {
Expand Down

0 comments on commit 026d13a

Please sign in to comment.