Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sql/tests: TestRandomSyntaxSQLSmith failed [lookup join with no lookup columns] #122733

Open
cockroach-teamcity opened this issue Apr 20, 2024 · 0 comments
Labels
branch-master Failures on the master branch. C-test-failure Broken test (automatically or manually discovered). O-robot Originated from a bot. P-2 Issues/test failures with a fix SLA of 3 months T-sql-queries SQL Queries Team
Milestone

Comments

@cockroach-teamcity
Copy link
Member

cockroach-teamcity commented Apr 20, 2024

sql/tests.TestRandomSyntaxSQLSmith failed with artifacts on master @ c4ab095c4f65b9140661ed57adddc690b1e3ce3f:

Random syntax error:

    rsg_test.go:909: Crash detected: server panic: pq: internal error: lookup join with no lookup columns

Query:

        SELECT
        	e'\x11\x13?':::STRING AS "c%pol_1053539",
        	0:::OID AS col_1053540,
        	'()9:U':::STRING:::NAME AS "%pCOl_1053541",
        	e'w\x17\x04\t7+':::STRING:::NAME AS "co
        l_1053542",
        	"\ntab_469140".col4_3 AS col_1053543
        FROM
        	(
        		SELECT
        			e'\x05\x15\bN0h':::STRING:::NAME AS col̀_1053537
        		FROM
        			defaultdb.public.table_4@table_4_col4_3_col4_2_idx AS "t'ab_469138"
        		ORDER BY
        			"t'ab_469138".col4_3
        	)
        		AS tab_469139 (col_1053538)
        	JOIN defaultdb.public.table_4@[0] AS "\ntab_469140" ON
        			(tab_469139.col_1053538) = ("\ntab_469140".col4_1)
        			AND (tab_469139.col_1053538) = ("\ntab_469140".col4_0)
        			AND (tab_469139.col_1053538) = ("\ntab_469140".col4_3)
        LIMIT
        	30:::INT8;

