Commit 4ee72a16 authored by Radu Berinde's avatar Radu Berinde

sqlsmith: use volatility in sqlsmith check

Update the impure check in sqlsmith to check the Volatility. We want only
immutable functions so the results of any given query are consistent across

Release note: None
parent 5725ea04
......@@ -341,7 +341,7 @@ func makeFunc(s *Smither, ctx Context, typ *types.T, refs colRefs) (tree.TypedEx
return nil, false
fn := fns[s.rnd.Intn(len(fns))]
if s.disableImpureFns && fn.def.Impure {
if s.disableImpureFns && fn.overload.Volatility > tree.VolatilityImmutable {
return nil, false
for _, ignore := range s.ignoreFNs {
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment