Skip to content

allow SELECT; and column name for cast result fix#2597

Open
jennifersp wants to merge 1 commit intomainfrom
jennifer/fixes
Open

allow SELECT; and column name for cast result fix#2597
jennifersp wants to merge 1 commit intomainfrom
jennifer/fixes

Conversation

@jennifersp
Copy link
Copy Markdown
Contributor

No description provided.

@github-actions
Copy link
Copy Markdown
Contributor

Main PR
covering_index_scan_postgres 1184.09/s 1181.00/s -0.3%
index_join_postgres 201.19/s 200.43/s -0.4%
index_join_scan_postgres 277.49/s 277.95/s +0.1%
index_scan_postgres 14.51/s 14.57/s +0.4%
oltp_point_select 2780.09/s 2823.76/s +1.5%
oltp_read_only 2204.01/s 2217.49/s +0.6%
select_random_points 171.35/s 172.23/s +0.5%
select_random_ranges 891.28/s 894.48/s +0.3%
table_scan_postgres 14.14/s 14.08/s -0.5%
types_table_scan_postgres 6.39/s 6.38/s -0.2%

@github-actions
Copy link
Copy Markdown
Contributor

Main PR
Total 42090 42090
Successful 17978 17867
Failures 24112 24223
Partial Successes1 5636 5370
Main PR
Successful 42.7132% 42.4495%
Failures 57.2868% 57.5505%

${\color{red}Regressions (117)}$

domain

QUERY:          SELECT pol.polname, pol.polpermissive,
  CASE WHEN pol.polroles = '{0}' THEN NULL ELSE pg_catalog.array_to_string(array(select rolname from pg_catalog.pg_roles where oid = any (pol.polroles) order by 1),',') END,
  pg_catalog.pg_get_expr(pol.polqual, pol.polrelid),
  pg_catalog.pg_get_expr(pol.polwithcheck, pol.polrelid),
  CASE pol.polcmd
    WHEN 'r' THEN 'SELECT'
    WHEN 'a' THEN 'INSERT'
    WHEN 'w' THEN 'UPDATE'
    WHEN 'd' THEN 'DELETE'
    END AS cmd
FROM pg_catalog.pg_policy pol
WHERE pol.polrelid = '158879' ORDER BY 1;
RECEIVED ERROR: DoltgresHandler caught panic: runtime error: invalid memory address or nil pointer dereference: goroutine 313491 [running]:
runtime/debug.Stack()
	/opt/hostedtoolcache/go/1.25.6/x64/src/runtime/debug/stack.go:26 +0x5e
github.com/dolthub/doltgresql/server.(*DoltgresHandler).resultForDefaultIter.func1(0xc000c80f30)
	/home/runner/work/doltgresql/doltgresql/server/doltgres_handler.go:631 +0x58
panic({0x3cb4720?, 0x7d26520?})
	/opt/hostedtoolcache/go/1.25.6/x64/src/runtime/panic.go:783 +0x132
github.com/dolthub/dolt/go/store/prolly/tree.(*Node).TreeCount(...)
	/home/runner/go/pkg/mod/github.com/dolthub/dolt/[email protected]/store/prolly/tree/node.go:177
github.com/dolthub/dolt/go/store/prolly/tree.StaticMap[...].Count(0x39d2b8dd5d6352bd?)
	/home/runner/go/pkg/mod/github.com/dolthub/dolt/[email protected]/store/prolly/tree/map.go:214 +0x1d
github.com/dolthub/dolt/go/store/prolly.AddressMap.Count(...)
	/home/runner/go/pkg/mod/github.com/dolthub/dolt/[email protected]/store/prolly/address_map.go:66
github.com/dolthub/doltgresql/core/typecollection.(*TypeCollection).UpdateRoot(0xc052956cf0, {0x58db040, 0xc048678960}, {0x5a5f958, 0xc0427265a0})
	/home/runner/work/doltgresql/doltgresql/core/typecollection/collection_funcs.go:171 +0x55
github.com/dolthub/doltgresql/core.updateSessionRootForDatabase(0xc048678960, {0xc07ec52ed1, 0xa}, 0xc05d5182c0)
	/home/runner/work/doltgresql/doltgresql/core/context.go:473 +0x4c6
github.com/dolthub/doltgresql/core.CloseContextRootFinalizer(0xc048678960)
	/home/runner/work/doltgresql/doltgresql/core/context.go:412 +0xa5
github.com/dolthub/doltgresql/server/node.(*rootFinalizerIter).Close(0x4baa85?, 0xc048678960)
	/home/runner/work/doltgresql/doltgresql/server/node/context_root_finalizer.go:112 +0x55
github.com/dolthub/go-mysql-server/sql/rowexec.(*TransactionCommittingIter).Close(0xc053bd7bc0, 0xc048678960)
	/home/runner/go/pkg/mod/github.com/dolthub/[email protected]/sql/rowexec/transaction_iters.go:116 +0x37
github.com/dolthub/go-mysql-server/sql/plan.(*TrackedRowIter).Close(0xc03ed64f40, 0xc048678960)
	/home/runner/go/pkg/mod/github.com/dolthub/[email protected]/sql/plan/process.go:340 +0x26
github.com/dolthub/doltgresql/server.(*DoltgresHandler).resultForDefaultIter.func4()
	/home/runner/work/doltgresql/doltgresql/server/doltgres_handler.go:738 +0x8b
golang.org/x/sync/errgroup.(*Group).Go.func1()
	/home/runner/go/pkg/mod/golang.org/x/[email protected]/errgroup/errgroup.go:93 +0x50
created by golang.org/x/sync/errgroup.(*Group).Go in goroutine 312936
	/home/runner/go/pkg/mod/golang.org/x/[email protected]/errgroup/errgroup.go:78 +0x95 (errno 1105) (sqlstate HY000)
QUERY:          SELECT oid, stxrelid::pg_catalog.regclass, stxnamespace::pg_catalog.regnamespace::pg_catalog.text AS nsp, stxname,
pg_catalog.pg_get_statisticsobjdef_columns(oid) AS columns,
  'd' = any(stxkind) AS ndist_enabled,
  'f' = any(stxkind) AS deps_enabled,
  'm' = any(stxkind) AS mcv_enabled,
stxstattarget
FROM pg_catalog.pg_statistic_ext
WHERE stxrelid = '158879'
ORDER BY nsp, stxname;
RECEIVED ERROR: DoltgresHandler caught panic: runtime error: invalid memory address or nil pointer dereference: goroutine 313480 [running]:
runtime/debug.Stack()
	/opt/hostedtoolcache/go/1.25.6/x64/src/runtime/debug/stack.go:26 +0x5e
github.com/dolthub/doltgresql/server.(*DoltgresHandler).resultForDefaultIter.func1(0xc0000bcf30)
	/home/runner/work/doltgresql/doltgresql/server/doltgres_handler.go:631 +0x58
panic({0x3cb4720?, 0x7d26520?})
	/opt/hostedtoolcache/go/1.25.6/x64/src/runtime/panic.go:783 +0x132
github.com/dolthub/dolt/go/store/prolly/tree.(*Node).TreeCount(...)
	/home/runner/go/pkg/mod/github.com/dolthub/dolt/[email protected]/store/prolly/tree/node.go:177
github.com/dolthub/dolt/go/store/prolly/tree.StaticMap[...].Count(0x39d2b8dd5d6352bd?)
	/home/runner/go/pkg/mod/github.com/dolthub/dolt/[email protected]/store/prolly/tree/map.go:214 +0x1d
github.com/dolthub/dolt/go/store/prolly.AddressMap.Count(...)
	/home/runner/go/pkg/mod/github.com/dolthub/dolt/[email protected]/store/prolly/address_map.go:66
github.com/dolthub/doltgresql/core/typecollection.(*TypeCollection).UpdateRoot(0xc052956cf0, {0x58db040, 0xc0692b7ae0}, {0x5a5f958, 0xc0427265a0})
	/home/runner/work/doltgresql/doltgresql/core/typecollection/collection_funcs.go:171 +0x55
github.com/dolthub/doltgresql/core.updateSessionRootForDatabase(0xc0692b7ae0, {0xc07ec52ed1, 0xa}, 0xc05d5182c0)
	/home/runner/work/doltgresql/doltgresql/core/context.go:473 +0x4c6
github.com/dolthub/doltgresql/core.CloseContextRootFinalizer(0xc0692b7ae0)
	/home/runner/work/doltgresql/doltgresql/core/context.go:412 +0xa5
github.com/dolthub/doltgresql/server/node.(*rootFinalizerIter).Close(0x10000004baa85?, 0xc0692b7ae0)
	/home/runner/work/doltgresql/doltgresql/server/node/context_root_finalizer.go:112 +0x55
github.com/dolthub/go-mysql-server/sql/rowexec.(*TransactionCommittingIter).Close(0xc057a54d20, 0xc0692b7ae0)
	/home/runner/go/pkg/mod/github.com/dolthub/[email protected]/sql/rowexec/transaction_iters.go:116 +0x37
github.com/dolthub/go-mysql-server/sql/plan.(*TrackedRowIter).Close(0xc05e04f700, 0xc0692b7ae0)
	/home/runner/go/pkg/mod/github.com/dolthub/[email protected]/sql/plan/process.go:340 +0x26
github.com/dolthub/doltgresql/server.(*DoltgresHandler).resultForDefaultIter.func4()
	/home/runner/work/doltgresql/doltgresql/server/doltgres_handler.go:738 +0x8b
golang.org/x/sync/errgroup.(*Group).Go.func1()
	/home/runner/go/pkg/mod/golang.org/x/[email protected]/errgroup/errgroup.go:93 +0x50
created by golang.org/x/sync/errgroup.(*Group).Go in goroutine 312936
	/home/runner/go/pkg/mod/golang.org/x/[email protected]/errgroup/errgroup.go:78 +0x95 (errno 1105) (sqlstate HY000)
QUERY:          SELECT c.oid::pg_catalog.regclass
FROM pg_catalog.pg_class c, pg_catalog.pg_inherits i
WHERE c.oid = i.inhparent AND i.inhrelid = '158879'
  AND c.relkind != 'p' AND c.relkind != 'I'
ORDER BY inhseqno;
RECEIVED ERROR: DoltgresHandler caught panic: runtime error: invalid memory address or nil pointer dereference: goroutine 313510 [running]:
runtime/debug.Stack()
	/opt/hostedtoolcache/go/1.25.6/x64/src/runtime/debug/stack.go:26 +0x5e
github.com/dolthub/doltgresql/server.(*DoltgresHandler).resultForDefaultIter.func1(0xc000c80f30)
	/home/runner/work/doltgresql/doltgresql/server/doltgres_handler.go:631 +0x58
