cockroach
cockroach copied to clipboard
sql:Hoist project session flag and support session settings in opt tests
This commit adds the disable_hoist_projection_in_join_limitation session flag.
Release note: none
opttester: support session settings in opt tests
This commit adds the set opttest flag which can be used to set
session flags via "set=flagname=value".
Release note: none
@msirek it'd be ideal to get this PR and backports merged today so that the fixes can make it into the next 22.1 and 21.2 releases. The most pressing is the 21.2 backport.
Can the
setflag set multiple session settings for the same test? Might be good to document how to do that if the syntax is not obvious.
Yes. The syntax is the same as for other flags. These are space-separated flags, e.g.
opt expect=HoistProjectFromInnerJoin set=disable_hoist_projection_in_join_limitation=true set=prefer_lookup_joins_for_fks=true
Canceled.
pkg/sql/opt/testutils/opttester/opt_tester.go line 286 at r10 (raw file):
Previously, msirek (Mark Sirek) wrote…
OK, I picked the first option. I have seen reference cycles elsewhere. For example,
norm.Factory->funcs(norm.CustomFuncs) ->f(norm.Factory). Do you think we should open an issue to remove this and other reference cycles?
It's probably not necessary, just something to avoid to prevent if possible to avoid confusion. I don't feel to strongly about it. The norm.Factory norm.CustomFuncs case it required because they depend on each other - this case was different because Flags didn't depend on ot, only two fields within ot.
Canceled.
bors r+
bors r+
Already running a review
bors r+
Already running a review
bors r+
bors r+