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: non-nullable column with no value #74727

Closed
cockroach-teamcity opened this issue Jan 12, 2022 · 4 comments
Closed

sql: non-nullable column with no value #74727

cockroach-teamcity opened this issue Jan 12, 2022 · 4 comments
Assignees
Labels
C-test-failure Broken test (automatically or manually discovered). O-roachtest O-robot Originated from a bot. T-sql-queries SQL Queries Team
Projects

Comments

@cockroach-teamcity
Copy link
Member

roachtest.sqlsmith/setup=rand-tables/setting=no-ddl failed with artifacts on release-21.2 @ b4a27f3634e3e41dc3966214cf05ff6870c055c5:

		  | github.com/cockroachdb/cockroach/pkg/sql/colflow.(*batchInfoCollector).Next
		  | 	/home/agent/work/.go/src/github.com/cockroachdb/cockroach/pkg/sql/colflow/stats.go:98
		  | github.com/cockroachdb/cockroach/pkg/sql/colexec.(*hashAggregator).Next
		  | 	/home/agent/work/.go/src/github.com/cockroachdb/cockroach/pkg/sql/colexec/hash_aggregator.go:246
		  | github.com/cockroachdb/cockroach/pkg/sql/colexec.(*diskSpillerBase).Next.func1
		  | 	/home/agent/work/.go/src/github.com/cockroachdb/cockroach/pkg/sql/colexec/disk_spiller.go:197
		  | github.com/cockroachdb/cockroach/pkg/sql/colexecerror.CatchVectorizedRuntimeError
		  | 	/home/agent/work/.go/src/github.com/cockroachdb/cockroach/pkg/sql/colexecerror/error.go:91
		  | github.com/cockroachdb/cockroach/pkg/sql/colexec.(*diskSpillerBase).Next
		  | 	/home/agent/work/.go/src/github.com/cockroachdb/cockroach/pkg/sql/colexec/disk_spiller.go:195
		  | github.com/cockroachdb/cockroach/pkg/sql/colflow.(*panicInjector).Next
		  | 	/home/agent/work/.go/src/github.com/cockroachdb/cockroach/pkg/sql/colflow/panic_injector.go:70
		  | github.com/cockroachdb/cockroach/pkg/sql/colflow.(*batchInfoCollector).Next
		  | 	/home/agent/work/.go/src/github.com/cockroachdb/cockroach/pkg/sql/colflow/stats.go:98
		  | github.com/cockroachdb/cockroach/pkg/sql/colexec/colexecutils.(*selBoolOp).Next
		  | 	/home/agent/work/.go/src/github.com/cockroachdb/cockroach/pkg/sql/colexec/colexecutils/bool_vec_to_sel.go:142
		  | github.com/cockroachdb/cockroach/pkg/sql/colexec/colexecutils.(*BoolVecToSelOp).Next
		  | 	/home/agent/work/.go/src/github.com/cockroachdb/cockroach/pkg/sql/colexec/colexecutils/bool_vec_to_sel.go:62
		  | github.com/cockroachdb/cockroach/pkg/sql/colexec/colexecbase.(*simpleProjectOp).Next
		  | 	/home/agent/work/.go/src/github.com/cockroachdb/cockroach/pkg/sql/colexec/colexecbase/simple_project.go:125
		  | github.com/cockroachdb/cockroach/pkg/sql/colexec.(*limitOp).Next
		  | 	/home/agent/work/.go/src/github.com/cockroachdb/cockroach/pkg/sql/colexec/limit.go:47
		  | github.com/cockroachdb/cockroach/pkg/sql/colflow.(*panicInjector).Next
		  | 	/home/agent/work/.go/src/github.com/cockroachdb/cockroach/pkg/sql/colflow/panic_injector.go:70
		  | github.com/cockroachdb/cockroach/pkg/sql/colflow.(*batchInfoCollector).Next
		  | 	/home/agent/work/.go/src/github.com/cockroachdb/cockroach/pkg/sql/colflow/stats.go:98
		  | github.com/cockroachdb/cockroach/pkg/sql/colexec/colexecutils.(*deselectorOp).Next
		  | 	/home/agent/work/.go/src/github.com/cockroachdb/cockroach/pkg/sql/colexec/colexecutils/deselector.go:63
		  | github.com/cockroachdb/cockroach/pkg/sql/colflow/colrpc.(*Outbox).sendBatches.func1
		  | 	/home/agent/work/.go/src/github.com/cockroachdb/cockroach/pkg/sql/colflow/colrpc/outbox.go:289
		  | github.com/cockroachdb/cockroach/pkg/sql/colexecerror.CatchVectorizedRuntimeError
		  | 	/home/agent/work/.go/src/github.com/cockroachdb/cockroach/pkg/sql/colexecerror/error.go:91
		  | github.com/cockroachdb/cockroach/pkg/sql/colflow/colrpc.(*Outbox).sendBatches
		  | 	/home/agent/work/.go/src/github.com/cockroachdb/cockroach/pkg/sql/colflow/colrpc/outbox.go:280
		  | github.com/cockroachdb/cockroach/pkg/sql/colflow/colrpc.(*Outbox).runWithStream
		  | 	/home/agent/work/.go/src/github.com/cockroachdb/cockroach/pkg/sql/colflow/colrpc/outbox.go:414
		Wraps: (2) non-nullable column "table1:col1_4" with no value! Index scanned was "primary" with the index key columns (rowid) and the values (?)
		Error types: (1) *withstack.withStack (2) *errutil.leafError
		stmt:
		SELECT
			count(*) AS col_70692
		FROM
			defaultdb.public.table1@table1_col1_5_expr_col1_4_col1_7_col1_11_col1_18_col1_16_col1_9_col1_14_col1_13_col1_17_expr1_key
				AS tab_35524
		GROUP BY
			tab_35524.col1_10
		HAVING
			every(false::BOOL)::BOOL
		LIMIT
			47:::INT8;