panic({0x3cb4720?, 0x7d26520?})
	/opt/hostedtoolcache/go/1.25.6/x64/src/runtime/panic.go:783 +0x132
github.com/dolthub/dolt/go/store/prolly/tree.(*Node).TreeCount(...)
	/home/runner/go/pkg/mod/github.com/dolthub/dolt/[email protected]/store/prolly/tree/node.go:177
github.com/dolthub/dolt/go/store/prolly/tree.StaticMap[...].Count(0x39d2b8dd5d6352bd?)
	/home/runner/go/pkg/mod/github.com/dolthub/dolt/[email protected]/store/prolly/tree/map.go:214 +0x1d
github.com/dolthub/dolt/go/store/prolly.AddressMap.Count(...)
	/home/runner/go/pkg/mod/github.com/dolthub/dolt/[email protected]/store/prolly/address_map.go:66
github.com/dolthub/doltgresql/core/typecollection.(*TypeCollection).UpdateRoot(0xc052956cf0, {0x58db040, 0xc0492cc460}, {0x5a5f958, 0xc0427265a0})
	/home/runner/work/doltgresql/doltgresql/core/typecollection/collection_funcs.go:171 +0x55
github.com/dolthub/doltgresql/core.updateSessionRootForDatabase(0xc0492cc460, {0xc07ec52ed1, 0xa}, 0xc05d5182c0)
	/home/runner/work/doltgresql/doltgresql/core/context.go:473 +0x4c6
github.com/dolthub/doltgresql/core.CloseContextRootFinalizer(0xc0492cc460)
	/home/runner/work/doltgresql/doltgresql/core/context.go:412 +0xa5
github.com/dolthub/doltgresql/server/node.(*rootFinalizerIter).Close(0x10000004baa85?, 0xc0492cc460)
	/home/runner/work/doltgresql/doltgresql/server/node/context_root_finalizer.go:112 +0x55
github.com/dolthub/go-mysql-server/sql/rowexec.(*TransactionCommittingIter).Close(0xc057ddc990, 0xc0492cc460)
	/home/runner/go/pkg/mod/github.com/dolthub/[email protected]/sql/rowexec/transaction_iters.go:116 +0x37
github.com/dolthub/go-mysql-server/sql/plan.(*TrackedRowIter).Close(0xc03dc0a580, 0xc0492cc460)
	/home/runner/go/pkg/mod/github.com/dolthub/[email protected]/sql/plan/process.go:340 +0x26
github.com/dolthub/doltgresql/server.(*DoltgresHandler).resultForDefaultIter.func4()
	/home/runner/work/doltgresql/doltgresql/server/doltgres_handler.go:738 +0x8b
golang.org/x/sync/errgroup.(*Group).Go.func1()
	/home/runner/go/pkg/mod/golang.org/x/[email protected]/errgroup/errgroup.go:93 +0x50
created by golang.org/x/sync/errgroup.(*Group).Go in goroutine 312936
	/home/runner/go/pkg/mod/golang.org/x/[email protected]/errgroup/errgroup.go:78 +0x95 (errno 1105) (sqlstate HY000)
QUERY:          SELECT c.oid::pg_catalog.regclass, c.relkind, inhdetachpending, pg_catalog.pg_get_expr(c.relpartbound, c.oid)
FROM pg_catalog.pg_class c, pg_catalog.pg_inherits i
WHERE c.oid = i.inhrelid AND i.inhparent = '158879'
ORDER BY pg_catalog.pg_get_expr(c.relpartbound, c.oid) = 'DEFAULT', c.oid::pg_catalog.regclass::pg_catalog.text;
RECEIVED ERROR: DoltgresHandler caught panic: runtime error: invalid memory address or nil pointer dereference: goroutine 313513 [running]:
runtime/debug.Stack()
	/opt/hostedtoolcache/go/1.25.6/x64/src/runtime/debug/stack.go:26 +0x5e
github.com/dolthub/doltgresql/server.(*DoltgresHandler).resultForDefaultIter.func1(0xc000c80f30)
	/home/runner/work/doltgresql/doltgresql/server/doltgres_handler.go:631 +0x58
panic({0x3cb4720?, 0x7d26520?})
	/opt/hostedtoolcache/go/1.25.6/x64/src/runtime/panic.go:783 +0x132
github.com/dolthub/dolt/go/store/prolly/tree.(*Node).TreeCount(...)
	/home/runner/go/pkg/mod/github.com/dolthub/dolt/[email protected]/store/prolly/tree/node.go:177
github.com/dolthub/dolt/go/store/prolly/tree.StaticMap[...].Count(0x39d2b8dd5d6352bd?)
	/home/runner/go/pkg/mod/github.com/dolthub/dolt/[email protected]/store/prolly/tree/map.go:214 +0x1d
github.com/dolthub/dolt/go/store/prolly.AddressMap.Count(...)
	/home/runner/go/pkg/mod/github.com/dolthub/dolt/[email protected]/store/prolly/address_map.go:66
github.com/dolthub/doltgresql/core/typecollection.(*TypeCollection).UpdateRoot(0xc052956cf0, {0x58db040, 0xc0492cdb80}, {0x5a5f958, 0xc0427265a0})
	/home/runner/work/doltgresql/doltgresql/core/typecollection/collection_funcs.go:171 +0x55
github.com/dolthub/doltgresql/core.updateSessionRootForDatabase(0xc0492cdb80, {0xc07ec52ed1, 0xa}, 0xc05d5182c0)
	/home/runner/work/doltgresql/doltgresql/core/context.go:473 +0x4c6
