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: panic: invalid datum type given: string[], expected int[] #42320

Closed
maddyblue opened this issue Nov 8, 2019 · 9 comments
Closed

sql: panic: invalid datum type given: string[], expected int[] #42320

maddyblue opened this issue Nov 8, 2019 · 9 comments
Assignees
Labels
C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. O-sqlsmith

Comments

@maddyblue
Copy link
Contributor

SELECT
	tab_8862.col_15228 AS col_15229, tab_8862.col_15227 AS col_15230
FROM
	(
		VALUES
			(B'1011001000010000011010100', e'\'':::STRING),
			(B'1100001101011010100100001', NULL),
			(B'1100001010101000011100110', e'k]g<G4\x1cDz':::STRING),
			(
				(
					SELECT
						B'0111100011000100001000010' AS col_15226
					FROM
						(
							VALUES
								(ARRAY[e'\'':::STRING, '':::STRING, '"':::STRING, '5':::STRING]),
								(ARRAY['':::STRING, e'#\r\x0b':::STRING, '':::STRING]),
								(ARRAY['Xj':::STRING, '':::STRING, e'\x033G\x16p\x01"':::STRING]),
								(ARRAY[e'e\x05':::STRING]),
								(ARRAY[]:::"char"[])
						)
							AS tab_8860 (col_15224),
						(VALUES (ARRAY[]:::INT2[]), (ARRAY[]:::INT2[]), (ARRAY[(-368):::INT8, (-31726):::INT8]), (ARRAY[8081:::INT8, 561:::INT8]), (ARRAY[]:::INT2[]))
							AS tab_8861 (col_15225)
					GROUP BY
						tab_8860.col_15224, tab_8861.col_15225
					LIMIT
						1:::INT8
				),
				NULL
			),
			(B'1100101011101000001000110', e'\'':::STRING),
			(B'1011111110110001100111000', e'\b\bsw0g\x02Y\'':::STRING)
	)
		AS tab_8862 (col_15227, col_15228)
ORDER BY
	tab_8862.col_15228, tab_8862.col_15228
LIMIT
	1:::INT8;
panic: invalid datum type given: string[], expected int[] [recovered]
	panic: panic while executing 1 statements: SELECT _._ AS _, _._ AS _ FROM (VALUES (_, _:::STRING), (__more5__)) AS _ (_, _) ORDER BY _._, _._ LIMIT _:::INT8; caused by invalid datum type given: string[], expected int[]

goroutine 1111 [running]:
panic(0x2970860, 0xc42b34dbf0)
	/usr/local/go/src/runtime/panic.go:551 +0x3c1 fp=0xc42e953a88 sp=0xc42e9539e8 pc=0x6deae1
github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).closeWrapper(0xc42bf02000, 0x305ca60, 0xc42bb49e40, 0x268f720, 0xc42b475ac0)
	/go/src/github.com/cockroachdb/cockroach/pkg/sql/conn_executor.go:654 +0x36f fp=0xc42e953b48 sp=0xc42e953a88 pc=0x1ab2aaf
github.com/cockroachdb/cockroach/pkg/sql.(*Server).ServeConn.func1(0xc42bf02000, 0x305ca60, 0xc42bb49e40)
	/go/src/github.com/cockroachdb/cockroach/pkg/sql/conn_executor.go:389 +0x61 fp=0xc42e953b80 sp=0xc42e953b48 pc=0x1c27271
runtime.call32(0x0, 0x2c39a68, 0xc429543890, 0x1800000018)
	/usr/local/go/src/runtime/asm_amd64.s:573 +0x3b fp=0xc42e953bb0 sp=0xc42e953b80 pc=0x70be7b
panic(0x268f720, 0xc42b475ac0)
	/usr/local/go/src/runtime/panic.go:502 +0x229 fp=0xc42e953c50 sp=0xc42e953bb0 pc=0x6de949
