diff --git a/pkg/sql/sem/tree/pretty.go b/pkg/sql/sem/tree/pretty.go index 41e44dd0ad1c..2609877d4c3e 100644 --- a/pkg/sql/sem/tree/pretty.go +++ b/pkg/sql/sem/tree/pretty.go @@ -1037,7 +1037,7 @@ func (node *CreateTable) doc(p *PrettyCfg) pretty.Doc { d = p.nestUnder( pretty.Concat( d, - pretty.Text(" AS"), + pretty.Text("AS"), ), p.Doc(node.AsSource), ) @@ -1121,3 +1121,18 @@ func (node *IfErrExpr) doc(p *PrettyCfg) pretty.Doc { } return pretty.Bracket(s, pretty.Join(",", d...), ")") } + +func (node *IfExpr) doc(p *PrettyCfg) pretty.Doc { + return pretty.Bracket("IF(", pretty.Join(",", + p.Doc(node.Cond), + p.Doc(node.True), + p.Doc(node.Else), + ), ")") +} + +func (node *NullIfExpr) doc(p *PrettyCfg) pretty.Doc { + return pretty.Bracket("NULLIF(", pretty.Join(",", + p.Doc(node.Expr1), + p.Doc(node.Expr2), + ), ")") +}