Example #1
0
func (e *Evaluator) compareSubquery(cs *ast.CompareSubqueryExpr) bool {
	lv := *cs.L.GetDatum()
	if lv.IsNull() {
		cs.SetNull()
		return true
	}
	x, err := e.checkResult(cs, lv, cs.R.GetDatum().GetRow())
	if err != nil {
		e.err = errors.Trace(err)
		return false
	}
	cs.SetDatum(x)
	return true
}
Example #2
0
func (e *Evaluator) compareSubquery(cs *ast.CompareSubqueryExpr) bool {
	lv := cs.L.GetValue()
	if lv == nil {
		cs.SetValue(nil)
		return true
	}
	x, err := e.checkResult(cs, lv, cs.R.GetValue().([]interface{}))
	if err != nil {
		e.err = errors.Trace(err)
		return false
	}
	cs.SetValue(x)
	return true
}