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 [comparison overload not found (eq, refcursor, refcursor)] #112362

Closed
cockroach-teamcity opened this issue Oct 14, 2023 · 0 comments · Fixed by #112725
Assignees
Labels
branch-master Failures and bugs on the master branch. C-test-failure Broken test (automatically or manually discovered). O-robot Originated from a bot. O-rsg Random Syntax Generator release-blocker Indicates a release-blocker. Use with branch-release-2x.x label to denote which branch is blocked. T-sql-queries SQL Queries Team
Milestone

Comments

@cockroach-teamcity
Copy link
Member

cockroach-teamcity commented Oct 14, 2023

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

Random syntax error:

    rsg_test.go:895: Crash detected: server panic: pq: internal error: comparison overload not found (eq, refcursor, refcursor)

Query:

        SELECT
        	"tab 202573".col1_3 AS col479132,
        	"tab 202573".col1_6 AS col479133,
        	"tab 202573"." col̝1
        _0" AS 😆col479134,
        	NULL AS col479135,
        	NULL AS "\\U000D6C39col479136",
        	7.49450089353114104E+25:::DECIMAL AS "co
l479137",
        	"ta%pb202572".col1_8 AS "col 479138",
        	'''x'' & ''RLAeHqbYvb'' | ''pMp''':::TSQUERY AS "col\\u77FB479139",
        	0.02489577174953000426:::DECIMAL AS col479140,
        	2203836472:::OID AS "col%v479141",
        	"ta%pb202572".col1_6 AS "\\U0010AB61côl479142",
        	"tab 202573".col1_5 AS co😈l479143,
        	"ta%pb202572".col1_9 AS col479144,
        	"tab 202573".tableoid AS colͫ479145,
        	"ta%pb202572".col1_3 AS col479146,
        	"ta%pb202572"."c😵ol1_!7" AS col479147,
        	3664394996:::OID AS col479148,
        	'1970-01-01':::DATE AS "col 479149"
        FROM
        	defaultdb.public."ta' ble1"@"ta' ble1_col1_5_col1_9_col1_1_col1_2_idx" AS "ta%pb202572"
        	JOIN defaultdb.public."ta' ble1"@"ta' ble1_col1_9_col1_1_col1_5_ col̝1
        _0_col1_3_col1_4_col1_8_idx"
        			AS "tab 202573" ON
        			("ta%pb202572".col1_8) = ("tab 202573".col1_4)
        			AND ("ta%pb202572".col1_8) = ("tab 202573".col1_8)
        			AND ("ta%pb202572".tableoid) = ("tab 202573".col1_2)
        			AND ("ta%pb202572".col1_5) = ("tab 202573".col1_3)
        			AND ("ta%pb202572".col1_9) = ("tab 202573".col1_9)
        ORDER BY
        	"ta%pb202572".crdb_internal_mvcc_timestamp DESC NULLS FIRST
        LIMIT
        	97:::INT8;

