sqllogictest: import CockroachDB v23.1 logic tests#37459
Draft
def- wants to merge 5 commits into
Draft
Conversation
CockroachDB v23.1's BSL Change Date (2026-04-01) has passed, converting it to Apache 2.0, so its logic tests are importable again for the first time since the 2019 BSL relicensing. Import the 159 new files that are not CockroachDB-internal, triaged with halt gates at the first point of divergence. Teach the sqllogictest parser the 2023-era dialect (let, skip_on_retry, statement notice, noticetrace/retry query options, type char F, queries without a ---- separator) and the runner to execute multi-command records one command at a time, treat SET/RESET of unknown parameters as a no-op, and retry unparseable CREATE TABLEs with CockroachDB's inline INDEX/FAMILY items stripped. Type/value formatting mismatches, invalid expected-error regexes, and multi-statement query records now fail the record instead of aborting the whole run. The new files run in the nightly cockroach/*.slt glob automatically and are added to the fast-tests list explicitly. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Replace the whole-file halt gate with per-record `onlyif cockroach` skips in the 13 imported files where most records already pass: create_index, distinct, group_join, hash_join, inner-join, merge_join, notice, overflow, propagate_input_ordering, reset, show_indexes, storing, and tuple_local. Files where more than half of the records diverge keep their halt gate. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Replace 44 of the 92 files shared with upstream by their CockroachDB v23.1.0 versions, regenerating expected output with --rewrite-results and disabling still-diverging records with `onlyif cockroach`. The other 48 files diverge too much to refresh profitably and keep their curated 2019-era content. Twelve files that had been failing for years pass again after the refresh (float, json, lookup_join, no_primary_key, postgresjoin, select, select_index, suboperators, target_names, typing, views, zero), so re-enable them in the fast-tests list. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Turn `user <name>` into a record that switches the connection all subsequent records run on, creating the role on first use and mapping CockroachDB's `root` to the default materialize user. Reset the active user per file, and drop test-created roles in the per-file reset so role state cannot leak across files or shards. This unlocks the RBAC and privilege files imported from CockroachDB v23.1, whose records previously all ran as the superuser. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
With the user directive active, re-derive every imported and shared CockroachDB file from upstream v23.1, regenerating expected output with --rewrite-results and disabling still-diverging records in place. 165 of 251 files are now direct v23.1 derivations, including the RBAC and privilege families that previously halted at their first record. Files that diverge too heavily keep their previous content, with records that changed behavior under the now-active user directive disabled. Twelve more previously-failing files pass and are re-enabled in the fast-tests list. Passing records across the suite go from 3050 to 5656. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
CockroachDB v23.1's BSL Change Date (2026-04-01) has passed, converting it to Apache 2.0, so its logic tests are importable again for the first time since the 2019 BSL relicensing. Import the 159 new files that are not CockroachDB-internal, triaged with halt gates at the first point of divergence.
Teach the sqllogictest parser the 2023-era dialect (let, skip_on_retry, statement notice, noticetrace/retry query options, type char F, queries without a ---- separator) and the runner to execute multi-command records one command at a time, treat SET/RESET of unknown parameters as a no-op, and retry unparseable CREATE TABLEs with CockroachDB's inline INDEX/FAMILY items stripped. Type/value formatting mismatches, invalid expected-error regexes, and multi-statement query records now fail the record instead of aborting the whole run.