sql: add randomized test for plan-gist logic
This commit adds a randomized test for plan-gist logic. It utilizes sqlsmith to generate random stmts, then runs EXPLAIN (GIST) for it to retrieve the gist followed by decoding that gist, and ensures that no internal errors occur. All generated stmts are also executed with a short timeout to allow for DB state to evolve. Additionally, all gists are accumulated and decoded against an empty DB.
The test is placed in the ccl package to exercise features gated behind CCL license.
The test quickly discovered bug fixed in 1315dda2d60f6064ff112c4d169cfdb8a1ce224c (when the corresponding fix is reverted) but haven't found anything new for plan-gist logic (but did hit a few issues elsewhere which are currently ignored in the test).
Fixes: #117634.
Release note: None
Actually, hold off on reviewing this - it seems like this test is uncovering some issues (not directly related to plan gist though).
It's RFAL.
Friendly ping @mgartner
Thanks for the review!
bors r+
bors r-
Canceled.
Looks like you need to dev gen bazel, please check the CI results before bors'ing.
Indeed, my bad.
bors r+