code: func ExtractCorColumns(expr Expression) (cols []*CorrelatedColumn) {
  	switch v := expr.(type) {
  	case *CorrelatedColumn:
  		return []*CorrelatedColumn{v}
  	case *ScalarFunction:
  		for _, arg := range v.GetArgs() {
  			cols = append(cols, ExtractCorColumns(arg)...)
  		}
  	}
  	return
  }
docs: // ExtractCorColumns extracts correlated column from given expression.