final mode scalar agg function does not push down tiflash, and without warnings
- 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)
```
DROP TABLE IF EXISTS c_t2;
CREATE TABLE `c_t2` (
`c1` int(11) DEFAULT NULL,
`c2` varchar(50) DEFAULT NULL,
`c3` varchar(1) NOT NULL DEFAULT 'N',
`c4` varchar(32) NOT NULL DEFAULT 'sys',
`c5` varchar(32) NOT NULL DEFAULT 'sys',
`c6` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`c7` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`c8` bigint(20) NOT NULL DEFAULT '0',
`c9` varchar(50) DEFAULT NULL
);
ALTER TABLE c_t2 SET TIFLASH REPLICA 1;
set tidb_allow_mpp=1;set tidb_enforce_mpp=1; set tidb_isolation_read_engines='tiflash';
explain
select
GROUP_CONCAT(
'"',
replace(c9, '*', '_'),
'":',
c1,
''
)
from
c_t2;
```
### 2. What did you expect to see? (Required)
final mode `group_concat` push down tiflash
### 3. What did you see instead (Required)
```
+--------------------------------+----------+--------------+---------------+---------------------------------------------------------------------------------------+
| id | estRows | task | access object | operator info |
+--------------------------------+----------+--------------+---------------+---------------------------------------------------------------------------------------+
| HashAgg_17 | 1.00 | root | | funcs:group_concat(Column#12 separator ",")->Column#11 |
| └─TableReader_19 | 1.00 | root | | MppVersion: 2, data:ExchangeSender_18 |
| └─ExchangeSender_18 | 1.00 | mpp[tiflash] | | ExchangeType: PassThrough |
| └─HashAgg_9 | 1.00 | mpp[tiflash] | | funcs:group_concat(""", Column#14, "":", Column#15, "" separator ",")->Column#12 |
| └─Projection_28 | 10000.00 | mpp[tiflash] | | replace(test.c_t2.c9, *, _)->Column#14, cast(test.c_t2.c1, var_string(20))->Column#15 |
| └─TableFullScan_16 | 10000.00 | mpp[tiflash] | table:c_t2 | keep order:false, stats:pseudo |
+--------------------------------+----------+--------------+---------------+---------------------------------------------------------------------------------------+
```
### 4. What is your TiDB version? (Required)
Git Commit Hash: 7ba2330394bcfa1dcd321293c2656604c3a664ab
Contributor guide
Assessment
This issue has not been assessed yet.