pingcap / pingcap/tidb

Unexpected assert failed, "After column pruning, some operator got zero row output"

Open
#60,215 1 comment 0 reactions 1 assignee Claimed by @hawkingrei View on GitHub
fuzz/randomtest internal-check sig/planner type/bug
Dominant language
Go
Stars
40.5k
Forks
6.2k
PR merge metrics
PR metrics pending

Description

## Bug Report

Please answer these questions before submitting your issue. Thanks!

### 1. Minimal reproduce step (Required)
It's reported in our internal test schrddl
``` SQL
CREATE TABLE `t1c1dc8e9` (
`col_55` bigint DEFAULT NULL,
`col_56` timestamp NULL DEFAULT NULL,
`col_57` double NOT NULL DEFAULT '7864.051242740703',
`col_58` bigint NOT NULL,
`col_59` char(56) COLLATE utf8_general_ci NOT NULL,
`col_60` float DEFAULT NULL,
`col_61` mediumint NOT NULL,
`col_62` json DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
CREATE TABLE `tcff59626` (
`col_8` mediumint NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
SELECT SUM((NOT (ISNULL(`st_110`.`r1`))) IS TRUE) FROM (`t1c1dc8e9`) JOIN (SELECT MIN(`tcff59626`.`col_8`) AS `r0`,`tcff59626`.`col_8` AS `r1`,CONCAT(`tcff59626`.`col_8`, `tcff59626`.`col_8`) AS `r2`,LPAD(`tcff59626`.`col_8`, 5, `tcff59626`.`col_8`) AS `r3` FROM `tcff59626` WHERE ISNULL(`tcff59626`.`col_8`) GROUP BY `tcff59626`.`col_8` HAVING `tcff59626`.`col_8`>=-3470198 AND ISNULL(`tcff59626`.`col_8`) LIMIT 850109814) AS `st_110` LIMIT 944175260;

```

### 2. What did you expect to see? (Required)
No error
### 3. What did you see instead (Required)
assert failed
### 4. What is your TiDB version? (Required)
master

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.