github.com/dolthub/doltgresql/core.CloseContextRootFinalizer(0xc0492cdb80)
	/home/runner/work/doltgresql/doltgresql/core/context.go:412 +0xa5
github.com/dolthub/doltgresql/server/node.(*rootFinalizerIter).Close(0x1779a733a?, 0xc0492cdb80)
	/home/runner/work/doltgresql/doltgresql/server/node/context_root_finalizer.go:112 +0x55
github.com/dolthub/go-mysql-server/sql/rowexec.(*TransactionCommittingIter).Close(0xc057ddda70, 0xc0492cdb80)
	/home/runner/go/pkg/mod/github.com/dolthub/[email protected]/sql/rowexec/transaction_iters.go:116 +0x37
github.com/dolthub/go-mysql-server/sql/plan.(*TrackedRowIter).Close(0xc03dc0be80, 0xc0492cdb80)
	/home/runner/go/pkg/mod/github.com/dolthub/[email protected]/sql/plan/process.go:340 +0x26
github.com/dolthub/doltgresql/server.(*DoltgresHandler).resultForDefaultIter.func4()
	/home/runner/work/doltgresql/doltgresql/server/doltgres_handler.go:738 +0x8b
golang.org/x/sync/errgroup.(*Group).Go.func1()
	/home/runner/go/pkg/mod/golang.org/x/[email protected]/errgroup/errgroup.go:93 +0x50
created by golang.org/x/sync/errgroup.(*Group).Go in goroutine 312936
	/home/runner/go/pkg/mod/golang.org/x/[email protected]/errgroup/errgroup.go:78 +0x95 (errno 1105) (sqlstate HY000)
QUERY:          create function makedcomp(r float8, i float8) returns dcomptype
as 'select row(r, i)' language sql;
RECEIVED ERROR: runtime error: invalid memory address or nil pointer dereference
QUERY:          drop function makedcomp(float8, float8);
RECEIVED ERROR: function makedcomp does not exist (errno 1105) (sqlstate HY000)
QUERY:          drop table dcomptable;
RECEIVED ERROR: runtime error: invalid memory address or nil pointer dereference
QUERY:          comment on constraint c1 on domain dcomptype is 'random commentary';
RECEIVED ERROR: runtime error: invalid memory address or nil pointer dereference
QUERY:          create domain dcomptypea as comptype[];
RECEIVED ERROR: runtime error: invalid memory address or nil pointer dereference
QUERY:          create table dcomptable (d1 dcomptypea unique);
RECEIVED ERROR: table with name dcomptable already exists (errno 1105) (sqlstate HY000)
QUERY:          SELECT pol.polname, pol.polpermissive,
  CASE WHEN pol.polroles = '{0}' THEN NULL ELSE pg_catalog.array_to_string(array(select rolname from pg_catalog.pg_roles where oid = any (pol.polroles) order by 1),',') END,
  pg_catalog.pg_get_expr(pol.polqual, pol.polrelid),
  pg_catalog.pg_get_expr(pol.polwithcheck, pol.polrelid),
  CASE pol.polcmd
    WHEN 'r' THEN 'SELECT'
    WHEN 'a' THEN 'INSERT'
    WHEN 'w' THEN 'UPDATE'
    WHEN 'd' THEN 'DELETE'
    END AS cmd
FROM pg_catalog.pg_policy pol
WHERE pol.polrelid = '158902' ORDER BY 1;
RECEIVED ERROR: DoltgresHandler caught panic: runtime error: invalid memory address or nil pointer dereference: goroutine 313696 [running]:
runtime/debug.Stack()
	/opt/hostedtoolcache/go/1.25.6/x64/src/runtime/debug/stack.go:26 +0x5e
github.com/dolthub/doltgresql/server.(*DoltgresHandler).resultForDefaultIter.func1(0xc000c80f30)
	/home/runner/work/doltgresql/doltgresql/server/doltgres_handler.go:631 +0x58
panic({0x3cb4720?, 0x7d26520?})
	/opt/hostedtoolcache/go/1.25.6/x64/src/runtime/panic.go:783 +0x132
github.com/dolthub/dolt/go/store/prolly/tree.(*Node).TreeCount(...)
	/home/runner/go/pkg/mod/github.com/dolthub/dolt/[email protected]/store/prolly/tree/node.go:177
github.com/dolthub/dolt/go/store/prolly/tree.StaticMap[...].Count(0x39d2b8dd5d6352bd?)
	/home/runner/go/pkg/mod/github.com/dolthub/dolt/[email protected]/store/prolly/tree/map.go:214 +0x1d
github.com/dolthub/dolt/go/store/prolly.AddressMap.Count(...)
	/home/runner/go/pkg/mod/github.com/dolthub/dolt/[email protected]/store/prolly/address_map.go:66
github.com/dolthub/doltgresql/core/typecollection.(*TypeCollection).UpdateRoot(0xc052956cf0, {0x58db040, 0xc04f628fa0}, {0x5a5f958, 0xc0427265a0})
	/home/runner/work/doltgresql/doltgresql/core/typecollection/collection_funcs.go:171 +0x55
github.com/dolthub/doltgresql/core.updateSessionRootForDatabase(0xc04f628fa0, {0xc07ec52ed1, 0xa}, 0xc05d5182c0)
	/home/runner/work/doltgresql/doltgresql/core/context.go:473 +0x4c6
