code: func GetUint64FromConstant(expr Expression) (uint64, bool, bool) {
  	con, ok := expr.(*Constant)
  	if !ok {
  		logutil.Logger(context.Background()).Warn("not a constant expression", zap.String("expression", expr.ExplainInfo()))
  		return 0, false, false
  	}
  	dt := con.Value
  	if con.DeferredExpr != nil {
  		var err error
  		dt, err = con.DeferredExpr.Eval(chunk.Row{})
  		if err != nil {
  			logutil.Logger(context.Background()).Warn("eval deferred expr failed", zap.Error(err))
  			return 0, false, false
  		}
  	}
  	switch dt.Kind() {
  	case types.KindNull:
  		return 0, true, true
  	case types.KindInt64:
  		val := dt.GetInt64()
  		if val < 0 {
  			return 0, false, false
  		}
  		return uint64(val), false, true
  	case types.KindUint64:
  		return dt.GetUint64(), false, true
  	}
  	return 0, false, false
  }
docs: // GetUint64FromConstant gets a uint64 from constant expression.