pingcap / pingcap/tidb

tiflash MPP should fully support virtual column

Open
#44,707 0 comments 0 reactions 2 assignees Claimed by @AilinKid View on GitHub
affects-8.5 may-affects-5.4 may-affects-6.1 may-affects-6.5 may-affects-7.1 may-affects-7.5 may-affects-8.1 severity/major 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)

current tiflash MPPTaskType will be banned in a tiflash table candidate, returning invalid task instead.
```
if hasVirtualColumn && !canMppConvertToRootForDisaggregatedTiFlash {
return invalidTask, nil
}
```

Is that to say, we can fully support virtual columns in DisaggregatedTiFlash mode? Not exactly.

DisaggregatedTiFlash only supports cases like: [root task property required]
```
TableReader [root]
+--- sender [MPP] schema: [use children]
+------ table scan [MPP] schema: [a(virtual col as b+1), b]
```
Notice: nothing between the root table reader and MPP table scan except the shuffler.

How about there is a direct [MPP task property required], causing cases like:
```
TableReader [root] (let's say we found its root task required here, converting MPP to Root here)
+--- sender [MPP] schema: [use children]
+--- projection [MPP] schema: [a (virtual col as b+1)]
+------ table scan [MPP] schema: [a(virtual col as b+1), b]
```
as you see above, we this time convert the sub-MPP tree to RootTask when the sub-tree is not only a table scan, leading to the table reader's schema only containing a virtual column 'a'.

### 2. What did you expect to see? (Required)
execute successfully.

### 3. What did you see instead (Required)
can't resolve column 'a' in the tableReader

### 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.