Schema:

    rsg_test.go:704: To reproduce, use schema:
    rsg_test.go:706: SET sql_safe_updates = false;;
    rsg_test.go:706: SET CLUSTER SETTING sql.stats.automatic_collection.enabled = false;;
    rsg_test.go:706: SET CLUSTER SETTING sql.stats.histogram_collection.enabled = false;;
    rsg_test.go:706: CREATE TABLE "ta' ble1" (" col̝1
        _0" INTERVAL NOT NULL, col1_1 DATE NOT NULL, col1_2 REGCLASS, col1_3 DATE NULL, col1_4 INT4 NOT NULL, col1_5 DATE NOT NULL, col1_6 REFCURSOR NOT NULL, "c😵ol1_!7" TSQUERY NOT NULL, col1_8 INT2 NOT NULL, col1_9 TIMETZ NOT NULL, UNIQUE (col1_9), INDEX (col1_9 DESC, col1_1 DESC, col1_5 DESC, " col̝1
        _0" DESC, col1_3 DESC, col1_4 ASC, col1_8), INDEX (col1_8 DESC) WHERE ((((("ta' ble1".col1_5 < '4714-11-24 BC':::DATE) AND ("ta' ble1".col1_1 >= '1970-01-01':::DATE)) OR ("ta' ble1".col1_3 > '5874897-12-31':::DATE)) AND ("ta' ble1".col1_4 < (-2147483648):::INT8)) AND ("ta' ble1".col1_8 = 0:::INT8)) AND ("ta' ble1".col1_9 >= '00:00:00+15:59':::TIMETZ), INDEX (col1_5, col1_9, col1_1, col1_2 DESC) WHERE (((("ta' ble1".col1_9 = '00:00:00+15:59':::TIMETZ) OR ("ta' ble1".col1_8 > (-32768):::INT8)) AND ("ta' ble1".col1_5 <= '4714-11-24 BC':::DATE)) OR ("ta' ble1".col1_1 > '-infinity':::DATE)) AND ("ta' ble1".col1_4 < 32767:::INT8), FAMILY (col1_1, col1_9, col1_4), FAMILY (col1_2, col1_5, " col̝1
        _0"), FAMILY (col1_6), FAMILY (col1_3), FAMILY (col1_8, "c😵ol1_!7"));
    rsg_test.go:706: CREATE TABLE table2 ("co%ql2_0" REGROLE, col2_😏1 INTERVAL, col2_2 PG_LSN NOT NULL, col2_3 TSVECTOR NOT NULL, col2_4 DECIMAL NOT NULL, col2_😱5 INT4 NOT NULL, col2😙_6 INT8 NOT NULL AS (col2_😱5 + 675402937:::INT8) VIRTUAL, col2_7 STRING NULL AS (lower(CAST(col2_2 AS STRING))) VIRTUAL, PRIMARY KEY (col2_2 DESC), UNIQUE (col2_2 DESC, col2_7 ASC, col2😙_6 DESC, col2_😱5 DESC, (col2_4 + 913.7171576312026671:::DECIMAL) ASC) STORING ("co%ql2_0", col2_4), INDEX (col2_😏1 DESC, col2_😱5 ASC, col2😙_6 ASC, col2_4 DESC) WHERE (((table2.col2😙_6 != 9223372036854775807:::INT8) AND (table2.col2_😱5 != (-1):::INT8)) AND (table2.col2_7 >= '':::STRING)) AND (table2.col2_4 < 'Infinity':::DECIMAL), INDEX (col2_4), INDEX (col2_7 ASC, col2_4) WHERE ((table2.col2_😱5 <= (-1):::INT8) OR (table2.col2_7 = '"':::STRING)) AND (table2.col2😙_6 != (-9223372036854775807):::INT8) VISIBILITY 1.00, UNIQUE ("co%ql2_0") WHERE (table2.col2_4 > 'Infinity':::DECIMAL) OR (table2.col2😙_6 = (-2147483648):::INT8));
    rsg_test.go:706: CREATE TABLE "t\\u0C56ab""le3" ("c ol3_0" BOOL NOT NULL, "\v�col3_1" OID, "c.ol3_😔2" VARCHAR NULL, col3_3 DECIMAL NOT NULL, col3_4 REGTYPE NULL, "co|l 3_5" TIMESTAMPTZ NOT NULL, col3_6 TSQUERY NOT NULL, col3_7 STRING NOT NULL AS (lower(CAST(col3_6 AS STRING))) VIRTUAL, col3_8 STRING NOT NULL AS (lower(CAST(col3_6 AS STRING))) VIRTUAL, col3_9 STRING NULL AS (lower("c.ol3_😔2")) STORED, col3_10 STRING NOT NULL AS (lower(CAST(col3_6 AS STRING))) VIRTUAL, col3_11 STRING NOT NULL AS (lower(CAST("c ol3_0" AS STRING))) VIRTUAL, col3_12 STRING NOT NULL AS (lower(CAST("c ol3_0" AS STRING))) STORED, INVERTED INDEX (col3_3 ASC, col3_7 gin_trgm_ops ASC) WHERE ((((((((("t\\u0C56ab""le3".col3_12 < 'X':::STRING) OR (NOT "t\\u0C56ab""le3"."c ol3_0")) AND ("t\\u0C56ab""le3".col3_8 >= '':::STRING)) AND ("t\\u0C56ab""le3".col3_3 != '-Infinity':::DECIMAL)) AND ("t\\u0C56ab""le3".col3_11 <= 'X':::STRING)) AND ("t\\u0C56ab""le3"."c.ol3_😔2" != e'\x00':::STRING)) AND ("t\\u0C56ab""le3"."co|l 3_5" >= '2001-01-01 00:00:00+00 BC':::TIMESTAMPTZ)) OR ("t\\u0C56ab""le3".col3_10 >= e'\'':::STRING)) AND ("t\\u0C56ab""le3".col3_7 = '"':::STRING)) OR ("t\\u0C56ab""le3".col3_9 <= e'\U00002603':::STRING), UNIQUE ("co|l 3_5" DESC, lower(CAST(col3_6 AS STRING)) ASC, col3_8 DESC, col3_9) STORING ("c ol3_0", "c.ol3_😔2", col3_3, col3_4, col3_12), UNIQUE (col3_8, "co|l 3_5" ASC, (CASE WHEN col3_4 IS NULL THEN e'bO\x0ez{':::STRING ELSE '':::STRING END) ASC) STORING ("c ol3_0", "\v�col3_1", "c.ol3_😔2", col3_9, col3_12) WHERE ((((((((("t\\u0C56ab""le3"."c.ol3_😔2" > e'\U00002603':::STRING) OR ("t\\u0C56ab""le3"."co|l 3_5" != '3000-01-01 00:00:00+00':::TIMESTAMPTZ)) AND ("t\\u0C56ab""le3".col3_12 > 'X':::STRING)) OR ("t\\u0C56ab""le3".col3_7 < '':::STRING)) AND ("t\\u0C56ab""le3".col3_10 != '"':::STRING)) AND ("t\\u0C56ab""le3".col3_3 > 'NaN':::DECIMAL)) AND ("t\\u0C56ab""le3".col3_9 <= '':::STRING)) AND ("t\\u0C56ab""le3".col3_8 = '':::STRING)) AND "t\\u0C56ab""le3"."c ol3_0") OR ("t\\u0C56ab""le3".col3_11 <= '':::STRING));
    rsg_test.go:706: ALTER TABLE "ta' ble1" INJECT STATISTICS e'[{"avg_size": 7, "columns": ["col1_1"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 78337583955347748, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 1465477749527438176}, {"avg_size": 16, "columns": ["col1_2"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 200106637977189566, "histo_col_type": "", "name": "__auto__", "null_count": 1052994827733034109, "row_count": 1465477749527438176}, {"avg_size": 2, "columns": ["col1_3"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 187150464891783671, "histo_col_type": "", "name": "__auto__", "null_count": 237748663030003454, "row_count": 1465477749527438176}, {"avg_size": 10, "columns": ["col1_5"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 737224211159999406, "histo_buckets": [{"distinct_range": 0, "num_eq": 10000000, "num_range": 0, "upper_bound": "1979-01-14"}, {"distinct_range": 152260.62842509637, "num_eq": 20000000000, "num_range": 400000, "upper_bound": "1990-02-05"}, {"distinct_range": 5258361883245001000, "num_eq": 5686115491867353547, "num_range": 5611470509316529918, "upper_bound": "1995-12-09"}], "histo_col_type": "DATE", "name": "__auto__", "null_count": 0, "row_count": 1465477749527438176}, {"avg_size": 28, "columns": ["col1_8"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 365885540488843025, "histo_buckets": [{"distinct_range": 0, "num_eq": 2895436267064640348, "num_range": 0, "upper_bound": "-29234"}, {"distinct_range": 1023302325528258600, "num_eq": 4054017339421439646, "num_range": 2585193773593569734, "upper_bound": "-26682"}, {"distinct_range": 6765874867522966000, "num_eq": 50000, "num_range": 8869586182316726861, "upper_bound": "-26151"}, {"distinct_range": 6959270124347913000, "num_eq": 2521762453663922052, "num_range": 6959270124347913563, "upper_bound": "-23266"}, {"distinct_range": 1977358199890832100, "num_eq": 3909315356000705469, "num_range": 1977358199890832151, "upper_bound": "-4158"}, {"distinct_range": 0, "num_eq": 0, "num_range": 6808768122130185588, "upper_bound": "6495"}, {"distinct_range": 1.4817860762353898, "num_eq": 8340139156293310899, "num_range": 50, "upper_bound": "10773"}, {"distinct_range": 5963158446098198000, "num_eq": 720982292683255588, "num_range": 5963158446098197184, "upper_bound": "21006"}, {"distinct_range": 1780492228917232400, "num_eq": 2299234855233534991, "num_range": 4140690827610526194, "upper_bound": "26021"}], "histo_col_type": "INT2", "name": "__auto__", "null_count": 0, "row_count": 1465477749527438176}, {"avg_size": 28, "columns": ["col1_9"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 791677894268185358, "histo_buckets": [{"distinct_range": 0, "num_eq": 60000000, "num_range": 0, "upper_bound": "00:00:00+15:59"}, {"distinct_range": 6531693470578145000, "num_eq": 4108905007868374714, "num_range": 6531693470578145005, "upper_bound": "10:58:38.899607+08:10"}, {"distinct_range": 0, "num_eq": 2000000, "num_range": 90, "upper_bound": "05:47:03.656796+00:49"}, {"distinct_range": 0, "num_eq": 4397993917051016605, "num_range": 0, "upper_bound": "06:01:41.098962-13:16"}], "histo_col_type": "TIMETZ", "name": "__auto__", "null_count": 0, "row_count": 1465477749527438176}, {"avg_size": 2, "columns": ["\\" col\u031D1\\n_0\\""], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 1006213652129774921, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 1465477749527438176}, {"avg_size": 11, "columns": ["col1_6"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 670412910138384710, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 1465477749527438176}, {"avg_size": 28, "columns": ["\\"c\U0001F635ol1_!7\\""], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 1406410901591022071, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 1465477749527438176}, {"avg_size": 2, "columns": ["col1_4"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 103376409265073704, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 1465477749527438176}]':::JSONB;
    rsg_test.go:706: ALTER TABLE table2 INJECT STATISTICS e'[{"avg_size": 7, "columns": ["\\"co%ql2_0\\""], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 2257525028923031362, "histo_buckets": [{"distinct_range": 0, "num_eq": 300, "num_range": 0, "upper_bound": "0"}, {"distinct_range": 90000000000, "num_eq": 8522362318970492070, "num_range": 90000000000, "upper_bound": "18584676"}, {"distinct_range": 4655150682235373000, "num_eq": 100, "num_range": 4731582846464018024, "upper_bound": "654915549"}, {"distinct_range": 5705774.920699909, "num_eq": 4000000, "num_range": 30000000, "upper_bound": "1179479408"}, {"distinct_range": 4335.715200597722, "num_eq": 7664525656786072214, "num_range": 10000, "upper_bound": "1810040393"}, {"distinct_range": 0, "num_eq": 7811059285968687216, "num_range": 682974667578847331, "upper_bound": "1974356106"}, {"distinct_range": 0, "num_eq": 200000000, "num_range": 0, "upper_bound": "3290962960"}, {"distinct_range": 203.66094722182802, "num_eq": 4778106715161440794, "num_range": 400, "upper_bound": "3481986201"}, {"distinct_range": 4489006967727527400, "num_eq": 5000000, "num_range": 4900149939040737359, "upper_bound": "3675149367"}], "histo_col_type": "REGROLE", "name": "__auto__", "null_count": 3177260632236503353, "row_count": 5279334579002785312}, {"avg_size": 22, "columns": ["col2_\U0001F60F1"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 536561224016198973, "histo_buckets": [{"distinct_range": 0, "num_eq": 4079828072887383398, "num_range": 0, "upper_bound": "-65 years -9 mons -409 days -03:49:33.392125"}, {"distinct_range": 0, "num_eq": 4250893691479814732, "num_range": 3128440741376354675, "upper_bound": "-56 years -2 mons -461 days -01:11:22.720409"}, {"distinct_range": 43977.64860757495, "num_eq": 600000000, "num_range": 100000, "upper_bound": "-20 years -1 mons -216 days -15:23:44.590413"}, {"distinct_range": 0, "num_eq": 80000000000, "num_range": 7156765986555352515, "upper_bound": "-18 years -8 mons -179 days -17:47:08.911213"}, {"distinct_range": 0, "num_eq": 8138314247251416067, "num_range": 6857856977862694381, "upper_bound": "1 day"}, {"distinct_range": 6140653729559503000, "num_eq": 80000000, "num_range": 6609947467038507248, "upper_bound": "3 years 703 days 11:56:32.651203"}, {"distinct_range": 58.563379049061254, "num_eq": 5609061488546640689, "num_range": 700, "upper_bound": "56 years 95 days 11:25:08.352838"}, {"distinct_range": 6406313608447744000, "num_eq": 2314527764095024067, "num_range": 6406313608447743564, "upper_bound": "290 years"}], "histo_col_type": "INTERVAL", "name": "__auto__", "null_count": 4655987172393405715, "row_count": 5279334579002785312}, {"avg_size": 16, "columns": ["col2_2"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 5159298663330306673, "histo_col_type": "PG_LSN", "name": "__auto__", "null_count": 0, "row_count": 5279334579002785312}, {"avg_size": 22, "columns": ["col2_3"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 5060534966966752451, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 5279334579002785312}, {"avg_size": 2, "columns": ["col2_4"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 5115685598364942878, "histo_buckets": [{"distinct_range": 0, "num_eq": 8554815564118507750, "num_range": 0, "upper_bound": "NaN"}, {"distinct_range": 0, "num_eq": 2107499088465446205, "num_range": 100, "upper_bound": "-7.746532602129025113E+29"}, {"distinct_range": 0, "num_eq": 6030536980167021259, "num_range": 2739602345802024019, "upper_bound": "-78502121263638.91741"}, {"distinct_range": 172.48910961058974, "num_eq": 8000, "num_range": 6000, "upper_bound": "-0.01957728861636863781"}, {"distinct_range": 7308444679660263000, "num_eq": 0, "num_range": 7308444679660263477, "upper_bound": "1230932080116.162207"}, {"distinct_range": 49272399460.23342, "num_eq": 90000, "num_range": 60000000000, "upper_bound": "6.942043108540490426E+25"}, {"distinct_range": 258.2316439152339, "num_eq": 900000, "num_range": 800, "upper_bound": "1.109822990022820932E+29"}, {"distinct_range": 0, "num_eq": 30000000, "num_range": 4470188445143354509, "upper_bound": "8.911772456330343137E+35"}, {"distinct_range": 900, "num_eq": 7377244993895432666, "num_range": 900, "upper_bound": "7.822645676109853881E+37"}], "histo_col_type": "DECIMAL", "name": "__auto__", "null_count": 0, "row_count": 5279334579002785312}, {"avg_size": 16, "columns": ["col2_\U0001F6315"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 4877669601258944928, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 5279334579002785312}, {"avg_size": 9, "columns": ["col2\U0001F619_6"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 1680420877356681328, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 5279334579002785312}, {"avg_size": 27, "columns": ["col2_7"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 1962454278969811197, "histo_buckets": [{"distinct_range": 0, "num_eq": 2198482894002253474, "num_range": 0, "upper_bound": ""}, {"distinct_range": 30, "num_eq": 5546243655261859677, "num_range": 30, "upper_bound": "#"}, {"distinct_range": 0, "num_eq": 6382360178860680453, "num_range": 3000000000, "upper_bound": "vPS+/"}], "histo_col_type": "STRING", "name": "__auto__", "null_count": 4823217539869537515, "row_count": 5279334579002785312}]':::JSONB;
    rsg_test.go:706: ALTER TABLE "t\\u0C56ab""le3" INJECT STATISTICS e'[{"avg_size": 11, "columns": ["\\"c ol3_0\\""], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 18507, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 80000}, {"avg_size": 0, "columns": ["\\"c.ol3_\U0001F6142\\""], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 30699, "histo_col_type": "", "name": "__auto__", "null_count": 1476, "row_count": 80000}, {"avg_size": 24, "columns": ["col3_3"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 49821, "histo_buckets": [{"distinct_range": 0, "num_eq": 30000000, "num_range": 0, "upper_bound": "-Infinity"}, {"distinct_range": 100000, "num_eq": 2926375379866516846, "num_range": 100000, "upper_bound": "-40698673.17526525086"}, {"distinct_range": 1753840034007884000, "num_eq": 70000000000, "num_range": 1803894227863622598, "upper_bound": "0.948115177923714049"}, {"distinct_range": 538439012605034240, "num_eq": 800000, "num_range": 3209972298610922273, "upper_bound": "702309872799333.8804"}, {"distinct_range": 9000, "num_eq": 3395239796281062230, "num_range": 9000, "upper_bound": "50673311102899129.03"}, {"distinct_range": 203377026935488640, "num_eq": 2820429391038007579, "num_range": 322438373180811268, "upper_bound": "Infinity"}], "histo_col_type": "DECIMAL", "name": "__auto__", "null_count": 0, "row_count": 80000}, {"avg_size": 19, "columns": ["col3_4"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 4152, "histo_col_type": "", "name": "__auto__", "null_count": 45549, "row_count": 80000}, {"avg_size": 24, "columns": ["col3_10"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 20507, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 80000}, {"avg_size": 6, "columns": ["col3_11"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 67976, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 80000}, {"avg_size": 0, "columns": ["col3_12"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 43379, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 80000}, {"avg_size": 10, "columns": ["\\"\\\\v\\u000ccol3_1\\""], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 44499, "histo_col_type": "", "name": "__auto__", "null_count": 45297, "row_count": 80000}, {"avg_size": 27, "columns": ["\\"co|l 3_5\\""], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 25447, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 80000}, {"avg_size": 23, "columns": ["col3_6"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 6118, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 80000}, {"avg_size": 25, "columns": ["col3_7"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 78179, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 80000}, {"avg_size": 11, "columns": ["col3_8"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 48871, "histo_buckets": [{"distinct_range": 0, "num_eq": 3000000000, "num_range": 0, "upper_bound": ""}, {"distinct_range": 1718053184766856700, "num_eq": 975858366786878621, "num_range": 7779754335518132691, "upper_bound": "08N\\u001c"}, {"distinct_range": 1000000000, "num_eq": 10000000, "num_range": 1000000000, "upper_bound": "Q9"}, {"distinct_range": 50000000000, "num_eq": 2000, "num_range": 50000000000, "upper_bound": "SY\\u0014."}], "histo_col_type": "STRING", "name": "__auto__", "null_count": 0, "row_count": 80000}, {"avg_size": 5, "columns": ["col3_9"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 25511, "histo_col_type": "", "name": "__auto__", "null_count": 15648, "row_count": 80000}]':::JSONB;
    rsg_test.go:706: CREATE TYPE rand_typ_0 AS ENUM ('cqyz', 'sv', 'crfmw', 'prxn', 'al');
    rsg_test.go:706: CREATE TYPE rand_typ_1 AS ENUM ('bmp', 'k', 'coeh');
    rsg_test.go:706: SET sql_safe_updates = false;;
    rsg_test.go:706: 
        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:706: ALTER TABLE seed SPLIT AT VALUES (7102225136681485687);
    rsg_test.go:706: ALTER TABLE seed SPLIT AT VALUES (8808206068886715535);
    rsg_test.go:706: ALTER TABLE seed SPLIT AT VALUES (31378168709367184);
    rsg_test.go:706: ALTER TABLE seed SPLIT AT VALUES (302741093100972421);
    rsg_test.go:706: ALTER TABLE seed SPLIT AT VALUES (1287069784522742124);
    rsg_test.go:706: ALTER TABLE seed SPLIT AT VALUES (504768838526355166);
    rsg_test.go:706: ALTER TABLE seed SCATTER;
    rsg_test.go:708: 
    rsg_test.go:709: -- test log scope end --
test logs left over in: /artifacts/tmp/_tmp/d437d2c847dfedbc4972f231c3331c8e/logTestRandomSyntaxSQLSmith55700224
--- FAIL: TestRandomSyntaxSQLSmith (371.74s)
Help

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

/cc @cockroachdb/sql-foundations

This test on roachdash | Improve this report!

Jira issue: CRDB-32369

@cockroach-teamcity cockroach-teamcity added branch-master Failures and bugs 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 Oct 14, 2023
@cockroach-teamcity cockroach-teamcity added this to the 23.2 milestone Oct 14, 2023
@rafiss rafiss changed the title sql/tests: TestRandomSyntaxSQLSmith failed sql/tests: TestRandomSyntaxSQLSmith failed [comparison overload not found (eq, refcursor, refcursor)] Oct 16, 2023
@rafiss rafiss added O-rsg Random Syntax Generator T-sql-queries SQL Queries Team and removed T-sql-foundations SQL Foundations Team (formerly SQL Schema + SQL Sessions) labels Oct 16, 2023
@github-project-automation github-project-automation bot moved this to Triage in SQL Queries Oct 16, 2023
@yuzefovich yuzefovich moved this from Triage to Active in SQL Queries Oct 16, 2023
DrewKimball added a commit to DrewKimball/cockroach that referenced this issue Oct 19, 2023
This patch adds back the comparison functions for the `REFCURSOR` data
type, since there are various points within the codebase where we rely
on their existence. Users are still not allowed to use the comparison
functions, but now this is checked during type-checking of the AST,
rather than at execution-time. This should avoid internal errors from
places in planning and execution that expect comparison overloads to
exist, but also maintains parity with postgres.

Fixes cockroachdb#112365
Fixes cockroachdb#112642
Fixes cockroachdb#112362
Fixes cockroachdb#112368

Release note: None
craig bot pushed a commit that referenced this issue Oct 23, 2023
112725: sql: disallow refcursor comparisons during type-checking r=DrewKimball a=DrewKimball

This patch adds back the comparison functions for the `REFCURSOR` data type, since there are various points within the codebase where we rely on their existence. Users are still not allowed to use the comparison functions, but now this is checked during type-checking of the AST, rather than at execution-time. This should avoid internal errors from places in planning and execution that expect comparison overloads to exist, but also maintains parity with postgres.

Fixes #112365
Fixes #112642
Fixes #112362
Fixes #112368

Release note: None

112891: sql: fix for crash with null elements on jsonb_array_to_string_array r=maryliag a=maryliag

Fixes #112829

The builtin `jsonb_array_to_string_array` was crashing, when it had `null` elements. This commit handles this case, removing them from the final array.

Release note: None

112893: kv: tolerate lock acquisition replay with writes in same batch r=arulajmani a=nvanbenschoten

Informs #112221.
Informs #112174.
Informs #112173.
Informs #111984.
Informs #111893.
Informs #111564.
Informs #111530.

This commit fixes the handling of replayed batches that contain a replicated lock acquisition and a later write to the same key. In such cases, the write at the higher sequence number should not be detected as an error during the replay. Instead, it should simply be ignored.

Release note: None

Co-authored-by: Drew Kimball <[email protected]>
Co-authored-by: maryliag <[email protected]>
Co-authored-by: Nathan VanBenschoten <[email protected]>
@craig craig bot closed this as completed in 6c0823f Oct 23, 2023
@github-project-automation github-project-automation bot moved this from Active to Done in SQL Queries Oct 23, 2023
blathers-crl bot pushed a commit that referenced this issue Oct 23, 2023
This patch adds back the comparison functions for the `REFCURSOR` data
type, since there are various points within the codebase where we rely
on their existence. Users are still not allowed to use the comparison
functions, but now this is checked during type-checking of the AST,
rather than at execution-time. This should avoid internal errors from
places in planning and execution that expect comparison overloads to
exist, but also maintains parity with postgres.

Fixes #112365
Fixes #112642
Fixes #112362
Fixes #112368

Release note: None
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
branch-master Failures and bugs on the master branch. C-test-failure Broken test (automatically or manually discovered). O-robot Originated from a bot. O-rsg Random Syntax Generator release-blocker Indicates a release-blocker. Use with branch-release-2x.x label to denote which branch is blocked. T-sql-queries SQL Queries Team
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants