cockroachdb / cockroachdb/cockroach
sql/tests: [expected equivalence dependants to be its closure] in TestRandomSyntaxSQLSmith
- Dominant language
- Go
- Stars
- 32.5k
- Forks
- 4.1k
- PR merge metrics
- PR metrics pending
Description
sql/tests.TestRandomSyntaxSQLSmith [failed](https://teamcity.cockroachdb.com/buildConfiguration/Cockroach_Nightlies_RandomSyntaxTestsBazel/13935500?buildTab=log) with [artifacts](https://teamcity.cockroachdb.com/buildConfiguration/Cockroach_Nightlies_RandomSyntaxTestsBazel/13935500?buildTab=artifacts#/) on release-23.1 @ [9b3c1cabbcbfb491d33b6ea8943c0762a17892b6](https://github.com/cockroachdb/cockroach/commits/9b3c1cabbcbfb491d33b6ea8943c0762a17892b6):
Random syntax error:
```
rsg_test.go:913: Crash detected: server panic: pq: internal error: expected equivalence dependants to be its closure: ()-->(15), (9)==(2,3,10), (2)==(3,9,10), (3)==(2,9,10), (10)==(2,3,9), (1)==(20), (20)==(1), (1-3)-->(4), (2)==(3), (3)==(2) (8)
```
Query:
```
SELECT
'2001-01-11 11:06:30.00052':::TIMESTAMP AS "coL%v6319",
NULL AS "😳c🙃o'l6320",
1463163579:::INT8 AS col6321,
e'\x16y\t8':::STRING AS col6322,
tab2867._float4 AS col6323
FROM
defaultdb.public."_tabl e2"@"_tabl e2_col2_0_col2_1_idx" AS "ta|%qb2866"
JOIN defaultdb.public.seed@seed__int8__float8__date_idx AS tab2867 ON
("ta|%qb2866".crdb_internal_mvcc_timestamp) = (tab2867.crdb_internal_mvcc_timestamp)
AND ("ta|%qb2866".col2_1) = (tab2867._float4)
AND ("ta|%qb2866".col2_1) = (tab2867._float8)
AND ("ta|%qb2866".col2_0) = (tab2867._inet)
AND ("ta|%qb2866".col2_2) = (tab2867._float8),
defaultdb.public."_tabl e2"@"_tabl e2_col2_0_col2_1_idx" AS tab2870
JOIN defaultdb.public."_tabl e2"@"_tabl e2_col2_0_col2_2_col2_1_key" AS t😞ab2871 ON
(tab2870.col2_2) = (t😞ab2871.col2_2)
WHERE
tab2867._bool
LIMIT
2:::INT8;
```
Schema:
```
rsg_test.go:721: To reproduce, use schema:
rsg_test.go:723: SET sql_safe_updates = false;;
rsg_test.go:723: SET CLUSTER SETTING sql.stats.automatic_collection.enabled = false;;
rsg_test.go:723: SET CLUSTER SETTING sql.stats.histogram_collection.enabled = false;;
rsg_test.go:723: CREATE TABLE table1 (col1_0 STRING NOT NULL, "col\g1_1" OID NOT NULL, col1_2 TIMESTAMP[] NOT NULL, "col'1_3" STRING COLLATE da_DK NOT NULL, col1_4 UUID NOT NULL, "co l\\x911_5" "char" NOT NULL, col1_6 TIMESTAMPTZ NULL, "co😓l1_%v7" TIMETZ NOT NULL, "col1_ 8" REGCLASS NULL, col1_9 STRING NOT NULL AS (lower("co l\\x911_5")) STORED, col1_10 STRING NULL AS (lower(CAST("col\g1_1" AS STRING))) STORED, "c%4bol1_%p11" STRING NOT NULL AS (lower(col1_0)) STORED, """col1_12" STRING NOT NULL AS (lower(col1_0)) VIRTUAL, col1_13 STRING NOT NULL AS (lower(CAST("co😓l1_%v7" AS STRING))) VIRTUAL, "c%q😒ol1_14" STRING NOT NULL AS (lower(CAST(col1_4 AS STRING))) STORED, col1_15 STRING NOT NULL AS (lower("co l\\x911_5")) STORED, "cOl1_16" STRING NOT NULL AS (lower(CAST("co😓l1_%v7" AS STRING))) STORED, PRIMARY KEY ("c%4bol1_%p11" ASC, "co l\\x911_5" DESC, col1_2 DESC, col1_0 DESC, "col\g1_1" ASC), INDEX (col1_2, "co l\\x911_5" ASC, col1_15 ASC, col1_9 ASC, """col1_12" DESC, col1_13 ASC, "c%q😒ol1_14", col1_0 DESC, col1_4 DESC, "c%4bol1_%p11" DESC, "col1_ 8" DESC, "cOl1_16" DESC, "col\g1_1" DESC, col1_10 ASC, "col'1_3", col1_6 ASC, "co😓l1_%v7" DESC), INDEX (lower(CAST("col'1_3" AS STRING)) DESC, col1_13 DESC, col1_15 ASC, col1_9, "cOl1_16", "co l\\x911_5", "c%q😒ol1_14" ASC, "co😓l1_%v7", col1_4 DESC, "col1_ 8" ASC, lower("co l\\x911_5"), "c%4bol1_%p11", "col\g1_1", lower(CAST("col\g1_1" AS STRING)) ASC, """col1_12", (CASE WHEN col1_6 IS NULL THEN e'\nRS\x1b\x0b':::STRING ELSE e'J\x1enzqW':::STRING END) DESC) NOT VISIBLE);
rsg_test.go:723: CREATE TABLE "_tabl e2" (col2_0 INET NOT NULL, col2_1 FLOAT8 NOT NULL, col2_2 FLOAT8 NOT NULL AS (col2_1 + 0.0:::FLOAT8) VIRTUAL, PRIMARY KEY (col2_2, col2_1, col2_0 ASC), UNIQUE (col2_0 DESC, col2_2 ASC, col2_1 ASC), INDEX (col2_0, col2_1 ASC));
rsg_test.go:723: CREATE TABLE table3 ("col 3_}0" TSVECTOR);
rsg_test.go:723: CREATE TABLE table4 (col4_0 FLOAT8 NOT NULL, col4_1 VARCHAR, col4_2 DATE NOT NULL, "c\\xf2ol4_3" TIMESTAMPTZ NULL, c😇ol4_4 TIMESTAMP NOT NULL, "
col4_5" VARCHAR NULL, col4_6 FLOAT4 NOT NULL, c̚ol4_7 REGROLE NOT NULL, col4_8 INT4 NOT NULL, col4_9 NAME NOT NULL, "c\\U000CA4B5ol4
_10" BOOL[] NOT NULL, col4_11 TIME NOT NULL, col4_12 BIT(34), col4_13 REGCLASS, "c ol4😴_14" FLOAT4 NOT NULL, col4_15 INT8 NOT NULL, col4_16 FLOAT8 NOT NULL AS (col4_0 + 0.5555521036113414:::FLOAT8) VIRTUAL, col4_17 STRING NOT NULL AS (CASE WHEN c😇ol4_4 IS NULL THEN '':::STRING ELSE 'X- 0.0:::FLOAT8)) AND (table4.col4_15 < 32767:::INT8)) AND (table4."
col4_5" >= 'X':::STRING)) OR (table4."c\\xf2ol4_3" > '4714-11-24 00:00:00+00 BC':::TIMESTAMPTZ)) OR (table4.col4_2 >= '-infinity':::DATE)) AND (table4.col4_0 != '-Inf':::FLOAT8)) OR (table4.col4_8 > 0:::INT8)) AND (table4.col4_1 != '':::STRING)) AND (table4.c😇ol4_4 > '3000-01-01 00:00:00':::TIMESTAMP), INDEX ((col4_15 + col4_8) DESC) STORING (col4_1, "
col4_5") NOT VISIBLE, INDEX (col4_12 DESC, ((col4_0 + col4_6) + "c ol4😴_14") ASC), UNIQUE (col4_2 ASC, col4_0, c😇ol4_4 ASC, col4_9 DESC, col4_15, col4_12 ASC, "c\\U000CA4B5ol4
_10" DESC, col4_6 ASC, col4_11, col4_17, col4_13 DESC, col4_1 DESC, col4_8 ASC, (CASE WHEN c😇ol4_4 IS NULL THEN e'Ryq^\x16}n':::STRING ELSE e'}B\\!\fpL':::STRING END) ASC) WHERE (((((((((table4.col4_1 <= e'\x00':::STRING) OR (table4.c😇ol4_4 < '2001-01-01 00:00:00 BC':::TIMESTAMP)) AND (table4.col4_17 <= e'\U00002603':::STRING)) OR (table4.col4_0 >= 'NaN':::FLOAT8)) AND (table4.col4_15 > (-9223372036854775807):::INT8)) AND (table4.col4_11 != '24:00:00':::TIME)) OR (table4.col4_8 >= 1:::INT8)) OR (table4.col4_16 != 5e-324:::FLOAT8)) AND (table4.col4_2 != 'infinity':::DATE)) OR (table4."c\\xf2ol4_3" > '0001-01-01 00:00:00+00':::TIMESTAMPTZ), UNIQUE (col4_6, col4_15 DESC, col4_9, (CASE WHEN c😇ol4_4 IS NULL THEN '%^':::STRING ELSE '':::STRING END) DESC, c😇ol4_4 DESC, col4_12 ASC, col4_2 DESC, col4_0, col4_16 ASC, col4_13 ASC, col4_17, (CASE WHEN col4_2 IS NULL THEN e'bPV(YuX\x14,':::STRING ELSE e'\U00002603':::STRING END), col4_1 ASC, "
col4_5", "c\\U000CA4B5ol4
_10" ASC, "c\\xf2ol4_3" DESC, col4_8 ASC, "c ol4😴_14" ASC) WHERE (((((((((((((table4.col4_2 > '1970-01-01':::DATE) OR (table4.col4_11 = '24:00:00':::TIME)) OR (table4."
col4_5" <= e'\'':::STRING)) OR (table4.col4_1 > '"':::STRING)) OR (table4.col4_8 >= (-1):::INT8)) AND (table4.col4_0 = '+Inf':::FLOAT8)) AND (table4.col4_15 > 32767:::INT8)) AND (table4.col4_6 < (-0.0):::FLOAT8)) OR (table4.col4_17 <= 'X':::STRING)) AND (table4."c\\xf2ol4_3" >= '0001-01-01 00:00:00+00':::TIMESTAMPTZ)) OR (table4.c😇ol4_4 != '294276-12-31 23:59:59.999999':::TIMESTAMP)) OR (table4.col4_9 < e'\U00002603':::STRING:::NAME)) AND (table4."c ol4😴_14" > 1.0:::FLOAT8)) AND (table4.col4_16 < 3.4028234663852886e+38:::FLOAT8), UNIQUE (col4_12 ASC, col4_0, col4_9 ASC, (CASE WHEN "c\\U000CA4B5ol4
_10" IS NULL THEN e'4\x05O':::STRING ELSE e'\'':::STRING END) DESC, "c\\U000CA4B5ol4
_10" ASC, col4_1 ASC, col4_2, c😇ol4_4, "
col4_5" DESC, (CASE WHEN col4_13 IS NULL THEN '':::STRING ELSE 'P1B':::STRING END) DESC), INVERTED INDEX (col4_16, col4_13 DESC, col4_12 DESC, col4_1 ASC, c😇ol4_4 ASC, "c\\U000CA4B5ol4
_10" ASC, col4_0, "
col4_5" gin_trgm_ops) WHERE ((((((((table4."c ol4😴_14" = 0.0:::FLOAT8) OR (table4.c😇ol4_4 = '294276-12-31 23:59:59.999999':::TIMESTAMP)) AND (table4.col4_0 = (-0.0):::FLOAT8)) AND (table4.col4_16 <= 1.7976931348623157e+308:::FLOAT8)) AND (table4.col4_9 = e'\U00002603':::STRING:::NAME)) AND (table4.col4_11 > '00:00:00':::TIME)) OR (table4.col4_8 < 32767:::INT8)) OR (table4.col4_1 < '':::STRING)) OR (table4.col4_15 <= (-9223372036854775807):::INT8), INDEX ("c\\U000CA4B5ol4
_10" DESC, c̚ol4_7 ASC, col4_0 ASC, col4_17 DESC, col4_2) STORING (col4_1, "c\\xf2ol4_3", "
col4_5", col4_8, col4_11, col4_13), FAMILY (col4_6), FAMILY (col4_9, c😇ol4_4), FAMILY ("c\\U000CA4B5ol4
_10", col4_1, col4_8), FAMILY (col4_11, col4_12), FAMILY ("c\\xf2ol4_3"), FAMILY (c̚ol4_7, col4_13), FAMILY (col4_15), FAMILY (col4_2), FAMILY ("
col4_5"), FAMILY (col4_0, "c ol4😴_14"), UNIQUE (col4_1));
rsg_test.go:723: ALTER TABLE table1 INJECT STATISTICS e'[{"avg_size": 30, "columns": ["col1_10"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 107902908, "histo_col_type": "", "name": "__auto__", "null_count": 421602939, "row_count": 2000000000}, {"avg_size": 0, "columns": ["\\"c%4bol1_%p11\\""], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 1562550092, "histo_buckets": [{"distinct_range": 0, "num_eq": 8000000000, "num_range": 0, "upper_bound": ""}, {"distinct_range": 90000000000, "num_eq": 6455834866753483756, "num_range": 90000000000, "upper_bound": "\\u000e\\u0006"}, {"distinct_range": 10000000000, "num_eq": 100, "num_range": 10000000000, "upper_bound": "\\u001bgm\\u0017c}qW"}, {"distinct_range": 0, "num_eq": 3000000000, "num_range": 500000, "upper_bound": "JR0\\u0014M"}, {"distinct_range": 3000, "num_eq": 0, "num_range": 3000, "upper_bound": "{=Mv-Y"}], "histo_col_type": "STRING", "name": "__auto__", "null_count": 0, "row_count": 2000000000}, {"avg_size": 0, "columns": ["\\"c%q\U0001F612ol1_14\\""], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 1909340003, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 2000000000}, {"avg_size": 16, "columns": ["\\"col\\\\g1_1\\""], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 1630784690, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 2000000000}, {"avg_size": 5, "columns": ["col1_2"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 1959257485, "histo_buckets": [{"distinct_range": 0, "num_eq": 8867192355877082010, "num_range": 0, "upper_bound": "ARRAY[\'0001-01-01 00:00:00\':::TIMESTAMP,\'1993-02-18 14:47:09.00021\':::TIMESTAMP,\'1986-01-18 04:49:23.000641\':::TIMESTAMP,\'1998-08-09 06:49:35.00009\':::TIMESTAMP,\'1995-04-27 09:48:30.000307\':::TIMESTAMP]"}, {"distinct_range": 6873022359146391000, "num_eq": 6000000000, "num_range": 6873022359146390762, "upper_bound": "ARRAY[\'1973-03-30 23:39:01.000942\':::TIMESTAMP,\'2002-12-02 04:38:31.000457\':::TIMESTAMP,\'1971-10-08 15:48:49.000926\':::TIMESTAMP,\'1983-10-02 20:09:22.000425\':::TIMESTAMP,\'2000-07-01 16:42:44.000922\':::TIMESTAMP,\'2017-03-25 10:51:56.000973\':::TIMESTAMP]"}, {"distinct_range": 2333953222976584700, "num_eq": 500000, "num_range": 8371245921217111888, "upper_bound": "ARRAY[\'1996-05-25 22:34:59.00028\':::TIMESTAMP,\'2005-03-11 16:51:06.000344\':::TIMESTAMP,\'1976-11-04 10:57:27.00028\':::TIMESTAMP,\'294276-12-31 23:59:59.999999\':::TIMESTAMP]"}, {"distinct_range": 0, "num_eq": 7654430597490594996, "num_range": 9000000, "upper_bound": "ARRAY[\'2008-02-19 15:44:27.000535\':::TIMESTAMP,\'4714-11-24 00:00:00 BC\':::TIMESTAMP]"}, {"distinct_range": 500, "num_eq": 800000, "num_range": 500, "upper_bound": "ARRAY[\'2014-02-27 22:56:27.000866\':::TIMESTAMP,\'1996-11-24 05:09:50.000945\':::TIMESTAMP,\'1972-05-18 03:29:15.000663\':::TIMESTAMP]"}, {"distinct_range": 7036314360759414000, "num_eq": 8489401611491742577, "num_range": 7036314360759413452, "upper_bound": "ARRAY[\'2021-12-18 20:12:28.000154\':::TIMESTAMP,\'2027-04-29 04:02:28.000871\':::TIMESTAMP,\'2006-05-28 16:51:42.000947\':::TIMESTAMP]"}, {"distinct_range": 7713735955107259000, "num_eq": 7000000000, "num_range": 7713735955107259705, "upper_bound": "ARRAY[\'2023-03-01 08:11:42.000752\':::TIMESTAMP,\'1982-06-21 17:46:01.000649\':::TIMESTAMP,\'1986-05-03 06:28:37.00017\':::TIMESTAMP]"}], "histo_col_type": "TIMESTAMP[]", "name": "__auto__", "null_count": 0, "row_count": 2000000000}, {"avg_size": 4, "columns": ["\\"col1_ 8\\""], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 346581595, "histo_col_type": "", "name": "__auto__", "null_count": 1133647210, "row_count": 2000000000}, {"avg_size": 6, "columns": ["\\"cOl1_16\\""], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 967755726, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 2000000000}, {"avg_size": 9, "columns": ["col1_9"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 1401040839, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 2000000000}, {"avg_size": 8, "columns": ["\\"\\"\\"col1_12\\""], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 396746505, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 2000000000}, {"avg_size": 30, "columns": ["col1_13"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 1925168036, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 2000000000}, {"avg_size": 26, "columns": ["col1_6"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 1824046506, "histo_col_type": "", "name": "__auto__", "null_count": 210793485, "row_count": 2000000000}, {"avg_size": 19, "columns": ["col1_15"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 1530857470, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 2000000000}, {"avg_size": 30, "columns": ["col1_0"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 1769252366, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 2000000000}, {"avg_size": 28, "columns": ["\\"col\'1_3\\""], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 64620241, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 2000000000}, {"avg_size": 2, "columns": ["col1_4"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 388274771, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 2000000000}, {"avg_size": 3, "columns": ["\\"co l\\\\\\\\x911_5\\""], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 948469677, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 2000000000}, {"avg_size": 13, "columns": ["\\"co\U0001F613l1_%v7\\""], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 24642527, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 2000000000}]':::JSONB;
rsg_test.go:723: ALTER TABLE "_tabl e2" INJECT STATISTICS '[{"avg_size": 7, "columns": ["col2_0"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 7, "histo_buckets": [{"distinct_range": 0, "num_eq": 6000000, "num_range": 0, "upper_bound": "237.134.241.112/1"}, {"distinct_range": 5.18889748926315, "num_eq": 5698241018319638135, "num_range": 1000, "upper_bound": "109.203.92.150/25"}, {"distinct_range": 0, "num_eq": 5166469890376790746, "num_range": 8866965230321289629, "upper_bound": "fa13:b9ed:e1a6:a1cb:d875:feda:6f10:4a28/11"}, {"distinct_range": 4000000, "num_eq": 4328746191348549188, "num_range": 4000000, "upper_bound": "387f:2d14:a431:7bab:4e1e:3d2f:eb78:77c4/36"}, {"distinct_range": 2163543070523636200, "num_eq": 1710385346018649950, "num_range": 7864710952909142552, "upper_bound": "8297:5b98:d5e3:c759:b778:f5f0:9edf:9fdb/86"}], "histo_col_type": "INET", "name": "__auto__", "null_count": 0, "row_count": 40}, {"avg_size": 6, "columns": ["col2_1"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 37, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 40}, {"avg_size": 7, "columns": ["col2_2"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 26, "histo_buckets": [{"distinct_range": 0, "num_eq": 2147950933553627387, "num_range": 0, "upper_bound": "-0.5189053547087927"}, {"distinct_range": 60000000, "num_eq": 800000, "num_range": 60000000, "upper_bound": "-0.4016450622474791"}, {"distinct_range": 666337751351700600, "num_eq": 6916120628638093407, "num_range": 3264119034826037850, "upper_bound": "-0.3580903687492766"}, {"distinct_range": 0, "num_eq": 4851499105291938095, "num_range": 400, "upper_bound": "5e-324"}, {"distinct_range": 2606997125500897300, "num_eq": 2445868712500036324, "num_range": 2606997125500897385, "upper_bound": "2.9034394643153165"}, {"distinct_range": 5186690.349301944, "num_eq": 30000000, "num_range": 30000000, "upper_bound": "+Inf"}], "histo_col_type": "FLOAT8", "name": "__auto__", "null_count": 0, "row_count": 40}]':::JSONB;
rsg_test.go:723: ALTER TABLE table3 INJECT STATISTICS e'[{"avg_size": 2, "columns": ["\\"col 3_}0\\""], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 5796958127727407713, "histo_col_type": "", "name": "__auto__", "null_count": 6546710514613508387, "row_count": 6904528250211787177}]':::JSONB;
rsg_test.go:723: ALTER TABLE table4 INJECT STATISTICS e'[{"avg_size": 4, "columns": ["col4_1"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 6720413446306317185, "histo_col_type": "", "name": "__auto__", "null_count": 5751628110208649451, "row_count": 7382626329323419679}, {"avg_size": 24, "columns": ["col4_6"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 1392043294079268153, "histo_buckets": [{"distinct_range": 0, "num_eq": 400, "num_range": 0, "upper_bound": "-1.7777099609375"}, {"distinct_range": 0, "num_eq": 5000000, "num_range": 7954351650563220454, "upper_bound": "-0.9689303040504456"}, {"distinct_range": 5416.567085630954, "num_eq": 80, "num_range": 6000, "upper_bound": "0.6137881278991699"}], "histo_col_type": "FLOAT4", "name": "__auto__", "null_count": 0, "row_count": 7382626329323419679}, {"avg_size": 8, "columns": ["c\u031Aol4_7"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 4355727798058891347, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 7382626329323419679}, {"avg_size": 14, "columns": ["col4_8"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 4933063710056678677, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 7382626329323419679}, {"avg_size": 8, "columns": ["col4_9"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 6930025825873464339, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 7382626329323419679}, {"avg_size": 31, "columns": ["col4_15"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 870848304450773077, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 7382626329323419679}, {"avg_size": 28, "columns": ["col4_0"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 2401080654781183436, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 7382626329323419679}, {"avg_size": 1, "columns": ["\\"\\rcol4_5\\""], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 424643663303083134, "histo_col_type": "", "name": "__auto__", "null_count": 4183386730919614453, "row_count": 7382626329323419679}, {"avg_size": 29, "columns": ["col4_13"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 5193224921094404345, "histo_col_type": "", "name": "__auto__", "null_count": 3975227845760651423, "row_count": 7382626329323419679}, {"avg_size": 22, "columns": ["\\"c ol4\U0001F634_14\\""], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 1900481602420651974, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 7382626329323419679}, {"avg_size": 23, "columns": ["col4_17"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 1315117587087712183, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 7382626329323419679}, {"avg_size": 18, "columns": ["col4_2"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 5880111294463210402, "histo_buckets": [{"distinct_range": 0, "num_eq": 1000, "num_range": 0, "upper_bound": "1976-08-18"}], "histo_col_type": "DATE", "name": "__auto__", "null_count": 0, "row_count": 7382626329323419679}, {"avg_size": 3, "columns": ["c\U0001F607ol4_4"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 4318431564299221106, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 7382626329323419679}, {"avg_size": 30, "columns": ["col4_11"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 3853624726135486938, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 7382626329323419679}, {"avg_size": 27, "columns": ["\\"c\\\\\\\\xf2ol4_3\\""], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 334446357346334325, "histo_col_type": "TIMESTAMPTZ", "name": "__auto__", "null_count": 3399702020640728252, "row_count": 7382626329323419679}, {"avg_size": 4, "columns": ["\\"c\\\\\\\\U000CA4B5ol4\\n_10\\""], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 3408281575967970124, "histo_buckets": [{"distinct_range": 0, "num_eq": 4199492180422847076, "num_range": 0, "upper_bound": "ARRAY[false]"}, {"distinct_range": 8838585632389695000, "num_eq": 70000, "num_range": 8838585632389695970, "upper_bound": "ARRAY[false,false]"}, {"distinct_range": 8000000, "num_eq": 5000000000, "num_range": 8000000, "upper_bound": "ARRAY[false,false,true,false,false,false]"}, {"distinct_range": 8476558809978907000, "num_eq": 60000000, "num_range": 8476558809978906770, "upper_bound": "ARRAY[true,false]"}, {"distinct_range": 0, "num_eq": 657173553632931587, "num_range": 20000000000, "upper_bound": "ARRAY[true,false,false,false,false]"}, {"distinct_range": 0, "num_eq": 770114750343734635, "num_range": 2550864100275368653, "upper_bound": "ARRAY[true,true,true]"}], "histo_col_type": "BOOL[]", "name": "__auto__", "null_count": 0, "row_count": 7382626329323419679}, {"avg_size": 2, "columns": ["col4_12"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 7378061754603486624, "histo_col_type": "BIT(34)", "name": "__auto__", "null_count": 3686147223101472750, "row_count": 7382626329323419679}, {"avg_size": 14, "columns": ["col4_16"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 3719532406071198446, "histo_buckets": [{"distinct_range": 0, "num_eq": 8020412920004808197, "num_range": 0, "upper_bound": "-1.9237473518676935"}, {"distinct_range": 3036820615323389400, "num_eq": 10000, "num_range": 5714458868706351472, "upper_bound": "-0.33387932998067105"}, {"distinct_range": 0, "num_eq": 6555200739843911162, "num_range": 3000, "upper_bound": "0.7551965425523941"}], "histo_col_type": "FLOAT8", "name": "__auto__", "null_count": 0, "row_count": 7382626329323419679}]':::JSONB;
rsg_test.go:723: ALTER TABLE table1 ADD FOREIGN KEY ("co l\\x911_5") REFERENCES table4 (col4_1);
rsg_test.go:723: CREATE TYPE rand_typ_0 AS ENUM ('bzjhvz', 'jhw', 'aj', 'cqmdd', 'o');
rsg_test.go:723: CREATE TYPE rand_typ_1 AS ENUM ('atuu', 'qwtixr', 'sh', 'dsmt', 'z');
rsg_test.go:723: CREATE TYPE rand_typ_2 AS ENUM ('tefstx', 'rdco', 'b', 'mbzrp');
rsg_test.go:723: SET sql_safe_updates = false;;
rsg_test.go:723:
BEGIN; CREATE TYPE greeting AS ENUM ('hello', 'howdy', 'hi', 'good day', 'morning'); COMMIT;
BEGIN;
CREATE TABLE IF NOT EXISTS seed AS
SELECT
g::INT2 AS _int2,
g::INT4 AS _int4,
g::INT8 AS _int8,
g::FLOAT4 AS _float4,
g::FLOAT8 AS _float8,
'2001-01-01'::DATE + g AS _date,
'2001-01-01'::TIMESTAMP + g * '1 day'::INTERVAL AS _timestamp,
'2001-01-01'::TIMESTAMPTZ + g * '1 day'::INTERVAL AS _timestamptz,
g * '1 day'::INTERVAL AS _interval,
g % 2 = 1 AS _bool,
g::DECIMAL AS _decimal,
g::STRING AS _string,
g::STRING::BYTES AS _bytes,
substring('00000000-0000-0000-0000-' || g::STRING || '00000000000', 1, 36)::UUID AS _uuid,
'0.0.0.0'::INET + g AS _inet,
g::STRING::JSONB AS _jsonb,
enum_range('hello'::greeting)[g] as _enum
FROM
generate_series(1, 5) AS g;
COMMIT;
INSERT INTO seed DEFAULT VALUES;
CREATE INDEX on seed (_int8, _float8, _date);
CREATE INVERTED INDEX on seed (_jsonb);
;
rsg_test.go:725:
rsg_test.go:726: -- test log scope end --
test logs left over in: /artifacts/tmp/_tmp/d437d2c847dfedbc4972f231c3331c8e/logTestRandomSyntaxSQLSmith2003144401
--- FAIL: TestRandomSyntaxSQLSmith (369.00s)
```
Help
See also: [How To Investigate a Go Test Failure \(internal\)](https://cockroachlabs.atlassian.net/l/c/HgfXfJgM)
/cc @cockroachdb/sql-foundations
[This test on roachdash](https://roachdash.crdb.dev/?filter=status:open%20t:.*TestRandomSyntaxSQLSmith.*&sort=title+created&display=lastcommented+project) | [Improve this report!](https://github.com/cockroachdb/cockroach/tree/master/pkg/cmd/internal/issues)
Jira issue: CRDB-35997
Contributor guide
Assessment
This issue has not been assessed yet.