Skip to content

Commit

Permalink
check if SelectExprs exists before using
Browse files Browse the repository at this point in the history
Signed-off-by: Andres Taylor <[email protected]>
  • Loading branch information
systay committed Feb 4, 2025
1 parent 940cba8 commit e03a830
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions go/vt/sqlparser/ast_funcs.go
Original file line number Diff line number Diff line change
Expand Up @@ -1273,6 +1273,9 @@ func (node *Select) IsDistinct() bool {

// GetColumnCount return SelectExprs count.
func (node *Select) GetColumnCount() int {
if node.SelectExprs == nil {
return 0
}
return len(node.SelectExprs.Exprs)
}

Expand Down

0 comments on commit e03a830

Please sign in to comment.