github.com/dolthub/doltgresql/core.CloseContextRootFinalizer(0xc04f628fa0)
	/home/runner/work/doltgresql/doltgresql/core/context.go:412 +0xa5
github.com/dolthub/doltgresql/server/node.(*rootFinalizerIter).Close(0x10000f57e45c0?, 0xc04f628fa0)
	/home/runner/work/doltgresql/doltgresql/server/node/context_root_finalizer.go:112 +0x55
github.com/dolthub/go-mysql-server/sql/rowexec.(*TransactionCommittingIter).Close(0xc0606342a0, 0xc04f628fa0)
	/home/runner/go/pkg/mod/github.com/dolthub/[email protected]/sql/rowexec/transaction_iters.go:116 +0x37
github.com/dolthub/go-mysql-server/sql/plan.(*TrackedRowIter).Close(0xc045129c40, 0xc04f628fa0)
	/home/runner/go/pkg/mod/github.com/dolthub/[email protected]/sql/plan/process.go:340 +0x26
github.com/dolthub/doltgresql/server.(*DoltgresHandler).resultForDefaultIter.func4()
	/home/runner/work/doltgresql/doltgresql/server/doltgres_handler.go:738 +0x8b
golang.org/x/sync/errgroup.(*Group).Go.func1()
	/home/runner/go/pkg/mod/golang.org/x/[email protected]/errgroup/errgroup.go:93 +0x50
created by golang.org/x/sync/errgroup.(*Group).Go in goroutine 312936
	/home/runner/go/pkg/mod/golang.org/x/[email protected]/errgroup/errgroup.go:78 +0x95 (errno 1105) (sqlstate HY000)
QUERY:          SELECT oid, stxrelid::pg_catalog.regclass, stxnamespace::pg_catalog.regnamespace::pg_catalog.text AS nsp, stxname,
pg_catalog.pg_get_statisticsobjdef_columns(oid) AS columns,
  'd' = any(stxkind) AS ndist_enabled,
  'f' = any(stxkind) AS deps_enabled,
  'm' = any(stxkind) AS mcv_enabled,
stxstattarget
FROM pg_catalog.pg_statistic_ext
WHERE stxrelid = '158902'
ORDER BY nsp, stxname;
RECEIVED ERROR: DoltgresHandler caught panic: runtime error: invalid memory address or nil pointer dereference: goroutine 313674 [running]:
runtime/debug.Stack()
	/opt/hostedtoolcache/go/1.25.6/x64/src/runtime/debug/stack.go:26 +0x5e
github.com/dolthub/doltgresql/server.(*DoltgresHandler).resultForDefaultIter.func1(0xc003397f30)
	/home/runner/work/doltgresql/doltgresql/server/doltgres_handler.go:631 +0x58
panic({0x3cb4720?, 0x7d26520?})
	/opt/hostedtoolcache/go/1.25.6/x64/src/runtime/panic.go:783 +0x132
github.com/dolthub/dolt/go/store/prolly/tree.(*Node).TreeCount(...)
	/home/runner/go/pkg/mod/github.com/dolthub/dolt/[email protected]/store/prolly/tree/node.go:177
github.com/dolthub/dolt/go/store/prolly/tree.StaticMap[...].Count(0x39d2b8dd5d6352bd?)
	/home/runner/go/pkg/mod/github.com/dolthub/dolt/[email protected]/store/prolly/tree/map.go:214 +0x1d
github.com/dolthub/dolt/go/store/prolly.AddressMap.Count(...)
	/home/runner/go/pkg/mod/github.com/dolthub/dolt/[email protected]/store/prolly/address_map.go:66
github.com/dolthub/doltgresql/core/typecollection.(*TypeCollection).UpdateRoot(0xc052956cf0, {0x58db040, 0xc005ea9360}, {0x5a5f958, 0xc0427265a0})
	/home/runner/work/doltgresql/doltgresql/core/typecollection/collection_funcs.go:171 +0x55
github.com/dolthub/doltgresql/core.updateSessionRootForDatabase(0xc005ea9360, {0xc07ec52ed1, 0xa}, 0xc05d5182c0)
	/home/runner/work/doltgresql/doltgresql/core/context.go:473 +0x4c6
github.com/dolthub/doltgresql/core.CloseContextRootFinalizer(0xc005ea9360)
	/home/runner/work/doltgresql/doltgresql/core/context.go:412 +0xa5
github.com/dolthub/doltgresql/server/node.(*rootFinalizerIter).Close(0x7f26f57e45c0?, 0xc005ea9360)
	/home/runner/work/doltgresql/doltgresql/server/node/context_root_finalizer.go:112 +0x55
github.com/dolthub/go-mysql-server/sql/rowexec.(*TransactionCommittingIter).Close(0xc05e2d6cc0, 0xc005ea9360)
	/home/runner/go/pkg/mod/github.com/dolthub/[email protected]/sql/rowexec/transaction_iters.go:116 +0x37
github.com/dolthub/go-mysql-server/sql/plan.(*TrackedRowIter).Close(0xc0325f1cc0, 0xc005ea9360)
	/home/runner/go/pkg/mod/github.com/dolthub/[email protected]/sql/plan/process.go:340 +0x26
github.com/dolthub/doltgresql/server.(*DoltgresHandler).resultForDefaultIter.func4()
	/home/runner/work/doltgresql/doltgresql/server/doltgres_handler.go:738 +0x8b
