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

version upgrade failure: jsonb columns are not indexable #101409

Closed
rharding6373 opened this issue Apr 13, 2023 · 3 comments
Closed

version upgrade failure: jsonb columns are not indexable #101409

rharding6373 opened this issue Apr 13, 2023 · 3 comments
Labels
C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. T-sql-queries SQL Queries Team

Comments

@rharding6373
Copy link
Collaborator

rharding6373 commented Apr 13, 2023

An acceptance/version-upgrade test failed with the error that jsonb columns are not indexable.

Link to test failure: https://teamcity.cockroachdb.com/viewLog.html?buildId=9576487&tab=buildResultsDiv&buildTypeId=Cockroach_Ci_Tests_LocalRoachtest

The relevant log is in artifacts acceptance/version-upgrade/run_1/artifacts.zip!/run_233330.190485602_n1_workload-run-schemac.log

Error:

Error: ***UNEXPECTED ERROR; Received an unexpected execution error.: ERROR: unimplemented: the following columns are not indexable due to their type:  col8_15 (type jsonb), col8_17 (type jsonb)

The table:

CREATE TABLE public.table8 (\"c,ol8_9\" REGCLASS NOT NULL, 
col8_10 STRING NOT NULL, 
\"col8_'11\" NAME NOT NULL, 
col8_12 TIMESTAMPTZ NOT NULL, 
\"col8\\\\xcb_13\" STRING NOT NULL, 
col8_14 TIME NOT NULL, 
\" col8_15\" JSONB NOT NULL, 
col8_16 REGTYPE NOT NULL, 
col8_17 JSONB NOT NULL, 
col8_18 STRING NOT NULL AS (lower(CAST(col8_14 AS STRING))) VIRTUAL, 
col8_19 STRING NOT NULL AS (lower(col8_10)) STORED, 
col8_20 STRING NOT NULL AS (lower(CAST(col8_14 AS STRING))) VIRTUAL, 
col8_21 STRING AS (lower(col8_10)) VIRTUAL, 
\" col8_22\" STRING NOT NULL AS (CASE WHEN col8_16 IS NULL THEN e'bx\\x0e/;:':::STRING ELSE NULL END) STORED, 
\" col8_23\" STRING NOT NULL AS (lower(\"col8\\\\xcb_13\")) VIRTUAL, 
PRIMARY KEY (col8_20 DESC, col8_19 ASC, col8_16 DESC, col8_14 DESC, \" col8_15\" DESC, col8_10 DESC, \" col8_22\", \"col8\\\\xcb_13\", \" col8_23\" DESC, col8_17 DESC, \"c,ol8_9\"), UNIQUE (col8_10 ASC, \" col8_15\" DESC, col8_12 DESC, \" col8_22\" ASC, col8_17, col8_18 DESC, col8_20 ASC), 
INDEX (col8_20 DESC, \"col8_'11\" ASC, col8_14, \"c,ol8_9\", col8_17 DESC, \" col8_15\" ASC, col8_16) PARTITION BY LIST (col8_20, \"col8_'11\", col8_14, \"c,ol8_9\", col8_17, \" col8_15\", col8_16) (PARTITION \"'table8_part0\" VALUES IN (('':::STRING, 'X':::STRING:::NAME, '10:00:06.76582':::TIME, 2600702106:::OID, '{\"9LCw\": {\"OjN\": 0.07374504831806905, \"a\": {\"TGcswf\": \"ZyG\"}, \"bar\": true, \"rJ\": null, \"y1HEJHITO\": null, \"zqpTyu\": {\"JnqFjjGv\": [false], \"b\": false}}, \"bar\": {\"4zALV2RDs\": false, \"foo\": false}, \"foobar\": {\"c\": null}, \"gGaW\": true}':::JSONB, '[{\"a\": \"c0S\"}, false, 0.7629149440371806]':::JSONB, 794549574:::OID), (e'/\u0026bLh_\\b':::STRING, e'\\'':::STRING:::NAME, '19:33:59.259118':::TIME, 950189545:::OID, '[[[{\"c\": 1.0116605806106482}, \"yySyp\", false], 0.6716530090195665, null, 1.4705149640320183], 0.12926068775956495, null]':::JSONB, '{\"KHk\": \"HkBLG\", \"bar\": {\"4S\": true, \"baz\": \"zMkcx\"}, \"uw\": null}':::JSONB, 0:::OID), ('b $':::STRING, '':::STRING:::NAME, '22:48:51.697675':::TIME, 1926874930:::OID, '[true, null]':::JSONB, '[null]':::JSONB, 2149210832:::OID), ('':::STRING, e'\\x1eyH\\n\\x04!,x':::STRING:::NAME, '21:25:02.00536':::TIME, 583690745:::OID, '\"uAjZHkn\"':::JSONB, '[null, [null, \"bar\"], {\"baz\": false, \"c\": null}, 0.30458910773638903, null]':::JSONB, 3192361523:::OID), (e'\\x7f\\b:s\u003eJ':::STRING, e'R1p\\x0b':::STRING:::NAME, '19:24:13.690065':::TIME, 3486959474:::OID, '1':::JSONB, '{\"0LX\": {\"ARAqg944\": {\"b\": \"IU03\", \"baz\": [[[\"T3I4t8uq\"], false, true], {\"Uio\": \"NdIdu\"}, null, null], \"foobar\": true}, \"c\": [false, \"biJQDcH\"], \"foo\": true, \"foobar\": [true]}, \"SgBSAB\": [[\"YCE\", null, false], [true], \"bar\", true], \"Xv\": {\"1Wj\": 1.0540767995000688, \"aFYgb\": null}, \"b\": false, \"baz\": {\"Tjs\": \"foobar\", \"bar\": 1.2927819435734698, \"mihn6\": 0.9822589300387248}, \"c\": null, \"hiI\": true}':::JSONB, 32342661:::OID), (e'\\x1b\\x18':::STRING, e'\\x18':::STRING:::NAME, '00:00:00':::TIME, 2039443332:::OID, '[[false], {\"xprhbuOf\": false}, true]':::JSONB, '{\"I9mFx\": false, \"b\": {\"c\": 1.0939701202579026, \"x0ESE\": {\"a\": null}}, \"foo\": false}':::JSONB, 426534776:::OID), ('c':::STRING, e'\\x04':::STRING:::NAME, '00:35:48.077364':::TIME, 4037475820:::OID, '{}':::JSONB, '[true]':::JSONB, 2309125914:::OID), ('$MaU':::STRING, '4D`':::STRING:::NAME, '15:56:41.481802':::TIME, 0:::OID, '[{\"BKEm334u1\": {\"b\": false, \"c\": false}, \"ECRbDFE1\": null, \"bqhd\": {\"Uq\": {\"baz\": true, \"mxRbDXWqB\": false}, \"a\": \"YtswdXRs\", \"foo\": [false]}}, true, true, true, null]':::JSONB, '[[\"Vqtcl\", 0.03037080949885307, 0.13694484277045346], \"foobar\", 1.5288959820026733]':::JSONB, 440075764:::OID)), PARTITION \"'table8_part1\" VALUES IN ((e'9\\x17\\x1b':::STRING, e'\u003cX9p\\x19[Ax2':::STRING:::NAME, '13:42:03.727127':::TIME, 1919034598:::OID, '[[true, 0.13391839800980487], null, null, \"foobar\"]':::JSONB, '[false, null]':::JSONB, 3048301088:::OID), (e';\\x12@':::STRING, e'\\x02':::STRING:::NAME, '20:04:07.107819':::TIME, 0:::OID, '[[\"luWYcqp\", true], {\"gO\": false, \"vqQ76ie\": false}, false, true]':::JSONB, 'false':::JSONB, 3635221299:::OID), (e'\\x1aU\\x05|}':::STRING, e'YS\\x0b\\td\\x01':::STRING:::NAME, '12:03:27.270208':::TIME, 773536177:::OID, '{\"foo\": false, \"foobar\": {\"b\": 0.646949502589768, \"foobar\": false}, \"h4v\": true}':::JSONB, '[{\"699DlfX\": null, \"baz\": [[false], {\"b\": null}, 0.4166223813819381, true, 0.6337801261809504]}, [null, null], true, true, true]':::JSONB, 2601560320:::OID), (e'\\x19S#\\x1e1\\fJ}':::STRING, e'ar3\\x02':::STRING:::NAME, '19:37:07.623796':::TIME, 0:::OID, '1':::JSONB, '{\"X7eGAs\": false, \"bar\": \"ZlmCyJxYY\", \"foobar\": {\"SPt1H\": 0.20892307043754998, \"foo\": \"a\"}, \"gcy8FsO\": null}':::JSONB, 1727479527:::OID), ('Z':::STRING, e'A~\\\\tVvIN\\b':::STRING:::NAME, '13:02:41.947093':::TIME, 146417145:::OID, '1':::JSONB, '{\"test\": \"json\"}':::JSONB, 2302491708:::OID), (e'U\\x0f\\x11,\\\\,N6]':::STRING, e'v\\x1ftg@':::STRING:::NAME, '23:07:51.911883':::TIME, 2192400169:::OID, '{\"2jhc\": null, \"baz\": {\"ecACkC\": 0.35854567271971705}}':::JSONB, '[{\"31b\": {\"Bk2g2rCU\": {\"foo\": null}, \"PJ7dZPt\": {\"Tv\": false, \"WvLCF4pD\": false, \"hLSaVq3\": true}, \"bar\": false, \"c\": \"5wXCZKH\"}, \"8woUS\": true, \"a\": null}, {\"J2kA\": true, \"ZKH\": \"c\", \"c\": null}, [false], true, false]':::JSONB, 2848213412:::OID), (e'gMU\\x15':::STRING, '\"':::STRING:::NAME, '24:00:00':::TIME, 846815030:::OID, '{\"c\": false, \"foobar\": true, \"vU76F\": \"f3F\"}':::JSONB, '[{\"h8zvcSa\": \"xonp\"}, false, [null, false], false, false]':::JSONB, 515673703:::OID), (e'\\x00':::STRING, e'\\x167\\x03\\x1b\u003c\u003e@':::STRING:::NAME, '13:44:50.359118':::TIME, 3111133756:::OID, '{\"7OR1rgz8K\": {\"sUdfsD\": \"rXWU2ECmh\"}, \"a\": 0.49148547827811395, \"foo\": false, \"vdBYdZT\": null, \"wZHP\": [{\"fWaK\": null}, true]}':::JSONB, '{\"1q\": null, \"a\": {\"LB\": {\"Vq4Wgd4xd\": 0.543226015972135}, \"b\": true}, \"baz\": [\"b\"], \"ogdNVWKld\": {\"baz\": \"b\"}}':::JSONB, 608542082:::OID)), PARTITION \"'table8_part2\" VALUES IN ((e'\\x07\\x02\\x0f\"a\\x01/D':::STRING, '':::STRING:::NAME, '17:34:40.611611':::TIME, 1539456722:::OID, 'true':::JSONB, '[0.12493464908115438, null, \"GyTZd0Yjd\"]':::JSONB, 307874298:::OID), (e'0`\\x0eHDNh\\x13':::STRING, 'd`':::STRING:::NAME, '13:50:33.399319':::TIME, 1880369357:::OID, '{\"5AOC1jI\": true, \"MZIDdCq\": null, \"a\": 0.43469299994589783, \"bar\": \"B8\"}':::JSONB, '{\"03Z3SY\": true, \"4NSPevlq\": 1.7299465238613219, \"8vJ1yKi\": {\"a\": null, \"foobar\": {\"c\": false, \"foobar\": null}, \"pi8D0LAB\": false}, \"BNKoxYz\": [1.4739524032193352, 3.9661343821120827], \"a\": 2.6902493110005947, \"c\": false}':::JSONB, 282756815:::OID), (e'UgZ\"F@5\\x1f':::STRING, e'\\x10(P.z\\x1f?':::STRING:::NAME, '21:29:10.677226':::TIME, 0:::OID, '{\"bar\": {\"foo\": 0.9082623898547466, \"ptevx\": \"baz\"}, \"baz\": 1.611228159670961, \"pbEp\": true}':::JSONB, '{\"CEP\": [2.872921923207434, \"foo\", false], \"RSnXxhm\": 0.28409757747550823, \"lnby\": 0.6428769187585414}':::JSONB, 3160082283:::OID), ('\u003c:thr$':::STRING, '':::STRING:::NAME, '06:23:17.057478':::TIME, 2482757034:::OID, '[{\"su4b\": 1.685173939689231}, false, 0.7268035710509573]':::JSONB, '[[{\"38\": [\"a\"], \"GXJrg\": true, \"c\": [null, 1.9506290537833015], \"pyV9g\": {\"c\": false, \"ct\": false}, \"zd\": null}, true, 0.2593916042197408, null], {\"E32Md2d\": null, \"QcNjGGjbu\": false, \"SFUkXX\": [0.6039186214636483]}, null, 0.0805617297443384, null]':::JSONB, 1037796576:::OID), ('h^\u003c':::STRING, 'R':::STRING:::NAME, '02:21:43.558527':::TIME, 899749904:::OID, '{\"E4L2d6Wm3\": \"qaY4boXGn\", \"Ng\": {\"bar\": true, \"baz\": true}, \"wpLV\": false}':::JSONB, '[[null], false, null]':::JSONB, 35679355:::OID), ('':::STRING, '\"':::STRING:::NAME, '21:35:23.287633':::TIME, 1632896085:::OID, '{\"c\": 0.6142753176990887, \"foo\": {\"009YqM\": \"Anufif1\", \"MdG60LcP\": null, \"a\": {\"b\": \"foobar\", \"s0Ic\": 1.0022638194355065}, \"bar\": {\"foo\": true}, \"baz\": [{\"foobar\": \"HUp2\", \"x9\": 0.049689159205236866}, {\"foo\": null, \"foobar\": true}, true], \"foo\": {\"ZOeCT92\": true, \"sF8B\": \"bar\"}}}':::JSONB, '{\"WbGH\": {\"se\": \"Iz\"}, \"foobar\": 1.5161689894741457}':::JSONB, 3240127678:::OID), (e')ve\\x18^\"mX':::STRING, 'b':::STRING:::NAME, '15:16:54.918511':::TIME, 0:::OID, '{\"BgWTY\": {\"foo\": 0.9645774784994621, \"foobar\": null, \"lcKBsrfM7\": \"foobar\"}, \"c\": null}':::JSONB, '{\"a\": null, \"foo\": {\"QlP\": [\"c\", null], \"aO\": null, \"foobar\": 1.5564514381971413, \"k1nq9\": null}}':::JSONB, 1734411295:::OID), ('x':::STRING, e'\\t4':::STRING:::NAME, '00:02:52.575809':::TIME, 0:::OID, '[true, true, {\"baz\": false, \"uXMisb\": false}, \"7IUA1rr\"]':::JSONB, '[true, [null, true], null, true]':::JSONB, 0:::OID)), PARTITION \"'table8_part3\" VALUES IN ((e'\\x0e?':::STRING, '':::STRING:::NAME, '17:08:47.100038':::TIME, 1976994654:::OID, '{\"c\": true, \"foo\": {\"foo\": true}, \"foobar\": true}':::JSONB, '{}':::JSONB, 3607158801:::OID), ('a':::STRING, '@ m':::STRING:::NAME, '06:02:48.413748':::TIME, 4142299340:::OID, '[{\"bar\": {\"VhhRG\": 0.6492711680832801, \"foobar\": null}, \"c\": false, \"foo\": false}, [\"foobar\"], true]':::JSONB, '[null, \"7Jk\"]':::JSONB, 951570661:::OID), (e'\\x1eaQ:':::STRING, e'\\x1b6%m\\f':::STRING:::NAME, '19:06:36.47125':::TIME, 1566712266:::OID, '{\"308wA\": true, \"Rze\": [true, false, false], \"ookwi1m\": 0.599945174466211}':::JSONB, '{}':::JSONB, 1863386621:::OID), (e'{7:XBX\\x14HQ':::STRING, '+0ep':::STRING:::NAME, '03:38:13.339792':::TIME, 0:::OID, '[[[1.4783673761250025, false], [[\"b\"], null, true, \"foo\"], \"J1\"], {\"Cv0OUJ\": true, \"b\": true, \"c\": false}, {\"bar\": true, \"f0yWzh\": false}, {\"baz\": false, \"foobar\": null}, null, 4.583539081792697, true]':::JSONB, '{\"20pRf\": \"z86vFajoa\", \"EaSmG\": \"MxGik\", \"baz\": null}':::JSONB, 298796027:::OID), (e'OP8=3\\\\9':::STRING, e'\\'':::STRING:::NAME, '13:45:19.962544':::TIME, 4262599557:::OID, '[[[true, false], [true, \"jv\"], true, true], \"Xi0gnPp7d\"]':::JSONB, '{\"6KFfsm\": {\"deLs\": false}, \"GBiN\": {\"SXHDziHW\": null, \"d0uWW\": true, \"x91XXUOPQ\": \"CU3\"}, \"a\": [[0.8966558320829164, null], null, true, null], \"c\": null, \"foo\": false, \"foobar\": 2.284618851778891}':::JSONB, 3869224512:::OID), (e'0WWw\\tL':::STRING, e'6I4])]zb\\\\':::STRING:::NAME, '07:19:30.757727':::TIME, 762285767:::OID, '{\"c\": [\"b\"], \"dFu8a4oD\": 1.4526821704577086}':::JSONB, '[null, [true], true, 3.6710916050890607]':::JSONB, 896299359:::OID), (e'V]\\x025':::STRING, 'O':::STRING:::NAME, '06:50:07.761618':::TIME, 606147913:::OID, '1.5754036883642766':::JSONB, '{\"K9ZPjCt6\": false, \"NY5Izmo3\": {\"WC\": \"OnUy\", \"bar\": 0.6780290323029126}, \"bar\": null, \"baz\": 0.8378962407243182}':::JSONB, 3615649025:::OID), (e'\\tHl#5}\\x17':::STRING, '{':::STRING:::NAME, '10:13:01.622888':::TIME, 1397277712:::OID, '[{\"FL6\": {\"2ebdhDJPi\": null, \"b\": null}, \"b\": [null, 0.01064419516014603], \"foo\": [0.807604307419206], \"m6hvGT\": 0.7018069423475046}, null, null]':::JSONB, '0.10369918448914715':::JSONB, 4227366328:::OID)), PARTITION \"'tabLe8_part4\" VALUES IN (('[EXN1(':::STRING, e'CB-#\\x0e\\'\\'xY':::STRING:::NAME, '10:29:21.41778':::TIME, 0:::OID, '1':::JSONB, '{\"1cqvaNse\": \"bar\", \"KTVH\": 2.0122123314755984, \"foobar\": false, \"kbn78\": 0.03235425095602551}':::JSONB, 3429763352:::OID), (e'\\'':::STRING, e'\\x15$k`Qr\\x04':::STRING:::NAME, '09:50:54.709397':::TIME, 2764362743:::OID, '{\"6gf\": \"a\", \"yEw9Xwd\": {\"cz1GJL9cd\": \"OZvy\"}}':::JSONB, '[false, 1.4165895269186632, false]':::JSONB, 719177325:::OID), ('':::STRING, e'\\x14\\x1as\\x18FrPg\\x04':::STRING:::NAME, '05:53:33.639873':::TIME, 0:::OID, '1':::JSONB, '[0.29801390332388744]':::JSONB, 3074566512:::OID), (e'\\x04\\x17.\\x18W\\x18':::STRING, e'q\\x18t:j+0':::STRING:::NAME, '20:48:53.46783':::TIME, 3560039826:::OID, '{\"baz\": true, \"c\": [false, null], \"fcc\": \"a\"}':::JSONB, '{\"baz\": true, \"foobar\": false, \"hGS\": [\"iTYJDPls\"]}':::JSONB, 2129786060:::OID), (e'B\\x7f':::STRING, e'.\\x02L\\x0b\\x7f ':::STRING:::NAME, '20:58:52.12484':::TIME, 2456267793:::OID, '{}':::JSONB, '[{\"X9Hg\": {\"a\": true}, \"nOIOHwN\": null}, {\"UQg4SO\": false, \"c\": true, \"y9lyQbn7g\": null}, false, null]':::JSONB, 105640571:::OID), ('':::STRING, e'\\'':::STRING:::NAME, '09:16:50.331306':::TIME, 915027807:::OID, '2.615468284971855':::JSONB, '{\"b\": {\"GYp\": 0.08539145482130167, \"a\": 0.3270428869531321, \"ryiEr9\": \"sKRv\"}, \"jpsR\": \"pQ\"}':::JSONB, 55035737:::OID), (e'\\x01\\x12\\n%\\x02$C\\x1f':::STRING, e'OaY\\x0e\\x1aH\\x06c':::STRING:::NAME, '15:30:09.004634':::TIME, 1270795123:::OID, '{\"QR84d\": 0.2081965084149398, \"a\": 1.779518145471957, \"s2zaeIZh\": [true]}':::JSONB, '{\"baz\": 0.033363878409160275}':::JSONB, 0:::OID), ('o{m':::STRING, e',Ao\\x04u.\\x1ba':::STRING:::NAME, '18:13:03.744557':::TIME, 342519788:::OID, '{\"MeaPcT8\": true, \"TEEht\": \"foo\", \"bar\": true}':::JSONB, '{\"bar\": \"c\"}':::JSONB, 2152656746:::OID)), PARTITION \"'table8_part5\" VALUES IN (('T2\u0026C':::STRING, 'n':::STRING:::NAME, '04:12:57.451912':::TIME, 2333774470:::OID, 'null':::JSONB, '{\"test\": \"json\"}':::JSONB, 2450328278:::OID), (e'\\x140\\x17xS\\x12?':::STRING, e'^\\x11!\\x7f$=\u003e\\x1f$':::STRING:::NAME, '03:34:12.62914':::TIME, 3620061015:::OID, '[{\"8oy85\": 0.9088676510101299}, [true], [false], false]':::JSONB, '[[{\"bar\": \"gV\", \"baz\": \"a\"}, {\"foo\": \"z69\"}, null, true], {\"a\": \"foo\", \"b\": false, \"c\": {\"bar\": 3.164416120569107, \"foobar\": true, \"kP3AiepK\": false}}, [0.09279273505710078], null]':::JSONB, 1793324843:::OID), (e'L\\x1bQ9?zS\\x1e':::STRING, e'\\x0b\\x03\\x0bc':::STRING:::NAME, '22:19:03.892424':::TIME, 796378909:::OID, '[0.7634120263337554]':::JSONB, '{\"baz\": {\"PQqJ7pWpA\": 1.1442735242046087, \"baz\": \"XJOy8X1UP\", \"foo\": \"baz\"}, \"fBzG3sRfO\": true}':::JSONB, 1626305419:::OID), ('':::STRING, '\"':::STRING:::NAME, '00:00:00':::TIME, 2808485449:::OID, '{\"b\": null, \"foobar\": \"bpA8Vyw6l\"}':::JSONB, '{\"6Z\": {\"a\": null, \"b\": false}, \"7lf5UF\": [[true, true], 0.46792358854314203], \"HYCW5WMK\": 1.8643190627780455, \"M58r4eBUR\": null, \"b\": \"LFih\", \"foo\": [[true, false], 0.10347757260054248]}':::JSONB, 2881973539:::OID), (e'\\x03r':::STRING, e'F\\x0f':::STRING:::NAME, '20:49:49.528749':::TIME, 1946664431:::OID, '{\"CnysBp\": \"aPUIPY\", \"c\": true, \"foo\": false, \"iLW\": [{\"44UB0\": null, \"53JF6rO\": false, \"Kl1xg8bZ\": null, \"c6GfrxF\": null}, false, null, true]}':::JSONB, '[false, {\"jKkLmc1d\": 0.4514478844963654, \"krji5OZ\": null, \"nSeynrS\": \"k02qOi9pL\"}, \"a\"]':::JSONB, 2042501412:::OID), ('':::STRING, e'\\x06g$\\x12y~+E':::STRING:::NAME, '16:27:14.041735':::TIME, 341645488:::OID, '[{\"ACZdLB\": \"w847k1F6j\", \"aNEyKv\": null}, false]':::JSONB, '{\"baz\": false, \"dICAsQmF\": null, \"foo\": {\"b\": 0.22871202678109415, \"dR\": \"Ha\", \"xKvCN\": {\"c\": \"c\", \"f5XH\": 1.3128851841546127}}}':::JSONB, 87743446:::OID), ('Ru4\u003eE_':::STRING, '68=':::STRING:::NAME, '21:05:38.424043':::TIME, 4143556170:::OID, '{\"a\": true, \"baz\": true}':::JSONB, '{\"5iitS2Rl\": \"xB\", \"foobar\": {\"D9\": \"foobar\", \"foobar\": {\"rRSV\": \"F5NVSOXg\"}}}':::JSONB, 2032523502:::OID), (e'\\x10KZ;B\\x18|':::STRING, e'\\x16HzH\\tq({k':::STRING:::NAME, '21:09:16.153153':::TIME, 0:::OID, '[{\"VLy4eH0AL\": 2.953246350540544, \"baz\": 0.5165166277462545}, null, false]':::JSONB, '[\"foobar\", {\"giXL7\": 0.013147833177762247}, true]':::JSONB, 3581373363:::OID)), PARTITION \"'table8\u000c_part6\" VALUES IN (('wX':::STRING, e'\\'U!J\\x12\\x01kc\\x11':::STRING:::NAME, '13:32:49.349586':::TIME, 0:::OID, '[null, \"bar\"]':::JSONB, '[{\"2l7\": \"c\", \"CaoaGJs7\": null}, [true, 0.6512746738635405], true, 0.5037533695782733]':::JSONB, 31947788:::OID), (e'\\'\\x0e\\x02^?\\r':::STRING, e'=]\\x14\\x01r,V\\x12':::STRING:::NAME, '16:25:49.96079':::TIME, 788829521:::OID, '{\"b\": true, \"foo\": null}':::JSONB, '[{\"bar\": false, \"c\": null, \"foo\": 0.903590310193391, \"foobar\": true}, false, true]':::JSONB, 3815390980:::OID), (e'[+\"COX\\x0e':::STRING, e'r^2Zb,G\\x11':::STRING:::NAME, '16:54:06.180411':::TIME, 3537569642:::OID, '[null]':::JSONB, '{\"XE\": [{\"NOlZ6Ff\": {\"b\": null}, \"c\": [\"BxsA\"], \"vWLWSVe\": 3.041320533147812}, {\"baz\": null}, \"c\"], \"ZYD\": true, \"c\": null, \"ef\": [false]}':::JSONB, 0:::OID), ('\"':::STRING, e'Fon\\b;\\x11/':::STRING:::NAME, '24:00:00':::TIME, 2957796832:::OID, '{}':::JSONB, '[{\"b\": [\"TCS9\", null], \"baz\": \"gSRlkZr6e\", \"foobar\": false, \"u8ID8Rk1Z\": null, \"xUbj\": \"wg\"}, \"5pqfIi7or\", null, true]':::JSONB, 0:::OID), (e'\\fV5%':::STRING, e'!~\\x06\\x0f\\x0e\\x1f':::STRING:::NAME, '22:44:38.748218':::TIME, 2217095447:::OID, '[[[false, true, \"UFmNQ5lNx\"], {\"bar\": true, \"foobar\": true}, false], 0.3925060381821457, 3.7440538040954063, null]':::JSONB, '[{\"7VxJtgFdP\": {\"Dzylq\": \"fRqZJrrk\", \"Nzzit\": 0.9257881187437551}, \"SIzt\": true, \"baz\": null}, {\"c\": true, \"nwsPMZCC3\": true, \"qfZL\": \"Qri\"}, false, false]':::JSONB, 316602826:::OID), (e'\\x1dJ\\x17\\x06\\x1b#y':::STRING, e'\\x1b4@':::STRING:::NAME, '10:03:46.824103':::TIME, 498043404:::OID, '{\"51TNBij\": {\"PMhpoBfVt\": [\"foo\"], \"bar\": {\"foobar\": null, \"ymm5DrB\": false}, \"baz\": \"foo\", \"wr86iedu4\": [false, \"foobar\"]}, \"b\": true, \"foo\": [true], \"kd\": \"baz\"}':::JSONB, '{\"ayrwHw\": null, \"bar\": true, \"dDq\": false, \"f1\": {\"foo\": true, \"pzBUEy\": false}, \"foo\": false, \"foobar\": false, \"nGMfVnp\": false}':::JSONB, 2184537914:::OID), (e'3-#\\x10EA2':::STRING, e'wh\\x1b+mt\\x02\\x12':::STRING:::NAME, '00:49:31.591026':::TIME, 4156790847:::OID, '[[[false, 0.8102510700237039], [true, false, null], 0.05395502786943976], null, \"foo\", null]':::JSONB, '[{\"PSg1\": false, \"W1PdDyP\": false, \"nhLIk\": 1.7055788593774162}, [[0.29588480728948136, null], true, 2.8481364979878814], [{\"Hd3BjEUVS\": 1.3526218945084654, \"guR\": false}, null], {\"c\": null}, [null], 2.8051200755344867]':::JSONB, 0:::OID), (e'\\x04#q?7':::STRING, '':::STRING:::NAME, '11:25:49.947886':::TIME, 4179276986:::OID, '[{\"1ncZvFE\": null, \"zlKri6\": false}, false]':::JSONB, '{\"CuwFV2nxp\": {\"b\": 3.900371017110597, \"baz\": true}, \"LTebUtz\": null, \"OtiyPfEoh\": true, \"xcs\": true}':::JSONB, 3276836044:::OID)), PARTITION \"'table8_part7\" VALUES IN ((e'\\x1f)t/\\x19B':::STRING, '=':::STRING:::NAME, '12:08:35.019449':::TIME, 1591976567:::OID, '[\"JwIyKT\", [[null], null, false], null, null]':::JSONB, '{\"baz\": \"EZZT0O\", \"hMBHL\": 1.5309821280365756}':::JSONB, 2364076774:::OID), (e'4/\\x07Q\\x03':::STRING, '\"':::STRING:::NAME, '19:30:55.909637':::TIME, 3020501991:::OID, '{\"45SJ\": {\"XozMY\": 0.08959091303046726, \"a\": null, \"foobar\": false}, \"foo\": 0.3888183388247972}':::JSONB, '{\"1bSWJ\": 0.04406975027882076, \"T1L\": \"c\", \"WlU\": \"kFt6oB\", \"X2WlK\": [true], \"bar\": null, \"baz\": null}':::JSONB, 1516799656:::OID), (e'\\'':::STRING, ')zj6tGN**':::STRING:::NAME, '08:01:18.224771':::TIME, 451514374:::OID, '[null]':::JSONB, '{\"MhPDx4XKN\": {\"Px\": \"baz\", \"pQhizbc\": null}, \"R1MUK\": true, \"baz\": null}':::JSONB, 1627141796:::OID), (e'y\\tG\\x16[':::STRING, e'\\x03.,i/\u0026':::STRING:::NAME, '24:00:00':::TIME, 2293224426:::OID, '{\"3uAQgMEW\": true, \"WDk\": true, \"baz\": \"G8QLZ\"}':::JSONB, '[[null, 1.6182357612321983], [[null], {\"AGuNDN\": \"baz\"}, null], {\"baz\": 0.6249874945374003}, 0.06523124435730404]':::JSONB, 469374897:::OID), (e'Q!Y\\x7fdO\\x10K':::STRING, e'z8L\\x06\\x06 u':::STRING:::NAME, '13:29:27.902843':::TIME, 3124916682:::OID, 'true':::JSONB, '[null]':::JSONB, 2353864012:::OID), ('':::STRING, e'*ql\\x03t2':::STRING:::NAME, '06:18:58.443053':::TIME, 430842707:::OID, '{\"2EX\": true, \"dhd\": [[{\"f7C76\": \"P1Nrx\"}, false], {\"62\": true, \"bar\": {\"foo\": true}, \"baz\": 0.0034700482526283244}, null, null, 1.2194537396682144], \"foobar\": \"foobar\", \"pIdF\": true}':::JSONB, '[{\"xou\": true}, true, null]':::JSONB, 919601116:::OID), (e'C=+%\\x1e8\\x17!':::STRING, e'm*H\\x04':::STRING:::NAME, '24:00:00':::TIME, 1101655003:::OID, '{\"7DbZ\": [[\"foobar\"], false], \"c\": false, \"foo\": true, \"foobar\": [2.920851080287311], \"yPF\": 0.18123512124307384}':::JSONB, '[{\"U2XFG2\": [true], \"bar\": \"foobar\", \"baz\": true, \"ffGxaavMI\": {\"KQQe\": true, \"kEFMssHG\": 0.3029416987914901}, \"foobar\": null, \"lgI\": {\"bar\": null}}, {\"bar\": null, \"gp\": 0.4238110543988491}, [true, false], [0.5006243667415533, false], false, null]':::JSONB, 0:::OID), (e'\\x01':::STRING, e'/}\\x1b\"':::STRING:::NAME, '11:25:06.383694':::TIME, 759704225:::OID, '0.5950271060700618':::JSONB, '1':::JSONB, 0:::OID)), PARTITION \"'table8_part8\" VALUES IN ((e'6]zxv])R\\x14':::STRING, '':::STRING:::NAME, '16:52:19.407757':::TIME, 2154524302:::OID, '{\"bar\": null, \"jEV8jS\": false, \"s0huM9H\": 2.352302589547903}':::JSONB, '[{\"Ym\": 0.9414741896562178, \"fV\": [{\"VaFTRG\": true}, false], \"foo\": \"1HHjVsi\"}, {\"foobar\": \"SqZXjUd\"}, [\"bar\"], null, 0.2065287383353697]':::JSONB, 622394620:::OID), ('[':::STRING, e'\\x1a':::STRING:::NAME, '15:33:33.008906':::TIME, 2910076826:::OID, '[{\"b\": null, \"baz\": null}, true, 0.17415419972508978, false]':::JSONB, '{\"1jfsia\": {\"b\": \"ivekHX7\"}, \"G6\": \"foo\", \"a\": [null], \"baz\": true}':::JSONB, 4273361248:::OID), (e'\\x16M|':::STRING, e'.\\x11':::STRING:::NAME, '22:42:40.394551':::TIME, 266844188:::OID, '{\"c\": true}':::JSONB, '[{\"c\": true, \"fU4\": \"baz\"}, [1.8257888695592972], [1.0872616207106622, 0.5470354193758913], true]':::JSONB, 2225534621:::OID), ('}':::STRING, e'U8,N\\x187=c':::STRING:::NAME, '12:29:41.226629':::TIME, 4126999429:::OID, '{\"a\": {\"Gjg3\": true}, \"foobar\": {\"TKx3\": \"iDTBfNMv\", \"foo\": false}, \"i8FrjS\": 0.1587278912274827, \"kcUr729g5\": \"vHlzb\"}':::JSONB, '{\"5XQPyx\": \"JAB4gK\", \"7F6SQD\": false, \"bar\": {\"NjNOSLS\": false, \"foobar\": null}, \"mamIo4xW\": {\"bar\": false}}':::JSONB, 2323349460:::OID), ('':::STRING, e'\\x00':::STRING:::NAME, '11:43:14.500913':::TIME, 2908753298:::OID, '{\"baz\": {\"XZz\": true}, \"c\": \"baz\", \"foobar\": 0.8688863837948777}':::JSONB, '{\"2o\": false, \"hdvPx\": \"AtWMQ\"}':::JSONB, 2772067080:::OID), ('\"':::STRING, e'V`(\\fnqS![':::STRING:::NAME, '21:40:02.332526':::TIME, 1385571673:::OID, 'null':::JSONB, '{\"Par\": true, \"a\": \"2gJyHRs6\", \"b\": [{\"4nhBB\": false}, {\"prlt\": true}, \"xdk\"], \"foo\": null}':::JSONB, 215584298:::OID), (e'\\U00002603':::STRING, e'DF\\r\\x1eY':::STRING:::NAME, '09:56:14.571685':::TIME, 144334893:::OID, 'true':::JSONB, '{\"WUmrRvF\": false, \"b\": \"8owW\"}':::JSONB, 2834307114:::OID), (e'\\x17\\x0b':::STRING, '':::STRING:::NAME, '20:58:43.633559':::TIME, 0:::OID, '1':::JSONB, '[\"foobar\"]':::JSONB, 23131605:::OID)), PARTITION \"DEFAULT\" VALUES IN ((DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT))), UNIQUE (col8_16 DESC, lower(CAST(\" col8_15\" AS STRING)), col8_19 DESC, \"col8_'11\", col8_17 ASC, col8_21 DESC, \" col8_22\", lower(CAST(col8_14 AS STRING))), 
INDEX (col8_12, lower(\"col8\\\\xcb_13\") DESC, col8_10 DESC, col8_16, \"col8_'11\" ASC, \" col8_15\", \"c,ol8_9\" ASC, col8_18 DESC), 
INDEX (\" col8_23\" ASC, col8_17, col8_21, \"col8\\\\xcb_13\", col8_18 ASC, \"c,ol8_9\" DESC, \"col8_'11\" DESC, \" col8_15\" ASC, col8_19 ASC, col8_14, col8_16 DESC), 
INDEX (\"col8_'11\" ASC, \" col8_22\" ASC, col8_10 ASC, \"col8\\\\xcb_13\", \" col8_15\", col8_14, col8_21 ASC, col8_12 ASC, col8_20 DESC, col8_19 ASC, \" col8_23\", col8_16 ASC), 
FAMILY (\"c,ol8_9\", \"col8_'11\"), FAMILY (col8_16, col8_12, \" col8_15\"), FAMILY (col8_19), FAMILY (\" col8_22\", \"col8\\\\xcb_13\"), FAMILY (col8_17), FAMILY (col8_10), FAMILY (col8_14))

Jira issue: CRDB-26928

@rharding6373 rharding6373 added the C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. label Apr 13, 2023
@blathers-crl blathers-crl bot added the T-sql-queries SQL Queries Team label Apr 13, 2023
@rharding6373
Copy link
Collaborator Author

Maybe related to the recent jsonb column indexing changes: #99275

@cucaroach
Copy link
Contributor

I suspect randgen changed to introduce JSON types into index keys and that change should have been version gated, or the version-upgrade test should be made to expect these errors.

fqazi added a commit to fqazi/cockroach that referenced this issue Apr 19, 2023
Previously, the mixed version test could generate SQL not
valid in a mixed version state with JSON types in indexes. To
address this, this patch adds a version check for validating
that these indexes are supported.

Fixes: cockroachdb#101274, cockroachdb#101409, cockroachdb#101514

Release note: None
craig bot pushed a commit that referenced this issue Apr 20, 2023
101638: roachtest: schemachange/mixed-versions: check version for JSON types r=fqazi a=fqazi

Previously, the mixed version test could generate SQL not valid in a mixed version state with JSON types in indexes. To address this, this patch adds a version check for validating that these indexes are supported.

Fixes: #101274, #101409, #101514

Release note: None

Co-authored-by: Faizan Qazi <[email protected]>
@renatolabs
Copy link
Contributor

Fixed by #101638.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. T-sql-queries SQL Queries Team
Projects
Archived in project
Development

No branches or pull requests

3 participants