Schema:

    rsg_test.go:718: To reproduce, use schema:
    rsg_test.go:720: SET sql_safe_updates = false;;
    rsg_test.go:720: SET CLUSTER SETTING sql.stats.automatic_collection.enabled = false;;
    rsg_test.go:720: SET CLUSTER SETTING sql.stats.histogram_collection.enabled = false;;
    rsg_test.go:720: CREATE TABLE table_1 ("col
        1_0" OID, còl1_1 JSONB, "c(ol1_2" DATE, "c
ol1_3" REGCLASS, col1_4 TIMESTAMP NOT NULL, "co l'1""_5" INET NOT NULL, " col1_6" STRING COLLATE da_DK NOT NULL, col1_7 TSVECTOR NULL, col1_8 TIMETZ NOT NULL, "col
        1_9" TSVECTOR NOT NULL, "c'ol1_10" UUID NOT NULL, "c?ol1_11" INT2, col1_12 TSVECTOR, col1_13 STRING NOT NULL AS (CASE WHEN col1_4 IS NULL THEN 'X':::STRING ELSE e'KgB\x13A*\n':::STRING END) STORED, PRIMARY KEY (col1_4 ASC), INDEX (col1_8, col1_13 DESC, "c'ol1_10"), INVERTED INDEX (col1_7 ASC) WHERE ((((table_1.col1_13 > 'X':::STRING) OR (table_1.col1_4 = '3000-01-01 00:00:00':::TIMESTAMP)) OR (table_1.col1_8 < '00:00:00+15:59':::TIMETZ)) AND (table_1."c?ol1_11" != 0:::INT8)) AND (table_1."c(ol1_2" <= 'infinity':::DATE) VISIBILITY 0.46, INVERTED INDEX (col1_12 ASC), UNIQUE (col1_4, lower(CAST("col
        1_0" AS STRING)) DESC) WHERE ((((table_1.col1_8 > '00:00:00+15:59':::TIMETZ) OR (table_1."c?ol1_11" = (-1):::INT8)) AND (table_1.col1_13 = e'\'':::STRING)) AND (table_1."c(ol1_2" < 'infinity':::DATE)) OR (table_1.col1_4 > '4714-11-24 00:00:00 BC':::TIMESTAMP), INDEX (còl1_1 ASC, "col
        1_0" DESC), INDEX ("c
ol1_3" ASC) WHERE ((((table_1."c?ol1_11" < 1:::INT8) OR (table_1.col1_13 > e'\U00002603':::STRING)) AND (table_1."c(ol1_2" < 'infinity':::DATE)) AND (table_1.col1_4 >= '294276-12-31 23:59:59.999999':::TIMESTAMP)) OR (table_1.col1_8 >= '00:00:00+15:59':::TIMETZ), UNIQUE ("c?ol1_11" ASC, còl1_1 DESC) PARTITION BY LIST ("c?ol1_11", còl1_1) (PARTITION table_1_part_0 VALUES IN ((19287:::INT8, '["foobar", {"b": {"dT": true, "foobar": true}, "bar": false, "foo": {"ST5gZ": 1.6579099294439417}}, 0.4512887526268025]':::JSONB), ((-4373):::INT8, '{"test": "json"}':::JSONB), ((-4909):::INT8, '0.9931298851122811':::JSONB), (30884:::INT8, 'false':::JSONB)), PARTITION table_1_part_1 VALUES IN (((-13864):::INT8, '{"VL": {"91lHi0g": "c", "foo": true}, "Zw5": null, "b": true}':::JSONB), ((-8109):::INT8, '{"HD4uEaQ": true, "MPZH": {"2xfYr": {"foobar": false}, "QEPlGTW0g": null, "foobar": {"baz": true}}, "NHh": "b", "bar": [true], "foobar": null}':::JSONB), ((-75):::INT8, '{"b9sBZ": 0.9081662203993736, "foobar": false, "hWqOHbgMz": [true, null], "i1olA0u": 3.139317194927692}':::JSONB), ((-32768):::INT8, '[[[["uO", "foobar"], {"FiOfQ": true, "bar": 1.4329127581216807, "sSrZQ": "foobar"}, false, null, true], [{"foo": 0.40732327922995737}, false], "3Ymx2Te7j"], [[{"c": true}, [0.2087495959769684], 1.4037029451138683, true], ["xCCSpGHa"], {"Nc": true, "baz": [0.45996714624419344, false], "eq": false}, false, null], ["EdmAaRT", null, null], ["i73VZLdl"], null, "eIs"]':::JSONB)), PARTITION table_1_part_2 VALUES IN ((5880:::INT8, '{"a": [true, false, null], "baz": 0.6377298958282329, "c": false, "l7r": "a"}':::JSONB), ((-21875):::INT8, '{"b": "c", "baz": {"ViCPgNb": [false], "baz": 1.8868287036794391}, "wnXGNS": [0.38722298627951396]}':::JSONB), (31178:::INT8, '{"c": [["K2", 0.7233854419068928, false], false, true, null, "baz"], "mg": false}':::JSONB), (16962:::INT8, '[{"2D": null, "IJ1not": "baz", "Y9CrehaWz": true, "bar": 0.9256875083830202}, {"kVOn": true}, 0.5115066396164742, null]':::JSONB)), PARTITION "tabl%qe_1_part_3" VALUES IN ((0:::INT8, '{"9iEKX": [0.8064684740151893, 0.6808315630018522], "bar": [false, false], "foobar": 0.5053351189216091, "orTf": false}':::JSONB), (20270:::INT8, '[{"lBF0Q": null}, null]':::JSONB), ((-3142):::INT8, '{"a": [false, true], "baz": 0.9756012839278622, "c": [{"b": false}, true], "foo": "pJKNE"}':::JSONB), (18454:::INT8, '[{"c": "foo", "foo": "a", "qWpDmUj": {"foo": true}}, {"Wamtkue": true, "foobar": false}, [true], {"a": false}, ["a", null], null]':::JSONB))) WHERE ((((table_1.col1_13 >= e'\x00':::STRING) OR (table_1.col1_8 > '24:00:00-15:59':::TIMETZ)) OR (table_1."c(ol1_2" > '1970-01-01':::DATE)) OR (table_1.col1_4 = '0001-01-01 00:00:00':::TIMESTAMP)) AND (table_1."c?ol1_11" >= 0:::INT8), INVERTED INDEX (lower(CAST(còl1_1 AS STRING)) DESC, "c(ol1_2" DESC, còl1_1, "c'ol1_10" ASC, col1_4, "c
ol1_3" DESC, "col
        1_0", "c?ol1_11" DESC, " col1_6", "col
        1_9") WHERE ((((table_1."c?ol1_11" > 32767:::INT8) OR (table_1.col1_4 = '2001-01-01 00:00:00 BC':::TIMESTAMP)) AND (table_1."c(ol1_2" <= '-infinity':::DATE)) OR (table_1.col1_8 = '00:00:00+15:59':::TIMETZ)) AND (table_1.col1_13 <= e'\'':::STRING), FAMILY ("co l'1""_5", "c(ol1_2", col1_7), FAMILY ("col
        1_9", "col
        1_0", "c
ol1_3"), FAMILY (col1_12, còl1_1), FAMILY (" col1_6", col1_8, "c?ol1_11", "c'ol1_10"), FAMILY (col1_13), FAMILY (col1_4));
    rsg_test.go:720: CREATE TABLE table_2 ("co
        l2_0" DATE NOT NULL, col2_1 INTERVAL NULL, PRIMARY KEY ("co
        l2_0"), INDEX ("co
        l2_0" ASC, col2_1), UNIQUE (col2_1) WHERE table_2."co
        l2_0" <= '4714-11-24 BC':::DATE, INDEX (col2_1 DESC) WHERE table_2."co
        l2_0" > '1970-01-01':::DATE, INDEX ("co
        l2_0" ASC) WHERE table_2."co
        l2_0" = '-infinity':::DATE, UNIQUE ("co
        l2_0" ASC), UNIQUE (col2_1 ASC), INDEX ((CASE WHEN col2_1 IS NULL THEN '!]T:&F':::STRING ELSE e'{\x0e\x0e2DH-!W':::STRING END)), UNIQUE (col2_1));
    rsg_test.go:720: CREATE TABLE "tab!le_3" ("'col3_0" TIMETZ NOT NULL, c̈ol3_1 FLOAT4 NOT NULL, co̒l3_2 REGTYPE, col3_3 GEOMETRY NOT NULL, "col3 %v_4" REGCLASS, "coL3_5" INET NULL, col3_6 REFCURSOR NOT NULL, col3_7 DATE NOT NULL, col̖3_8 INT8 NOT NULL, "col\\x0c3_9" STRING NOT NULL AS (lower(CAST(col3_3 AS STRING))) VIRTUAL, "col%v3_10" STRING NULL AS (lower(CAST("coL3_5" AS STRING))) VIRTUAL, col3_11 INT8 NOT NULL AS (col̖3_8 + 2147483647:::INT8) STORED, col3_12 STRING NOT NULL AS (CASE WHEN col3_7 IS NULL THEN '_]G':::STRING ELSE 'z@':::STRING END) VIRTUAL, "co%6cl3_13" FLOAT8 NOT NULL AS (c̈ol3_1 + (-0.21957913041114807):::FLOAT8) STORED, colͮ3_14 STRING AS (CASE WHEN "col3 %v_4" IS NULL THEN e':Y\x10\'p':::STRING ELSE 'z*)B':::STRING END) STORED, col3_15 STRING NOT NULL AS (CASE WHEN col3_7 IS NULL THEN '8':::STRING ELSE 'xR2':::STRING END) VIRTUAL, "col3""_16" FLOAT8 NOT NULL AS (c̈ol3_1 + (-0.6892775893211365):::FLOAT8) STORED, PRIMARY KEY (col3_12 ASC), INDEX (c̈ol3_1) WHERE (((((((("tab!le_3"."co%6cl3_13" < '+Inf':::FLOAT8) OR ("tab!le_3".c̈ol3_1 >= '-Inf':::FLOAT8)) OR ("tab!le_3"."col3""_16" != (-0.0):::FLOAT8)) OR ("tab!le_3".col3_15 < e'\U00002603':::STRING)) OR ("tab!le_3"."col\\x0c3_9" < 'X':::STRING)) AND ("tab!le_3".col3_12 >= 'X':::STRING)) OR ("tab!le_3".col3_11 != 2147483647:::INT8)) AND ("tab!le_3".col3_7 = '1970-01-01':::DATE)) OR ("tab!le_3".col̖3_8 != 127:::INT8), INDEX ("col3""_16"), INDEX (col3_15 ASC) WHERE ((((((("tab!le_3".col̖3_8 >= 0:::INT8) AND ("tab!le_3"."col%v3_10" = '"':::STRING)) OR ("tab!le_3".c̈ol3_1 = (-1.0):::FLOAT8)) AND ("tab!le_3"."col3""_16" = 1.401298464324817e-45:::FLOAT8)) OR ("tab!le_3".col3_12 = '':::STRING)) AND ("tab!le_3".colͮ3_14 >= '':::STRING)) OR ("tab!le_3"."'col3_0" < '24:00:00-15:59':::TIMETZ)) AND ("tab!le_3".col3_15 = 'X':::STRING), INDEX ("co%6cl3_13", col3_7 DESC) PARTITION BY LIST ("co%6cl3_13", col3_7) (PARTITION "tab!le_3_part_0" VALUES IN ((0.16273786835025533:::FLOAT8, '1973-10-14':::DATE), ((-0.6057396607263347):::FLOAT8, '1992-01-18':::DATE), ((-0.17777618182151428):::FLOAT8, '1988-07-17':::DATE)), PARTITION "tab!le_3_part_1" VALUES IN ((0.7875099559095347:::FLOAT8, '1976-09-15':::DATE), ((-0.4607983685484347):::FLOAT8, '1988-05-12':::DATE), (1.4618290161493523:::FLOAT8, '1995-09-24':::DATE)), PARTITION "ta😖b!😎le͔_3_part_2" VALUES IN (((-0.834453305363841):::FLOAT8, '1977-07-04':::DATE), (1.4111456146924946:::FLOAT8, '1983-08-28':::DATE), ((-0.7848544105470923):::FLOAT8, '1989-10-23':::DATE)), PARTITION "tab!le_3_part_3" VALUES IN (((-0.22799097088483822):::FLOAT8, '1986-09-22':::DATE), ((-0.37055107599054116):::FLOAT8, '1980-10-11':::DATE), ((-1.3458954534396232):::FLOAT8, '1970-05-13':::DATE)), PARTITION "tab!le_3_part_4" VALUES IN ((1.1229237492811708:::FLOAT8, '1979-06-28':::DATE), ((-0.33964466859719766):::FLOAT8, '1973-01-09':::DATE), (0.24178564639844458:::FLOAT8, '1995-12-12':::DATE)), PARTITION "DEFAULT" VALUES IN ((DEFAULT, DEFAULT))), UNIQUE ("coL3_5" ASC) STORING (co̒l3_2, "col3 %v_4", col3_6, "co%6cl3_13", colͮ3_14) WHERE (((((("tab!le_3".col3_12 > 'X':::STRING) AND ("tab!le_3".col3_15 > e'\x00':::STRING)) AND ("tab!le_3".colͮ3_14 > e'\U00002603':::STRING)) AND ("tab!le_3"."col\\x0c3_9" < '"':::STRING)) AND ("tab!le_3"."col3""_16" = 1.401298464324817e-45:::FLOAT8)) OR ("tab!le_3"."'col3_0" <= '24:00:00-15:59':::TIMETZ)) OR ("tab!le_3".col̖3_8 >= 0:::INT8), UNIQUE ((col̖3_8 + (-1):::INT8) ASC, "col3 %v_4" DESC) WHERE (((("tab!le_3"."col\\x0c3_9" >= e'\U00002603':::STRING) OR ("tab!le_3"."co%6cl3_13" != 0.0:::FLOAT8)) AND ("tab!le_3"."'col3_0" > '00:00:00+15:59':::TIMETZ)) AND ("tab!le_3".col3_15 >= 'X':::STRING)) AND ("tab!le_3"."col%v3_10" = '"':::STRING));
    rsg_test.go:720: CREATE TABLE table_4 (col4_0 NAME NOT NULL, col4_1 VARCHAR NOT NULL, col4_2 REGROLE NOT NULL, col4_3 STRING AS (CASE WHEN col4_2 IS NULL THEN e'X3vIJCK1\x0e':::STRING ELSE e'e*98\fw}\f':::STRING END) VIRTUAL, PRIMARY KEY (col4_0, col4_2 ASC, col4_1), UNIQUE (col4_0) WHERE (table_4.col4_3 < e'\'':::STRING) AND (table_4.col4_0 = 'X':::STRING:::NAME), INVERTED INDEX (col4_0 ASC, col4_3 gin_trgm_ops), INDEX (col4_3 ASC) PARTITION BY LIST (col4_3) (PARTITION "table-_4_part_0" VALUES IN ((e'\x7f\x18<\x1c/':::STRING,), (e'\U00002603':::STRING,), (e'\f(\\':::STRING,))) NOT VISIBLE, INDEX (col4_3 ASC, col4_0), UNIQUE (col4_3 ASC), INDEX (col4_3, col4_2), INDEX (col4_1, lower(col4_1) ASC, col4_2 ASC) WHERE ((table_4.col4_0 <= e'\U00002603':::STRING:::NAME) AND (table_4.col4_3 != e'\U00002603':::STRING)) AND (table_4.col4_1 != 'X':::STRING), FAMILY (col4_2, col4_0), FAMILY (col4_1));
    rsg_test.go:720: ALTER TABLE table_1 INJECT STATISTICS e'[{"avg_size": 28, "columns": ["\\"col\\n1_0\\""], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 4853104022405092439, "histo_col_type": "", "name": "__auto__", "null_count": 6915988921992983906, "row_count": 8547935126839772695}, {"avg_size": 20, "columns": ["c\u00F2l1_1"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 520999524790935651, "histo_col_type": "", "name": "__auto__", "null_count": 2325059115681950451, "row_count": 8547935126839772695}, {"avg_size": 10, "columns": ["col1_8"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 2228194641107886752, "histo_buckets": [{"distinct_range": 0, "num_eq": 4139299244367945057, "num_range": 0, "upper_bound": "08:20:46.917083-06:13"}, {"distinct_range": 400000000, "num_eq": 10000000000, "num_range": 400000000, "upper_bound": "09:24:31.411426+10:35"}, {"distinct_range": 8000000000, "num_eq": 5724786537633527865, "num_range": 8000000000, "upper_bound": "12:26:53.726015-04:21"}], "histo_col_type": "TIMETZ", "histo_version": 3, "name": "__auto__", "null_count": 0, "row_count": 8547935126839772695}, {"avg_size": 20, "columns": ["col1_4"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 6572353214076039864, "histo_buckets": [{"distinct_range": 0, "num_eq": 7953954552503636989, "num_range": 0, "upper_bound": "1983-09-25 08:04:22.000129"}, {"distinct_range": 1118486262064533500, "num_eq": 10000000000, "num_range": 1118486262064533527, "upper_bound": "1992-01-02 17:24:27.000235"}, {"distinct_range": 7000000000, "num_eq": 50000000000, "num_range": 7000000000, "upper_bound": "2031-12-05 22:38:13.000137"}, {"distinct_range": 0, "num_eq": 1188701431511399509, "num_range": 8365068907605984232, "upper_bound": "1990-12-28 09:02:16.000207"}, {"distinct_range": 0, "num_eq": 60000000, "num_range": 6634584242723502888, "upper_bound": "2005-12-12 15:14:59.000391"}], "histo_col_type": "TIMESTAMP", "histo_version": 3, "name": "__auto__", "null_count": 0, "row_count": 8547935126839772695}, {"avg_size": 22, "columns": ["\\" col1_6\\""], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 2632786026636765556, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 8547935126839772695}, {"avg_size": 24, "columns": ["\\"col\\n1_9\\""], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 2643956431929302811, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 8547935126839772695}, {"avg_size": 7, "columns": ["col1_13"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 7553173942564248785, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 8547935126839772695}, {"avg_size": 18, "columns": ["\\"c\\rol1_3\\""], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 4120144127219767790, "histo_buckets": [{"distinct_range": 0, "num_eq": 0, "num_range": 0, "upper_bound": "0"}, {"distinct_range": 0, "num_eq": 2322235461346792249, "num_range": 80000, "upper_bound": "1211370771"}, {"distinct_range": 0, "num_eq": 5954574424830234770, "num_range": 3462115843742408702, "upper_bound": "3734644333"}, {"distinct_range": 630854096203385500, "num_eq": 219109792849603986, "num_range": 6477750504298321302, "upper_bound": "1987194031"}, {"distinct_range": 0, "num_eq": 10, "num_range": 800000000, "upper_bound": "2096475889"}, {"distinct_range": 0, "num_eq": 5850194967723554233, "num_range": 2685716113802063898, "upper_bound": "3722712886"}, {"distinct_range": 4530407959856623600, "num_eq": 60000000, "num_range": 4530407959856623784, "upper_bound": "4065155386"}], "histo_col_type": "REGCLASS", "histo_version": 3, "name": "__auto__", "null_count": 2968175616948744199, "row_count": 8547935126839772695}, {"avg_size": 26, "columns": ["\\"co l\'1\\"\\"_5\\""], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 2317043601606716192, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 8547935126839772695}, {"avg_size": 24, "columns": ["\\"c\'ol1_10\\""], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 4265364069687904485, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 8547935126839772695}, {"avg_size": 29, "columns": ["col1_12"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 5958648796600119736, "histo_buckets": [{"distinct_range": 0, "num_eq": 2741983161060251963, "num_range": 0, "upper_bound": "\\\\x12450001"}, {"distinct_range": 1106856619343829200, "num_eq": 5617121714845009432, "num_range": 3014903843898229977, "upper_bound": "\\\\x12696c0001"}, {"distinct_range": 0, "num_eq": 10000, "num_range": 300000, "upper_bound": "\\\\x124f6f710001"}, {"distinct_range": 4129731765215608000, "num_eq": 8771014553822856421, "num_range": 4508941384113094586, "upper_bound": "\\\\x12665a6b0001"}, {"distinct_range": 4988508252133959000, "num_eq": 100000000, "num_range": 4988508252133958837, "upper_bound": "\\\\x126c4c700001"}, {"distinct_range": 0, "num_eq": 2000000, "num_range": 8129233677815052574, "upper_bound": "\\\\x124d46596a0001"}, {"distinct_range": 0, "num_eq": 1000, "num_range": 400, "upper_bound": "\\\\x124266554f47780001"}, {"distinct_range": 0, "num_eq": 60000000, "num_range": 4589785600288958900, "upper_bound": "\\\\x124c4d6c747a43780001"}, {"distinct_range": 0, "num_eq": 30000, "num_range": 0, "upper_bound": "\\\\x124a6f487666775a48630001"}, {"distinct_range": 0, "num_eq": 6196086364367259160, "num_range": 1000000, "upper_bound": "\\\\x126a75777658427a47450001"}, {"distinct_range": 1253836156028093400, "num_eq": 4254757583885433251, "num_range": 1822014122934779090, "upper_bound": "\\\\x124c4f464b4259635674560001"}, {"distinct_range": 1000000, "num_eq": 10000000000, "num_range": 1000000, "upper_bound": "\\\\x12514557414749635263680001"}, {"distinct_range": 0, "num_eq": 2575742244431410877, "num_range": 1000, "upper_bound": "\\\\x127a727469704f477a64660001"}], "histo_col_type": "BYTES", "histo_version": 3, "name": "__auto__", "null_count": 7884242201720418028, "row_count": 8547935126839772695}, {"avg_size": 30, "columns": ["\\"c(ol1_2\\""], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 7799159877064968472, "histo_col_type": "", "name": "__auto__", "null_count": 255827510669119424, "row_count": 8547935126839772695}, {"avg_size": 27, "columns": ["col1_7"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 6928954794951417151, "histo_buckets": [{"distinct_range": 0, "num_eq": 330073800750084102, "num_range": 0, "upper_bound": "\\\\x1269490001"}, {"distinct_range": 754.9872785532473, "num_eq": 2077565464009738246, "num_range": 2000, "upper_bound": "\\\\x1252715a0001"}, {"distinct_range": 662391308999774000, "num_eq": 900, "num_range": 3121861424569707483, "upper_bound": "\\\\x124d6543760001"}, {"distinct_range": 52656310889795860, "num_eq": 8602872983832417829, "num_range": 2169215734549804425, "upper_bound": "\\\\x1250794b540001"}, {"distinct_range": 0, "num_eq": 1962163245941183069, "num_range": 60000000000, "upper_bound": "\\\\x12686a7a5a0001"}, {"distinct_range": 800, "num_eq": 8374038160380866076, "num_range": 800, "upper_bound": "\\\\x124b49764d420001"}, {"distinct_range": 1008.6995980310983, "num_eq": 6333280501345430700, "num_range": 40000, "upper_bound": "\\\\x12556c6a69670001"}, {"distinct_range": 0, "num_eq": 5000000, "num_range": 80000000, "upper_bound": "\\\\x12444c734d46610001"}, {"distinct_range": 0, "num_eq": 7000000000, "num_range": 5376457269764208067, "upper_bound": "\\\\x126b58426d4f410001"}, {"distinct_range": 2408190099415161300, "num_eq": 3566131081440048939, "num_range": 6100129014764101916, "upper_bound": "\\\\x12764953456f550001"}, {"distinct_range": 0, "num_eq": 900000, "num_range": 20, "upper_bound": "\\\\x1241574f5a41657a0001"}, {"distinct_range": 0, "num_eq": 7042940164281532083, "num_range": 2441019042991653732, "upper_bound": "\\\\x12794176436653520001"}, {"distinct_range": 200000000, "num_eq": 700000000, "num_range": 200000000, "upper_bound": "\\\\x124e675a6f71565854650001"}, {"distinct_range": 947701169845617000, "num_eq": 921867911109686167, "num_range": 3695073268435305286, "upper_bound": "\\\\x125a50426f706d586d6c5a0001"}, {"distinct_range": 0, "num_eq": 3914182263558526946, "num_range": 400000, "upper_bound": "\\\\x12654f63567163756b456b0001"}], "histo_col_type": "BYTES", "histo_version": 3, "name": "__auto__", "null_count": 685746418043495679, "row_count": 8547935126839772695}, {"avg_size": 29, "columns": ["\\"c?ol1_11\\""], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 6162468549593432558, "histo_buckets": [{"distinct_range": 0, "num_eq": 1000, "num_range": 0, "upper_bound": "29745"}], "histo_col_type": "INT2", "histo_version": 3, "name": "__auto__", "null_count": 4233923118426076091, "row_count": 8547935126839772695}]':::JSONB;
    rsg_test.go:720: ALTER TABLE table_2 INJECT STATISTICS e'[{"avg_size": 30, "columns": ["\\"co\\nl2_0\\""], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 124244855434196749, "histo_buckets": [{"distinct_range": 0, "num_eq": 5828085379938123998, "num_range": 0, "upper_bound": "1992-08-15"}, {"distinct_range": 80000, "num_eq": 700000000, "num_range": 80000, "upper_bound": "1975-02-28"}, {"distinct_range": 394884464732083800, "num_eq": 4103814597852519612, "num_range": 2660342722923188200, "upper_bound": "1991-04-20"}, {"distinct_range": 56855.782153377084, "num_eq": 80, "num_range": 600000, "upper_bound": "1971-03-04"}, {"distinct_range": 0, "num_eq": 1000000, "num_range": 4000, "upper_bound": "1994-04-20"}, {"distinct_range": 1801967.5461782445, "num_eq": 2405146998515964143, "num_range": 9000000, "upper_bound": "1988-09-13"}, {"distinct_range": 0, "num_eq": 7344550977506636219, "num_range": 2000000000, "upper_bound": "1977-05-04"}, {"distinct_range": 0, "num_eq": 0, "num_range": 100, "upper_bound": "1986-04-14"}, {"distinct_range": 0, "num_eq": 1000, "num_range": 300000, "upper_bound": "infinity"}], "histo_col_type": "DATE", "histo_version": 3, "name": "__auto__", "null_count": 0, "row_count": 6272300127647104256}, {"avg_size": 15, "columns": ["col2_1"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 1331335733946059917, "histo_buckets": [{"distinct_range": 0, "num_eq": 963110354350855394, "num_range": 0, "upper_bound": "1 year 2 mons 596 days 02:50:38.739126"}, {"distinct_range": 7400204059148063000, "num_eq": 7000000, "num_range": 7400204059148062878, "upper_bound": "2 years 1 mon 913 days 13:40:00.814665"}, {"distinct_range": 6000000, "num_eq": 1570101245105306620, "num_range": 6000000, "upper_bound": "32 years 3 mons 823 days 17:52:32.636336"}, {"distinct_range": 10000000000, "num_eq": 7055810336158759829, "num_range": 10000000000, "upper_bound": "54 years 854 days 14:36:44.051319"}, {"distinct_range": 862.5681071592385, "num_eq": 9000000000, "num_range": 1000, "upper_bound": "70 years 9 mons 877 days 16:17:49.871729"}, {"distinct_range": 30000000000, "num_eq": 4000000000, "num_range": 30000000000, "upper_bound": "-14 years -9 mons -273 days -06:51:28.66622"}, {"distinct_range": 0, "num_eq": 0, "num_range": 0, "upper_bound": "69 years 1 mon 71 days 16:47:33.708631"}], "histo_col_type": "INTERVAL", "histo_version": 3, "name": "__auto__", "null_count": 3410714731483916384, "row_count": 6272300127647104256}]':::JSONB;
    rsg_test.go:720: ALTER TABLE "tab!le_3" INJECT STATISTICS e'[{"avg_size": 23, "columns": ["\\"col3 %v_4\\""], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 27, "histo_col_type": "", "name": "__auto__", "null_count": 155, "row_count": 300}, {"avg_size": 29, "columns": ["col3_6"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 52, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 300}, {"avg_size": 26, "columns": ["col\u03163_8"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 275, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 300}, {"avg_size": 19, "columns": ["\\"col\\\\\\\\x0c3_9\\""], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 217, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 300}, {"avg_size": 17, "columns": ["\\"col%v3_10\\""], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 140, "histo_col_type": "", "name": "__auto__", "null_count": 137, "row_count": 300}, {"avg_size": 5, "columns": ["col3_12"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 287, "histo_buckets": [{"distinct_range": 0, "num_eq": 7641363314502636088, "num_range": 0, "upper_bound": ""}, {"distinct_range": 934478.9727852124, "num_eq": 20000000, "num_range": 4000000, "upper_bound": "\\u0006``H"}], "histo_col_type": "STRING", "histo_version": 3, "name": "__auto__", "null_count": 0, "row_count": 300}, {"avg_size": 26, "columns": ["col3_15"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 261, "histo_buckets": [{"distinct_range": 0, "num_eq": 10000000, "num_range": 0, "upper_bound": ""}, {"distinct_range": 0, "num_eq": 2616639160501672533, "num_range": 3047744958501459722, "upper_bound": "\\t"}, {"distinct_range": 1000000000, "num_eq": 4248968737515207519, "num_range": 1000000000, "upper_bound": "\\u0016"}, {"distinct_range": 0, "num_eq": 20000000, "num_range": 1770206578106875769, "upper_bound": "\'"}, {"distinct_range": 0, "num_eq": 40000, "num_range": 20000000000, "upper_bound": "K"}, {"distinct_range": 0, "num_eq": 490549482976948504, "num_range": 4652864855669371981, "upper_bound": "\\t)\\u001a\\\\\\t"}, {"distinct_range": 1669551423187130400, "num_eq": 1593221595217307027, "num_range": 4054229784995367764, "upper_bound": "\'\\u001f4\\u001a<#"}, {"distinct_range": 70000000, "num_eq": 5821677067468308022, "num_range": 70000000, "upper_bound": "@x\\u001f%|\\\\"}, {"distinct_range": 0, "num_eq": 3000000, "num_range": 0, "upper_bound": "q\\r.~W\\nB\\u001fb"}], "histo_col_type": "STRING", "histo_version": 3, "name": "__auto__", "null_count": 0, "row_count": 300}, {"avg_size": 7, "columns": ["co\u0312l3_2"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 23, "histo_col_type": "", "name": "__auto__", "null_count": 219, "row_count": 300}, {"avg_size": 16, "columns": ["col3_11"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 232, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 300}, {"avg_size": 19, "columns": ["col3_7"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 254, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 300}, {"avg_size": 19, "columns": ["c\u0308ol3_1"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 162, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 300}, {"avg_size": 4, "columns": ["\\"\'col3_0\\""], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 297, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 300}, {"avg_size": 0, "columns": ["\\"coL3_5\\""], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 260, "histo_buckets": [{"distinct_range": 0, "num_eq": 2875169390958401603, "num_range": 0, "upper_bound": "52.182.246.94/29"}, {"distinct_range": 22.72369964317094, "num_eq": 5552451291554993436, "num_range": 90, "upper_bound": "3d0c:542d:9a6:d9c7:cab0:4dc3:fd01:e2be/78"}, {"distinct_range": 0, "num_eq": 6949538379642192726, "num_range": 20000, "upper_bound": "7e22:fb9e:3e17:794b:f58d:9eb:b59:5ed/101"}, {"distinct_range": 700, "num_eq": 20000000000, "num_range": 700, "upper_bound": "ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff"}], "histo_col_type": "INET", "histo_version": 3, "name": "__auto__", "null_count": 116, "row_count": 300}, {"avg_size": 8, "columns": ["\\"co%6cl3_13\\""], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 43, "histo_buckets": [{"distinct_range": 0, "num_eq": 2000000, "num_range": 0, "upper_bound": "-0.14101484441154827"}, {"distinct_range": 17.029069621606507, "num_eq": 5385581857565745741, "num_range": 80, "upper_bound": "-0.983337165712959"}, {"distinct_range": 0, "num_eq": 2214149891668962510, "num_range": 0, "upper_bound": "-1.2935044556976414"}, {"distinct_range": 30000000, "num_eq": 3000000000, "num_range": 30000000, "upper_bound": "-1.2944842989851473"}], "histo_col_type": "FLOAT8", "histo_version": 3, "name": "__auto__", "null_count": 0, "row_count": 300}, {"avg_size": 22, "columns": ["col\u036E3_14"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 86, "histo_col_type": "", "name": "__auto__", "null_count": 194, "row_count": 300}, {"avg_size": 7, "columns": ["\\"col3\\"\\"_16\\""], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 56, "histo_buckets": [{"distinct_range": 0, "num_eq": 800, "num_range": 0, "upper_bound": "0.6663675629851076"}, {"distinct_range": 0, "num_eq": 3705709102805639092, "num_range": 300000, "upper_bound": "-0.1886606394314952"}, {"distinct_range": 0, "num_eq": 1000, "num_range": 90000, "upper_bound": "-0.9604233077679453"}], "histo_col_type": "FLOAT8", "histo_version": 3, "name": "__auto__", "null_count": 0, "row_count": 300}, {"avg_size": 7, "columns": ["col3_3"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 126, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 300}]':::JSONB;
    rsg_test.go:720: ALTER TABLE table_4 INJECT STATISTICS e'[{"avg_size": 5, "columns": ["col4_3"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 801, "histo_buckets": [{"distinct_range": 0, "num_eq": 80000000000, "num_range": 0, "upper_bound": ""}], "histo_col_type": "STRING", "histo_version": 3, "name": "__auto__", "null_count": 942, "row_count": 1000}, {"avg_size": 11, "columns": ["col4_0"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 703, "histo_buckets": [{"distinct_range": 0, "num_eq": 200000000, "num_range": 0, "upper_bound": "V5"}, {"distinct_range": 371298736631919900, "num_eq": 0, "num_range": 2650576017703609018, "upper_bound": "!uaW\\u0013"}, {"distinct_range": 80000000, "num_eq": 700, "num_range": 80000000, "upper_bound": "*%\\t\\u001c8wX"}], "histo_col_type": "NAME", "histo_version": 3, "name": "__auto__", "null_count": 0, "row_count": 1000}, {"avg_size": 6, "columns": ["col4_1"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 552, "histo_buckets": [{"distinct_range": 0, "num_eq": 5025191064980263135, "num_range": 0, "upper_bound": "y"}, {"distinct_range": 247.6794549873338, "num_eq": 1330562659025157521, "num_range": 800, "upper_bound": "\\u0004\\",U"}, {"distinct_range": 0, "num_eq": 7541372595460190427, "num_range": 0, "upper_bound": "xn\\u0008@iF1"}], "histo_col_type": "VARCHAR", "histo_version": 3, "name": "__auto__", "null_count": 0, "row_count": 1000}, {"avg_size": 15, "columns": ["col4_2"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 965, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 1000}]':::JSONB;
    rsg_test.go:720: CREATE TYPE rand_typ_0 AS ENUM ('nzwo');
    rsg_test.go:720: CREATE TYPE rand_typ_1 AS ENUM ('kgyb', 'fhy', 'frd', 'v');
    rsg_test.go:720: CREATE TYPE rand_typ_2 AS ENUM ('rfr', 'tpsiyi');
    rsg_test.go:720: SET sql_safe_updates = false;;
    rsg_test.go:720: 
        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:722: 
    rsg_test.go:723: -- test log scope end --
test logs left over in: /artifacts/tmp/_tmp/d437d2c847dfedbc4972f231c3331c8e/logTestRandomSyntaxSQLSmith4220980404
--- FAIL: TestRandomSyntaxSQLSmith (381.21s)
Help

See also: How To Investigate a Go Test Failure (internal)

Same failure on other branches

/cc @cockroachdb/sql-foundations

This test on roachdash | Improve this report!

Jira issue: CRDB-38036

@cockroach-teamcity cockroach-teamcity added branch-master Failures on the master branch. C-test-failure Broken test (automatically or manually discovered). O-robot Originated from a bot. release-blocker Indicates a release-blocker. Use with branch-release-2x.x label to denote which branch is blocked. T-sql-foundations SQL Foundations Team (formerly SQL Schema + SQL Sessions) labels Apr 20, 2024
@cockroach-teamcity cockroach-teamcity added this to the 24.1 milestone Apr 20, 2024
@rafiss rafiss changed the title sql/tests: TestRandomSyntaxSQLSmith failed sql/tests: TestRandomSyntaxSQLSmith failed [lookup join with no lookup columns] Apr 22, 2024
@rafiss rafiss added T-sql-queries SQL Queries Team and removed T-sql-foundations SQL Foundations Team (formerly SQL Schema + SQL Sessions) labels Apr 22, 2024
@yuzefovich yuzefovich removed the release-blocker Indicates a release-blocker. Use with branch-release-2x.x label to denote which branch is blocked. label Apr 30, 2024
@yuzefovich yuzefovich removed this from Triage in SQL Foundations Apr 30, 2024
@rytaft rytaft added the P-2 Issues/test failures with a fix SLA of 3 months label May 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
branch-master Failures on the master branch. C-test-failure Broken test (automatically or manually discovered). O-robot Originated from a bot. P-2 Issues/test failures with a fix SLA of 3 months T-sql-queries SQL Queries Team
Projects
Status: Triage
Development

No branches or pull requests

4 participants