golang.org/x/sync/errgroup.(*Group).Go.func1()
	/home/runner/go/pkg/mod/golang.org/x/[email protected]/errgroup/errgroup.go:93 +0x50
created by golang.org/x/sync/errgroup.(*Group).Go in goroutine 312936
	/home/runner/go/pkg/mod/golang.org/x/[email protected]/errgroup/errgroup.go:78 +0x95 (errno 1105) (sqlstate HY000)
QUERY:          SELECT c.oid::pg_catalog.regclass
FROM pg_catalog.pg_class c, pg_catalog.pg_inherits i
WHERE c.oid = i.inhparent AND i.inhrelid = '158902'
  AND c.relkind != 'p' AND c.relkind != 'I'
ORDER BY inhseqno;
RECEIVED ERROR: DoltgresHandler caught panic: runtime error: invalid memory address or nil pointer dereference: goroutine 313715 [running]:
runtime/debug.Stack()
	/opt/hostedtoolcache/go/1.25.6/x64/src/runtime/debug/stack.go:26 +0x5e
github.com/dolthub/doltgresql/server.(*DoltgresHandler).resultForDefaultIter.func1(0xc003397f30)
	/home/runner/work/doltgresql/doltgresql/server/doltgres_handler.go:631 +0x58
panic({0x3cb4720?, 0x7d26520?})
	/opt/hostedtoolcache/go/1.25.6/x64/src/runtime/panic.go:783 +0x132
github.com/dolthub/dolt/go/store/prolly/tree.(*Node).TreeCount(...)
	/home/runner/go/pkg/mod/github.com/dolthub/dolt/[email protected]/store/prolly/tree/node.go:177
github.com/dolthub/dolt/go/store/prolly/tree.StaticMap[...].Count(0x39d2b8dd5d6352bd?)
	/home/runner/go/pkg/mod/github.com/dolthub/dolt/[email protected]/store/prolly/tree/map.go:214 +0x1d
github.com/dolthub/dolt/go/store/prolly.AddressMap.Count(...)
	/home/runner/go/pkg/mod/github.com/dolthub/dolt/[email protected]/store/prolly/address_map.go:66
github.com/dolthub/doltgresql/core/typecollection.(*TypeCollection).UpdateRoot(0xc052956cf0, {0x58db040, 0xc0042fa0a0}, {0x5a5f958, 0xc0427265a0})
	/home/runner/work/doltgresql/doltgresql/core/typecollection/collection_funcs.go:171 +0x55
github.com/dolthub/doltgresql/core.updateSessionRootForDatabase(0xc0042fa0a0, {0xc07ec52ed1, 0xa}, 0xc05d5182c0)
	/home/runner/work/doltgresql/doltgresql/core/context.go:473 +0x4c6
github.com/dolthub/doltgresql/core.CloseContextRootFinalizer(0xc0042fa0a0)
	/home/runner/work/doltgresql/doltgresql/core/context.go:412 +0xa5
github.com/dolthub/doltgresql/server/node.(*rootFinalizerIter).Close(0x4baa85?, 0xc0042fa0a0)
	/home/runner/work/doltgresql/doltgresql/server/node/context_root_finalizer.go:112 +0x55
github.com/dolthub/go-mysql-server/sql/rowexec.(*TransactionCommittingIter).Close(0xc060635050, 0xc0042fa0a0)
	/home/runner/go/pkg/mod/github.com/dolthub/[email protected]/sql/rowexec/transaction_iters.go:116 +0x37
github.com/dolthub/go-mysql-server/sql/plan.(*TrackedRowIter).Close(0xc002cb7280, 0xc0042fa0a0)
	/home/runner/go/pkg/mod/github.com/dolthub/[email protected]/sql/plan/process.go:340 +0x26
github.com/dolthub/doltgresql/server.(*DoltgresHandler).resultForDefaultIter.func4()
	/home/runner/work/doltgresql/doltgresql/server/doltgres_handler.go:738 +0x8b
golang.org/x/sync/errgroup.(*Group).Go.func1()
	/home/runner/go/pkg/mod/golang.org/x/[email protected]/errgroup/errgroup.go:93 +0x50
created by golang.org/x/sync/errgroup.(*Group).Go in goroutine 312936
	/home/runner/go/pkg/mod/golang.org/x/[email protected]/errgroup/errgroup.go:78 +0x95 (errno 1105) (sqlstate HY000)
QUERY:          SELECT c.oid::pg_catalog.regclass, c.relkind, inhdetachpending, pg_catalog.pg_get_expr(c.relpartbound, c.oid)
FROM pg_catalog.pg_class c, pg_catalog.pg_inherits i
WHERE c.oid = i.inhrelid AND i.inhparent = '158902'
ORDER BY pg_catalog.pg_get_expr(c.relpartbound, c.oid) = 'DEFAULT', c.oid::pg_catalog.regclass::pg_catalog.text;
RECEIVED ERROR: DoltgresHandler caught panic: runtime error: invalid memory address or nil pointer dereference: goroutine 313711 [running]:
runtime/debug.Stack()
	/opt/hostedtoolcache/go/1.25.6/x64/src/runtime/debug/stack.go:26 +0x5e
github.com/dolthub/doltgresql/server.(*DoltgresHandler).resultForDefaultIter.func1(0xc003397f30)
	/home/runner/work/doltgresql/doltgresql/server/doltgres_handler.go:631 +0x58