Reproduce

See: roachtest README

Same failure on other branches

/cc @cockroachdb/sql-queries

This test on roachdash | Improve this report!

@cockroach-teamcity cockroach-teamcity added branch-release-21.2 C-test-failure Broken test (automatically or manually discovered). O-roachtest 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. labels Jan 12, 2022
@cockroach-teamcity cockroach-teamcity added this to Triage in SQL Queries Jan 12, 2022
@blathers-crl blathers-crl bot added the T-sql-queries SQL Queries Team label Jan 12, 2022
@rytaft
Copy link
Collaborator

rytaft commented Jan 19, 2022

Looks similar to #70628, but this was on 21.2. @mgartner I presume that we are just not going to fix this on 21.2? Should we just close this?

Regardless, this doesn't seem like a release blocker, so removing the label.

@rytaft rytaft removed the release-blocker Indicates a release-blocker. Use with branch-release-2x.x label to denote which branch is blocked. label Jan 19, 2022
@rytaft rytaft changed the title roachtest: sqlsmith/setup=rand-tables/setting=no-ddl failed roachtest: sqlsmith/setup=rand-tables/setting=no-ddl failed: non-nullable column with no value Jan 19, 2022
@rytaft rytaft changed the title roachtest: sqlsmith/setup=rand-tables/setting=no-ddl failed: non-nullable column with no value sql: non-nullable column with no value Jan 19, 2022
@mgartner
Copy link
Collaborator

There's been a few different bugs that can cause this, so I'll reduce it down and determine which. Then I'll try to backport some changes to randgen that prevent creating schemas that can trigger this bug so we don't get repeated reports like this.

@mgartner mgartner self-assigned this Jan 19, 2022
@mgartner mgartner moved this from Triage to 22.1 January Milestone in SQL Queries Jan 19, 2022
@mgartner
Copy link
Collaborator

It's the result of a regnamespace::string cast in a computed column which should not be allowed. I'll have a PR up soon so that we stop generating these.

@mgartner
Copy link
Collaborator

mgartner commented Jan 19, 2022

See #75161. Closing this issue.

SQL Queries automation moved this from 22.1 January Milestone to Done Jan 19, 2022
craig bot pushed a commit that referenced this issue Jan 20, 2022
74737: spanconfigsqltranslator: introduce a pts table reader r=adityamaru a=adityamaru

This change introduces a `ProtectedTimestampTableReader`
that provides a txn scoped, in-memory view of the system
table that stores protected timestamp records.

The `SQLTranslator` will use this table reader to generate
SpanConfigs and SystemSpanConfigs in a follow up PR.

Informs: #73727

Release note: None

75125: *: replace "testdata" with sed scripts r=rickystewart a=otan

Not a proper audit, but 80% of the way there.
Refs: #71928

See individual commits for details

75161: randgen: do not create computed columns with bad volatilities r=mgartner a=mgartner

Some cast to STRING types has been given an incorrect volatility. For
example, REGCLASS->STRING casts are immutable when they should be stable
(see #74286 and #74553 for more details).

Creating computed column expressions with such a cast can cause logical
correctness bugs and internal errors. The volatilities cannot be fixed
without causing backward incompatibility. This commit prevents `randgen`
from creating computed columns with these casts so that sqlsmith and TLP
do not repetitively find these known volatility bugs.

Informs #74727

Release note: None

75165: kv: fix GenerateForcedRetryableError to return a bumped epoch r=lidorcarmel a=lidorcarmel

This is needed for PR #74563, where we change how txn is reset.
Without this change GenerateForcedRetryableError returns an
error with an inner txn that has an epoch 0. With this change
the epoch is copied from the original txn.

Release note: None

Co-authored-by: Aditya Maru <adityamaru@gmail.com>
Co-authored-by: Oliver Tan <otan@cockroachlabs.com>
Co-authored-by: Marcus Gartner <marcus@cockroachlabs.com>
Co-authored-by: Lidor Carmel <lidor@cockroachlabs.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-test-failure Broken test (automatically or manually discovered). O-roachtest O-robot Originated from a bot. T-sql-queries SQL Queries Team
Projects
Archived in project
Development

No branches or pull requests

3 participants