Skip to content

sqllogictest: import CockroachDB v23.1 logic tests#37459

Draft
def- wants to merge 5 commits into
MaterializeInc:mainfrom
def-:crdb-slt-v23-1-import
Draft

sqllogictest: import CockroachDB v23.1 logic tests#37459
def- wants to merge 5 commits into
MaterializeInc:mainfrom
def-:crdb-slt-v23-1-import

Conversation

@def-

@def- def- commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

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.

def- and others added 5 commits July 6, 2026 13:49
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant