code: func (s *SelectStatement) RewriteDistinct() {
  	WalkFunc(s.Fields, func(n Node) {
  		switch n := n.(type) {
  		case *Field:
  			if expr, ok := n.Expr.(*Distinct); ok {
  				n.Expr = expr.NewCall()
  				s.IsRawQuery = false
  			}
  		case *Call:
  			for i, arg := range n.Args {
  				if arg, ok := arg.(*Distinct); ok {
  					n.Args[i] = arg.NewCall()
  				}
  			}
  		}
  	})
  }
docs: // RewriteDistinct rewrites the expression to be a call for map/reduce to work correctly.
  // This method assumes all validation has passed.