panic({0x3cb4720?, 0x7d26520?})
	/opt/hostedtoolcache/go/1.25.6/x64/src/runtime/panic.go:783 +0x132
github.com/dolthub/dolt/go/store/prolly/tree.(*Node).TreeCount(...)
	/home/runner/go/pkg/mod/github.com/dolthub/dolt/[email protected]/store/prolly/tree/node.go:177
github.com/dolthub/dolt/go/store/prolly/tree.StaticMap[...].Count(0x39d2b8dd5d6352bd?)
	/home/runner/go/pkg/mod/github.com/dolthub/dolt/[email protected]/store/prolly/tree/map.go:214 +0x1d
github.com/dolthub/dolt/go/store/prolly.AddressMap.Count(...)
	/home/runner/go/pkg/mod/github.com/dolthub/dolt/[email protected]/store/prolly/address_map.go:66
github.com/dolthub/doltgresql/core/typecollection.(*TypeCollection).UpdateRoot(0xc052956cf0, {0x58db040, 0xc045046be0}, {0x5a5f958, 0xc0427265a0})
	/home/runner/work/doltgresql/doltgresql/core/typecollection/collection_funcs.go:171 +0x55
github.com/dolthub/doltgresql/core.updateSessionRootForDatabase(0xc045046be0, {0xc07ec52ed1, 0xa}, 0xc05d5182c0)
	/home/runner/work/doltgresql/doltgresql/core/context.go:473 +0x4c6
github.com/dolthub/doltgresql/core.CloseContextRootFinalizer(0xc045046be0)
	/home/runner/work/doltgresql/doltgresql/core/context.go:412 +0xa5
github.com/dolthub/doltgresql/server/node.(*rootFinalizerIter).Close(0xc05e2f20e0?, 0xc045046be0)
	/home/runner/work/doltgresql/doltgresql/server/node/context_root_finalizer.go:112 +0x55
github.com/dolthub/go-mysql-server/sql/rowexec.(*TransactionCommittingIter).Close(0xc06080ade0, 0xc045046be0)
	/home/runner/go/pkg/mod/github.com/dolthub/[email protected]/sql/rowexec/transaction_iters.go:116 +0x37
github.com/dolthub/go-mysql-server/sql/plan.(*TrackedRowIter).Close(0xc013f3fdc0, 0xc045046be0)
	/home/runner/go/pkg/mod/github.com/dolthub/[email protected]/sql/plan/process.go:340 +0x26
github.com/dolthub/doltgresql/server.(*DoltgresHandler).resultForDefaultIter.func4()
	/home/runner/work/doltgresql/doltgresql/server/doltgres_handler.go:738 +0x8b
golang.org/x/sync/errgroup.(*Group).Go.func1()
	/home/runner/go/pkg/mod/golang.org/x/[email protected]/errgroup/errgroup.go:93 +0x50
created by golang.org/x/sync/errgroup.(*Group).Go in goroutine 312936
	/home/runner/go/pkg/mod/golang.org/x/[email protected]/errgroup/errgroup.go:78 +0x95 (errno 1105) (sqlstate HY000)
QUERY:          drop table dcomptable;
RECEIVED ERROR: runtime error: invalid memory address or nil pointer dereference
QUERY:          create domain posint as int check (value > 0);
RECEIVED ERROR: runtime error: invalid memory address or nil pointer dereference
QUERY:          create table pitable (f1 posint[]);
RECEIVED ERROR: runtime error: invalid memory address or nil pointer dereference
QUERY:          drop table pitable;
RECEIVED ERROR: table not found: pitable (errno 1146) (sqlstate HY000)
QUERY:          create domain vc4 as varchar(4);
RECEIVED ERROR: runtime error: invalid memory address or nil pointer dereference
QUERY:          create table vc4table (f1 vc4[]);
RECEIVED ERROR: runtime error: invalid memory address or nil pointer dereference
QUERY:          insert into vc4table values(array['too long']::vc4[]);
RECEIVED ERROR: runtime error: invalid memory address or nil pointer dereference
QUERY:          drop table vc4table;
RECEIVED ERROR: runtime error: invalid memory address or nil pointer dereference
QUERY:          drop type vc4;
RECEIVED ERROR: runtime error: invalid memory address or nil pointer dereference
QUERY:          create domain dposinta as posint[];
RECEIVED ERROR: runtime error: invalid memory address or nil pointer dereference
QUERY:          create table dposintatable (f1 dposinta[]);
RECEIVED ERROR: runtime error: invalid memory address or nil pointer dereference
QUERY:          drop table dposintatable;
RECEIVED ERROR: runtime error: invalid memory address or nil pointer dereference
QUERY:          create table dcomptable (f1 dcomptype[]);
RECEIVED ERROR: table with name dcomptable already exists (errno 1105) (sqlstate HY000)
QUERY:          drop table dcomptable;
RECEIVED ERROR: runtime error: invalid memory address or nil pointer dereference
QUERY:          create domain dnotnull varchar(15) NOT NULL;
RECEIVED ERROR: runtime error: invalid memory address or nil pointer dereference
QUERY:          create domain dnull    varchar(15);
RECEIVED ERROR: runtime error: invalid memory address or nil pointer dereference
QUERY:          create domain dcheck   varchar(15) NOT NULL CHECK (VALUE = 'a' OR VALUE = 'c' OR VALUE = 'd');
RECEIVED ERROR: runtime error: invalid memory address or nil pointer dereference
QUERY:          SELECT cast('1' as dnotnull);
RECEIVED ERROR: DoltgresHandler caught panic: runtime error: invalid memory address or nil pointer dereference: goroutine 313965 [running]:
runtime/debug.Stack()
	/opt/hostedtoolcache/go/1.25.6/x64/src/runtime/debug/stack.go:26 +0x5e
github.com/dolthub/doltgresql/server.(*DoltgresHandler).resultForDefaultIter.func1(0xc00339bf30)
	/home/runner/work/doltgresql/doltgresql/server/doltgres_handler.go:631 +0x58
panic({0x3cb4720?, 0x7d26520?})
	/opt/hostedtoolcache/go/1.25.6/x64/src/runtime/panic.go:783 +0x132
github.com/dolthub/dolt/go/store/prolly/tree.(*Node).TreeCount(...)
	/home/runner/go/pkg/mod/github.com/dolthub/dolt/[email protected]/store/prolly/tree/node.go:177
github.com/dolthub/dolt/go/store/prolly/tree.StaticMap[...].Count(0x39d2b8dd5d6352bd?)
	/home/runner/go/pkg/mod/github.com/dolthub/dolt/[email protected]/store/prolly/tree/map.go:214 +0x1d
github.com/dolthub/dolt/go/store/prolly.AddressMap.Count(...)
	/home/runner/go/pkg/mod/github.com/dolthub/dolt/[email protected]/store/prolly/address_map.go:66
github.com/dolthub/doltgresql/core/typecollection.(*TypeCollection).UpdateRoot(0xc052956cf0, {0x58db040, 0xc05e7a35e0}, {0x5a5f958, 0xc0427265a0})
	/home/runner/work/doltgresql/doltgresql/core/typecollection/collection_funcs.go:171 +0x55
github.com/dolthub/doltgresql/core.updateSessionRootForDatabase(0xc05e7a35e0, {0xc07ec52ed1, 0xa}, 0xc05d5182c0)
	/home/runner/work/doltgresql/doltgresql/core/context.go:473 +0x4c6
github.com/dolthub/doltgresql/core.CloseContextRootFinalizer(0xc05e7a35e0)
	/home/runner/work/doltgresql/doltgresql/core/context.go:412 +0xa5
github.com/dolthub/doltgresql/server/node.(*rootFinalizerIter).Close(0x1004baa85?, 0xc05e7a35e0)
	/home/runner/work/doltgresql/doltgresql/server/node/context_root_finalizer.go:112 +0x55
github.com/dolthub/go-mysql-server/sql/rowexec.(*TransactionCommittingIter).Close(0xc050cca690, 0xc05e7a35e0)
	/home/runner/go/pkg/mod/github.com/dolthub/[email protected]/sql/rowexec/transaction_iters.go:116 +0x37
github.com/dolthub/go-mysql-server/sql/plan.(*TrackedRowIter).Close(0xc002e45940, 0xc05e7a35e0)
	/home/runner/go/pkg/mod/github.com/dolthub/[email protected]/sql/plan/process.go:340 +0x26
github.com/dolthub/doltgresql/server.(*DoltgresHandler).resultForDefaultIter.func4()
	/home/runner/work/doltgresql/doltgresql/server/doltgres_handler.go:738 +0x8b
golang.org/x/sync/errgroup.(*Group).Go.func1()
	/home/runner/go/pkg/mod/golang.org/x/[email protected]/errgroup/errgroup.go:93 +0x50
created by golang.org/x/sync/errgroup.(*Group).Go in goroutine 312936
	/home/runner/go/pkg/mod/golang.org/x/[email protected]/errgroup/errgroup.go:78 +0x95 (errno 1105) (sqlstate HY000)
QUERY:          drop domain dnotnull restrict;
RECEIVED ERROR: runtime error: invalid memory address or nil pointer dereference
QUERY:          drop domain dnull restrict;
RECEIVED ERROR: runtime error: invalid memory address or nil pointer dereference
QUERY:          drop domain dcheck restrict;
RECEIVED ERROR: runtime error: invalid memory address or nil pointer dereference
QUERY:          create domain ddef1 int4 DEFAULT 3;
RECEIVED ERROR: runtime error: invalid memory address or nil pointer dereference
QUERY:          create domain ddef2 oid DEFAULT '12';
RECEIVED ERROR: runtime error: invalid memory address or nil pointer dereference
QUERY:          create domain ddef3 text DEFAULT 5;
RECEIVED ERROR: runtime error: invalid memory address or nil pointer dereference
QUERY:          create sequence ddef4_seq;
RECEIVED ERROR: runtime error: invalid memory address or nil pointer dereference
QUERY:          create domain ddef4 int4 DEFAULT nextval('ddef4_seq');
RECEIVED ERROR: runtime error: invalid memory address or nil pointer dereference

${\color{lightgreen}Progressions (10)}$

domain

QUERY: insert into vc4table values(array['too long']);
QUERY: insert into domcontest values (-5);
QUERY: insert into domcontest values (-5);
QUERY: alter table domain_test add column c str_domain;
QUERY: select null::inotnull;

errors

QUERY: select;

psql

QUERY: SELECT 

union

QUERY: select union select;
QUERY: select intersect select;
QUERY: select except select;

Footnotes

  1. These are tests that we're marking as Successful, however they do not match the expected output in some way. This is due to small differences, such as different wording on the error messages, or the column names being incorrect while the data itself is correct.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Enums: reported column attribute is incorrect Empty SELECT --> spurious error

1 participant