Comments (2)
I reduced this so far to:
SET CLUSTER SETTING sql.stats.automatic_collection.enabled = false;
CREATE TABLE table1 (col1_2 INT, col1_5 BYTES, col1_6 FLOAT4);
CREATE TABLE table3 (col3_0 INT);
ALTER TABLE table1 INJECT STATISTICS '[{"avg_size": 21, "columns": ["col1_5"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 4355941221932217744, "histo_col_type": "", "name": "__auto__", "null_count": 1441974855537419809, "row_count": 4360275294930779434}]';
INSERT INTO table1 (col1_6, col1_5, col1_2) VALUES (0, '1', 1);
INSERT INTO table1 (col1_6, col1_5, col1_2) VALUES (0, '', 2);
INSERT INTO table3 (col3_0) VALUES (1);
SET testing_optimizer_random_seed = 8309711156756112119;
SET testing_optimizer_disable_rule_probability = 0.500000;
SET vectorize = off;
SELECT
string_agg(tab_1893.col1_5::BYTES, tab_1893.col1_5::BYTES ORDER BY tab_1893.col1_5::BYTES ASC NULLS LAST)::BYTES
AS col_5396,
tab_1893.col1_6 AS col_5398
FROM
defaultdb.public.table1 AS tab_1893
WHERE
EXISTS(
SELECT
true AS col_5394
FROM
defaultdb.public.table3 AS tab_1897
)
GROUP BY
tab_1893.col1_6, tab_1893.col1_5
HAVING
bool_and(true::BOOL)::BOOL
ORDER BY
col_5398 DESC NULLS LAST,
tab_1893.col1_6 ASC NULLS FIRST,
col_5396 ASC NULLS FIRST,
tab_1893.col1_5 ASC NULLS FIRST
LIMIT
3;
RESET testing_optimizer_random_seed;
RESET testing_optimizer_disable_rule_probability;
SELECT
string_agg(tab_1893.col1_5::BYTES, tab_1893.col1_5::BYTES ORDER BY tab_1893.col1_5::BYTES ASC NULLS LAST)::BYTES
AS col_5396,
tab_1893.col1_6 AS col_5398
FROM
defaultdb.public.table1 AS tab_1893
WHERE
EXISTS(
SELECT
true AS col_5394
FROM
defaultdb.public.table3 AS tab_1897
)
GROUP BY
tab_1893.col1_6, tab_1893.col1_5
HAVING
bool_and(true::BOOL)::BOOL
ORDER BY
col_5398 DESC NULLS LAST,
tab_1893.col1_6 ASC NULLS FIRST,
col_5396 ASC NULLS FIRST,
tab_1893.col1_5 ASC NULLS FIRST
LIMIT
3;
The bug is only reproducible on 23.1 (23.2+ we hit an error that we can't decorrelate the subquery) and appears to only affect the row-by-row engine, so I'm removing the release blocker label.
from cockroach.
Ah, this is a dup of #124101. I'll backport one of the commits from this fix that should be non-contentions since debugging this problem is non-trivial.
from cockroach.
Related Issues (20)
- add SHOW TYPES WITH COMMENT
- add SHOW SCHEMAS WITH COMMENT
- sql/schema: support DDLs inside stored procedures and UDFs HOT 1
- sql/multi-region: warn user with the system db zone config is different than user db
- sql: TestCancelQueryPermissions failed HOT 1
- pkg/sql/logictest/tests/cockroach-go-testserver-23.2/cockroach-go-testserver-23_2_test: TestLogic_upgrade_skip_version failed HOT 1
- pkg/sql/logictest/tests/cockroach-go-testserver-23.2/cockroach-go-testserver-23_2_test: TestLogic_mixed_version_upgrade_preserve_ttl failed HOT 1
- ui: rendering index details page crashes for tenants with a non-empty statements list HOT 1
- internal/sqlsmith: TestGenerateParse failed HOT 1
- pkg/ccl/testccl/sqlstatsccl/sqlstatsccl_test: TestSQLStatsRegions failed HOT 1
- roachtest: admission-control/multitenant-fairness/write-heavy/even failed HOT 1
- roachtest: mvcc_gc failed HOT 15
- ccl/multiregionccl: TestTenantStartupWithMultiRegionEnum failed [kvserver.(*StoreMetrics).updateEngineMetrics attempted to decrement a counter] HOT 1
- roachtest: point-tombstone/heterogeneous-value-sizes failed HOT 2
- kv/kvserver/closedts/sidetransport: TestRPCConnUnblocksOnStopper failed HOT 1
- pkg/ccl/backupccl/backupinfo/backupinfo_test: TestManifestHandlingIteratorOperations failed
- roachtest: asyncpg failed HOT 3
- roachtest: apt_problem failed HOT 1
- Sentry: validate.go:466: relation × (1355): referenced table × (1359) is dropped (1) keys: [sql.schema.validation_errors.write.forward_references.relation] Wraps: (2) keys: [sql.schema.validation_er... HOT 1
- jobs: TestPauseReason failed
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cockroach.