github.com/cockroachdb/cockroach/pkg/sql/sqlbase.DatumToEncDatum(0xf, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xc42d198e50, 0x0, 0x0, ...)
	/go/src/github.com/cockroachdb/cockroach/pkg/sql/sqlbase/encoded_datum.go:161 +0x281 fp=0xc42e953d18 sp=0xc42e953c50 pc=0x155d991
github.com/cockroachdb/cockroach/pkg/sql.(*DistSQLPlanner).createPlanForValues(0xc4207a7600, 0xc42a17a780, 0xc42aa71220, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
	/go/src/github.com/cockroachdb/cockroach/pkg/sql/distsql_physical_planner.go:2590 +0x355 fp=0xc42e954118 sp=0xc42e953d18 pc=0x1b00265
github.com/cockroachdb/cockroach/pkg/sql.(*DistSQLPlanner).createPlanForNode(0xc4207a7600, 0xc42a17a780, 0x30502a0, 0xc42aa71220, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
	/go/src/github.com/cockroachdb/cockroach/pkg/sql/distsql_physical_planner.go:2342 +0x1781 fp=0xc42e955158 sp=0xc42e954118 pc=0x1afe8c1
github.com/cockroachdb/cockroach/pkg/sql.(*DistSQLPlanner).createPlanForJoin(0xc4207a7600, 0xc42a17a780, 0xc42a1e0420, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
	/go/src/github.com/cockroachdb/cockroach/pkg/sql/distsql_physical_planner.go:1998 +0x1d3 fp=0xc42e955d10 sp=0xc42e955158 pc=0x1afada3
github.com/cockroachdb/cockroach/pkg/sql.(*DistSQLPlanner).createPlanForNode(0xc4207a7600, 0xc42a17a780, 0x304f660, 0xc42a1e0420, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
	/go/src/github.com/cockroachdb/cockroach/pkg/sql/distsql_physical_planner.go:2276 +0x1924 fp=0xc42e956d50 sp=0xc42e955d10 pc=0x1afea64
github.com/cockroachdb/cockroach/pkg/sql.(*DistSQLPlanner).createPlanForDistinct(0xc4207a7600, 0xc42a17a780, 0xc429f28000, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
	/go/src/github.com/cockroachdb/cockroach/pkg/sql/distsql_physical_planner.go:2658 +0xba fp=0xc42e957118 sp=0xc42e956d50 pc=0x1b0123a
github.com/cockroachdb/cockroach/pkg/sql.(*DistSQLPlanner).createPlanForNode(0xc4207a7600, 0xc42a17a780, 0x304f2a0, 0xc429f28000, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
	/go/src/github.com/cockroachdb/cockroach/pkg/sql/distsql_physical_planner.go:2329 +0x13b3 fp=0xc42e958158 sp=0xc42e957118 pc=0x1afe4f3
github.com/cockroachdb/cockroach/pkg/sql.(*DistSQLPlanner).createPlanForNode(0xc4207a7600, 0xc42a17a780, 0x304f6e0, 0xc42aa712c0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
	/go/src/github.com/cockroachdb/cockroach/pkg/sql/distsql_physical_planner.go:2317 +0x148b fp=0xc42e959198 sp=0xc42e958158 pc=0x1afe5cb
github.com/cockroachdb/cockroach/pkg/sql.(*DistSQLPlanner).createPlanForNode(0xc4207a7600, 0xc42a17a780, 0x304faa0, 0xc42a1e0580, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
	/go/src/github.com/cockroachdb/cockroach/pkg/sql/distsql_physical_planner.go:2279 +0xccd fp=0xc42e95a1d8 sp=0xc42e959198 pc=0x1afde0d
github.com/cockroachdb/cockroach/pkg/sql.(*DistSQLPlanner).PlanAndRunSubqueries(0xc4207a7600, 0x305cb20, 0xc42b34c720, 0xc42bf02418, 0xc42b34d380, 0xc429f28100, 0x1, 0x1, 0xc42ec2f680, 0x3075e01, ...)
	/go/src/github.com/cockroachdb/cockroach/pkg/sql/distsql_running.go:638 +0x9a7 fp=0xc42e95aa38 sp=0xc42e95a1d8 pc=0x1b15c67
github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execWithDistSQLEngine(0xc42bf02000, 0x305cb20, 0xc42b34c720, 0xc42bf02418, 0x3, 0x7fbe70a865f8, 0xc42accbe60, 0x1, 0x0, 0x0)
	/go/src/github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:964 +0x3e7 fp=0xc42e95ac10 sp=0xc42e95aa38 pc=0x1ac3247
github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).dispatchToExecutionEngine(0xc42bf02000, 0x305cb20, 0xc42b34c720, 0x30601a0, 0xc42a8217c0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
	/go/src/github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:818 +0xa7e fp=0xc42e95add8 sp=0xc42e95ac10 pc=0x1ac24ce
github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execStmtInOpenState(0xc42bf02000, 0x305cb20, 0xc42b34c720, 0x30601a0, 0xc42a8217c0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
	/go/src/github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:396 +0xa8f fp=0xc42e95b5b0 sp=0xc42e95add8 pc=0x1abe4cf
github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execStmt(0xc42bf02000, 0x305cb20, 0xc42b34c720, 0x30601a0, 0xc42a8217c0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
	/go/src/github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:96 +0x341 fp=0xc42e95b748 sp=0xc42e95b5b0 pc=0x1abd621
github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).run(0xc42bf02000, 0x305ca60, 0xc42bb49e40, 0xc4209d2798, 0x5400, 0x15000, 0xc4209d2830, 0xc42bb8e780, 0x0, 0x0)
	/go/src/github.com/cockroachdb/cockroach/pkg/sql/conn_executor.go:1123 +0x21aa fp=0xc42e95be88 sp=0xc42e95b748 pc=0x1ab5e6a
github.com/cockroachdb/cockroach/pkg/sql.(*Server).ServeConn(0xc4208e4a50, 0x305ca60, 0xc42bb49e40, 0xc42bf02000, 0x5400, 0x15000, 0xc4209d2830, 0xc42bb8e780, 0x0, 0x0)
	/go/src/github.com/cockroachdb/cockroach/pkg/sql/conn_executor.go:391 +0xce fp=0xc42e95bee8 sp=0xc42e95be88 pc=0x1ab0d3e
github.com/cockroachdb/cockroach/pkg/sql/pgwire.(*conn).processCommandsAsync.func1(0xc42be4e2ff, 0xc42bc45b60, 0x305ca60, 0xc42bb49e40, 0xc42bb8e780, 0x3052060, 0xc42bc45b40, 0xc42bce0120, 0xc42bc62a00, 0x0, ...)
	/go/src/github.com/cockroachdb/cockroach/pkg/sql/pgwire/conn.go:520 +0x1e7 fp=0xc42e95bf78 sp=0xc42e95bee8 pc=0x1f092a7
runtime.goexit()
	/usr/local/go/src/runtime/asm_amd64.s:2361 +0x1 fp=0xc42e95bf80 sp=0xc42e95bf78 pc=0x70e641
created by github.com/cockroachdb/cockroach/pkg/sql/pgwire.(*conn).processCommandsAsync
	/go/src/github.com/cockroachdb/cockroach/pkg/sql/pgwire/conn.go:475 +0x17b

This doesn't repro locally, so my guess is this is a behavior that, if the distsql proc is scheduled not on the gateway node, it panics like this.

See https://teamcity.cockroachdb.com/repository/download/Cockroach_Nightlies_WorkloadNightly/1580962:id/sqlsmith/setup%3Dempty/setting%3Dno-ddl/1.logs/cockroach.log and #42101

@maddyblue maddyblue added C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. O-sqlsmith labels Nov 8, 2019
@maddyblue
Copy link
Contributor Author

Here's another that feels the same:

https://teamcity.cockroachdb.com/repository/download/Cockroach_Nightlies_WorkloadNightly/1580962:id/sqlsmith/setup%3Dempty/setting%3Dno-mutations/1.logs/cockroach.log

SELECT
	tab_2430.col_4199 AS col_4210,
	tab_2429.col_4198 AS col_4211,
	'-25 years -2 mons -674 days -24:51:00.864655':::INTERVAL AS col_4212,
	tab_2437.col_4208 AS col_4213,
	tab_2428.col_4197 AS col_4214
FROM
	(
		VALUES
			(ARRAY[3176488464:::OID]),
			(ARRAY[1989283353:::OID]),
			(ARRAY[25852956:::OID, 1221471221:::OID, 3474616352:::OID, 3208489320:::OID, 201884782:::OID, 3504415524:::OID]),
			(ARRAY[3219560933:::OID, 4099100264:::OID])
	)
		AS tab_2428 (col_4197),
	(VALUES (())) AS tab_2429 (col_4198),
	(
		VALUES
			('10:43:36.55993':::TIME),
			('11:09:05.233721':::TIME),
			('00:31:55.145509':::TIME),
			(('05:50:41.269292':::TIME::TIME + NULL::INTERVAL)::TIME),
			('13:53:46.523331':::TIME),
			('00:00:00':::TIME)
	)
		AS tab_2430 (col_4199),
	(VALUES ('{"DEYc~%WM{": 0.02907620802905439, "L?lm!#": {"foobar": []}, "baz": [{}], "c": {}, "foobar": {}, "j1P2HT?/": {"4UHwAUL": []}}':::JSONB), (NULL))
		AS tab_2437 (col_4208)
	LEFT JOIN (
			VALUES
				(NULL),
				('-8 years -4 mons -145 days -22:24:22.866105':::INTERVAL),
				('21 years 9 mons 459 days 16:58:48.494789':::INTERVAL),
				('1 year 10 mons 828 days 07:26:10.020081':::INTERVAL),
				('-29 years -6 mons -755 days -22:45:25.598176':::INTERVAL)
		)
			AS tab_2438 (col_4209) ON false
WHERE
	true
ORDER BY
	tab_2429.col_4198 ASC, tab_2429.col_4198 DESC, tab_2428.col_4197 DESC;
panic: runtime error: comparing uncomparable type types.TTuple [recovered]
	panic: panic while executing 1 statements: SELECT _._ AS _, _._ AS _, _:::INTERVAL AS _, _._ AS _, _._ AS _ FROM (VALUES (ARRAY[_]), (__more3__)) AS _ (_), (VALUES (())) AS _ (_), (VALUES (_:::TIME), (__more5__)) AS _ (_), (VALUES (_:::JSONB), (__more1__)) AS _ (_) LEFT JOIN (VALUES (_), (__more4__)) AS _ (_) ON _ WHERE _ ORDER BY _._ ASC, _._ DESC, _._ DESC; caused by runtime error: comparing uncomparable type types.TTuple

goroutine 1128 [running]:
panic(0x2970860, 0xc42d9688d0)
	/usr/local/go/src/runtime/panic.go:551 +0x3c1 fp=0xc42ad14228 sp=0xc42ad14188 pc=0x6deae1
github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).closeWrapper(0xc42a858000, 0x305ca60, 0xc428d87940, 0x2777500, 0xc42dfd76b0)
	/go/src/github.com/cockroachdb/cockroach/pkg/sql/conn_executor.go:654 +0x36f fp=0xc42ad142e8 sp=0xc42ad14228 pc=0x1ab2aaf
github.com/cockroachdb/cockroach/pkg/sql.(*Server).ServeConn.func1(0xc42a858000, 0x305ca60, 0xc428d87940)
	/go/src/github.com/cockroachdb/cockroach/pkg/sql/conn_executor.go:389 +0x61 fp=0xc42ad14320 sp=0xc42ad142e8 pc=0x1c27271
runtime.call32(0x0, 0x2c39a68, 0xc42071a5d0, 0x1800000018)
	/usr/local/go/src/runtime/asm_amd64.s:573 +0x3b fp=0xc42ad14350 sp=0xc42ad14320 pc=0x70be7b
panic(0x2777500, 0xc42dfd76b0)
	/usr/local/go/src/runtime/panic.go:502 +0x229 fp=0xc42ad143f0 sp=0xc42ad14350 pc=0x6de949
runtime.ifaceeq(0x3073660, 0xc42d945ad0, 0xc42d945ad0, 0x1)
	/usr/local/go/src/runtime/alg.go:237 +0x12e fp=0xc42ad14448 sp=0xc42ad143f0 pc=0x6b4a7e
github.com/cockroachdb/cockroach/pkg/sql.(*renderNode).addOrReuseRenderStartingFromIdx(0xc42d93e580, 0xc42dbed8e1, 0x8, 0x3073660, 0xc42d945ad0, 0x0, 0x3071860, 0xc42dfe4d50, 0xc42dbed801, 0x0, ...)
	/go/src/github.com/cockroachdb/cockroach/pkg/sql/targets.go:129 +0x158 fp=0xc42ad144f0 sp=0xc42ad14448 pc=0x1beafb8
github.com/cockroachdb/cockroach/pkg/sql.(*renderNode).addOrReuseRendersStartingFromIdx(0xc42d93e580, 0xc42d9680f0, 0x1, 0x1, 0xc42dfd76a0, 0x1, 0x1, 0xc42dbed801, 0x0, 0x3073660, ...)
	/go/src/github.com/cockroachdb/cockroach/pkg/sql/targets.go:158 +0x15a fp=0xc42ad145a0 sp=0xc42ad144f0 pc=0x1beb52a
github.com/cockroachdb/cockroach/pkg/sql.(*renderNode).addOrReuseRenders(0xc42d93e580, 0xc42d9680f0, 0x1, 0x1, 0xc42dfd76a0, 0x1, 0x1, 0xc42d968001, 0x1, 0x1, ...)
	/go/src/github.com/cockroachdb/cockroach/pkg/sql/targets.go:146 +0x8f fp=0xc42ad14610 sp=0xc42ad145a0 pc=0x1beb38f
github.com/cockroachdb/cockroach/pkg/sql.(*planner).orderBy(0xc42a858418, 0x305cb20, 0xc42d944f60, 0xc42d940c20, 0x3, 0x4, 0x304faa0, 0xc42d93e580, 0x0, 0x0, ...)
	/go/src/github.com/cockroachdb/cockroach/pkg/sql/sort.go:183 +0x5b6 fp=0xc42ad147b8 sp=0xc42ad14610 pc=0x1bd50c6
github.com/cockroachdb/cockroach/pkg/sql.(*planner).SelectClause(0xc42a858418, 0x305cb20, 0xc42d944f60, 0xc42d9461b0, 0xc42d940c20, 0x3, 0x4, 0x0, 0x0, 0x0, ...)
	/go/src/github.com/cockroachdb/cockroach/pkg/sql/render.go:264 +0x378 fp=0xc42ad148a0 sp=0xc42ad147b8 pc=0x1b9ea98
github.com/cockroachdb/cockroach/pkg/sql.(*planner).Select(0xc42a858418, 0x305cb20, 0xc42d944f60, 0xc42d942a40, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
	/go/src/github.com/cockroachdb/cockroach/pkg/sql/render.go:133 +0x5fd fp=0xc42ad14968 sp=0xc42ad148a0 pc=0x1b9e69d
github.com/cockroachdb/cockroach/pkg/sql.(*planner).newPlan(0xc42a858418, 0x305cb20, 0xc42d944f60, 0x30601a0, 0xc42d942a40, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
	/go/src/github.com/cockroachdb/cockroach/pkg/sql/plan.go:831 +0xd11 fp=0xc42ad14a40 sp=0xc42ad14968 pc=0x1b87651
github.com/cockroachdb/cockroach/pkg/sql.(*planner).makePlan(0xc42a858418, 0x305cb20, 0xc42d944f60, 0x30601a0, 0xc42d942a40, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
	/go/src/github.com/cockroachdb/cockroach/pkg/sql/plan.go:306 +0x169 fp=0xc42ad14c10 sp=0xc42ad14a40 pc=0x1b83ff9
github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).dispatchToExecutionEngine(0xc42a858000, 0x305cb20, 0xc42d944f60, 0x30601a0, 0xc42d942a40, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
	/go/src/github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:764 +0xd7d fp=0xc42ad14dd8 sp=0xc42ad14c10 pc=0x1ac27cd
github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execStmtInOpenState(0xc42a858000, 0x305cb20, 0xc42d944f60, 0x30601a0, 0xc42d942a40, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
	/go/src/github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:396 +0xa8f fp=0xc42ad155b0 sp=0xc42ad14dd8 pc=0x1abe4cf
github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execStmt(0xc42a858000, 0x305cb20, 0xc42d944f60, 0x30601a0, 0xc42d942a40, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
	/go/src/github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:96 +0x341 fp=0xc42ad15748 sp=0xc42ad155b0 pc=0x1abd621
github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).run(0xc42a858000, 0x305ca60, 0xc428d87940, 0xc420525518, 0x5400, 0x15000, 0xc4205255b0, 0xc429b22bb0, 0x0, 0x0)
	/go/src/github.com/cockroachdb/cockroach/pkg/sql/conn_executor.go:1123 +0x21aa fp=0xc42ad15e88 sp=0xc42ad15748 pc=0x1ab5e6a
github.com/cockroachdb/cockroach/pkg/sql.(*Server).ServeConn(0xc420915680, 0x305ca60, 0xc428d87940, 0xc42a858000, 0x5400, 0x15000, 0xc4205255b0, 0xc429b22bb0, 0x0, 0x0)
	/go/src/github.com/cockroachdb/cockroach/pkg/sql/conn_executor.go:391 +0xce fp=0xc42ad15ee8 sp=0xc42ad15e88 pc=0x1ab0d3e
github.com/cockroachdb/cockroach/pkg/sql/pgwire.(*conn).processCommandsAsync.func1(0xc42a309911, 0xc428fc6fe0, 0x305ca60, 0xc428d87940, 0xc429b22bb0, 0x3052060, 0xc428fc6fc0, 0xc428fc5620, 0xc42ac57a00, 0x0, ...)
	/go/src/github.com/cockroachdb/cockroach/pkg/sql/pgwire/conn.go:520 +0x1e7 fp=0xc42ad15f78 sp=0xc42ad15ee8 pc=0x1f092a7
runtime.goexit()
	/usr/local/go/src/runtime/asm_amd64.s:2361 +0x1 fp=0xc42ad15f80 sp=0xc42ad15f78 pc=0x70e641
created by github.com/cockroachdb/cockroach/pkg/sql/pgwire.(*conn).processCommandsAsync
	/go/src/github.com/cockroachdb/cockroach/pkg/sql/pgwire/conn.go:475 +0x17b

@maddyblue
Copy link
Contributor Author

maddyblue commented Nov 8, 2019

There are others too. I think there's an error being thrown on distsql nodes that don't expect errors and instead panic? That's a pure guess based on past experience.

@jordanlewis
Copy link
Member

That second one is confusing looking - is it on an old version? The optimizer doesn't seem to be getting invoked.

@maddyblue
Copy link
Contributor Author

These all happened last night on I assume what was master.

@maddyblue
Copy link
Contributor Author

maddyblue commented Nov 8, 2019

@jordanlewis
Copy link
Member

That one is expected (there's an issue for it being a terrible error message) - we can't group by json columns.

@maddyblue
Copy link
Contributor Author

But that (the JSON one) was not just a bad error message, it was an internal error, which indicates some other problem, right?

@jordanlewis
Copy link
Member

Yeah... to me it does look like the root cause is that we're trying to hash join / group by / etc a json column. Not to say that it's good. But the cause is (I'm pretty sure) a known issue. We should figure out how to detect this earlier and reject it with a nice error message. Maybe it would be easier to get the optimizer to do that.

@yuzefovich
Copy link
Member

Both queries mentioned in this issue now execute successfully, so I'm closing this issue.

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. O-sqlsmith
Projects
None yet
Development

No branches or pull requests

4 participants