pingcap / tidb

TiDB is an open-source, cloud-native, distributed, MySQL-Compatible database for elastic scale and real-time analytics. Try AI-powered Chat2Query free at : https://www.pingcap.com/tidb-serverless/
https://pingcap.com
Apache License 2.0
36.53k stars 5.74k forks source link

planner: tidb_shard does not work with mpp #36836

Open JaySon-Huang opened 1 year ago

JaySon-Huang commented 1 year ago

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

CREATE TABLE `lineorder` (
  `LO_ORDERKEY` int(11) NOT NULL,
  `LO_LINENUMBER` int(11) NOT NULL,
  `LO_CUSTKEY` int(11) DEFAULT NULL,
  `LO_PARTKEY` int(11) DEFAULT NULL,
  `LO_SUPPKEY` int(11) DEFAULT NULL,
  `LO_ORDERDATE` int(11) DEFAULT NULL,
  `LO_ORDPRIORITY` char(15) DEFAULT NULL,
  `LO_SHIPPRIORITY` char(1) DEFAULT NULL,
  `LO_QUANTITY` int(11) DEFAULT NULL,
  `LO_EXTENDEDPRICE` decimal(10,0) DEFAULT NULL,
  `LO_DISCOUNT` int(11) DEFAULT NULL,
  `LO_REVENUE` decimal(10,0) DEFAULT NULL,
  `LO_SUPPLYCOST` decimal(10,0) DEFAULT NULL,
  `LO_TAX` int(11) DEFAULT NULL,
  `LO_COMMITDATE` int(11) DEFAULT NULL,
  `LO_SHIPMODE` char(10) DEFAULT NULL,
  KEY `idx_lo_custkey` (`LO_CUSTKEY`),
  UNIQUE KEY `UK_ORDR_LINE` ((tidb_shard(`LO_ORDERKEY`)),`LO_ORDERKEY`,`LO_LINENUMBER`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin /*T! SHARD_ROW_ID_BITS=6 */;
CREATE TABLE `date` (
  `D_DATEKEY` int(11) NOT NULL,
  `D_DATE` varchar(18) DEFAULT NULL,
  `D_DATEOFWEEK` varchar(9) DEFAULT NULL,
  `D_MONTH` varchar(9) DEFAULT NULL,
  `D_YEAR` int(11) DEFAULT NULL,
  `D_YEARMONTHNUM` int(11) DEFAULT NULL,
  `D_YEARMONTH` char(7) DEFAULT NULL,
  `D_DAYNUMINWEEK` int(11) DEFAULT NULL,
  `D_DAYNUMINMONTH` int(11) DEFAULT NULL,
  `D_DAYNUMINYEAR` int(11) DEFAULT NULL,
  `D_MONTHNUMINYEAR` int(11) DEFAULT NULL,
  `D_WEEKNUMINYEAR` int(11) DEFAULT NULL,
  `D_SELLINGSEASON` char(15) DEFAULT NULL,
  `D_LASTDAYINWEEKFL` tinyint(1) DEFAULT NULL,
  `D_LASTDAYINMONTHFL` tinyint(1) DEFAULT NULL,
  `D_HOLIDAYFL` tinyint(1) DEFAULT NULL,
  `D_WEEKDAYFL` tinyint(1) DEFAULT NULL,
  PRIMARY KEY (`D_DATEKEY`) /*T![clustered_index] CLUSTERED */,
  KEY `idx_d_date` (`D_DATE`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;

alter table `lineorder` set tiflash replica 1;
alter table `date` set tiflash replica 1;

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

explain SELECT SUM(LO_EXTENDEDPRICE*LO_DISCOUNT) AS REVENUE FROM `LINEORDER`, `DATE` WHERE LO_ORDERDATE = D_DATEKEY AND D_YEAR = 1993 AND LO_DISCOUNT BETWEEN 1 AND 3 AND LO_QUANTITY<25;
+------------------------------------------+--------------+--------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------+
| id                                       | estRows      | task         | access object   | operator info                                                                                                                                  |
+------------------------------------------+--------------+--------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------+
| HashAgg_36                               | 1.00         | root         |                 | funcs:sum(Column#37)->Column#36                                                                                                                |
| └─TableReader_38                         | 1.00         | root         |                 | data:ExchangeSender_37                                                                                                                         |
|   └─ExchangeSender_37                    | 1.00         | mpp[tiflash] |                 | ExchangeType: PassThrough                                                                                                                      |
|     └─HashAgg_13                         | 1.00         | mpp[tiflash] |                 | funcs:sum(Column#38)->Column#37                                                                                                                |
|       └─Projection_45                    | 766733.34    | mpp[tiflash] |                 | mul(hat.lineorder.lo_extendedprice, cast(hat.lineorder.lo_discount, decimal(20,0) BINARY))->Column#38                                          |
|         └─Projection_34                  | 766733.34    | mpp[tiflash] |                 | hat.lineorder.lo_extendedprice, hat.lineorder.lo_discount                                                                                      |
|           └─HashJoin_35                  | 766733.34    | mpp[tiflash] |                 | inner join, equal:[eq(hat.date.d_datekey, hat.lineorder.lo_orderdate)]                                                                         |
|             ├─ExchangeReceiver_23(Build) | 2.56         | mpp[tiflash] |                 |                                                                                                                                                |
|             │ └─ExchangeSender_22        | 2.56         | mpp[tiflash] |                 | ExchangeType: Broadcast                                                                                                                        |
|             │   └─Selection_21           | 2.56         | mpp[tiflash] |                 | eq(hat.date.d_year, 1993)                                                                                                                      |
|             │     └─TableFullScan_20     | 2557.00      | mpp[tiflash] | table:date      | keep order:false                                                                                                                               |
|             └─Selection_25(Probe)        | 4992370.53   | mpp[tiflash] |                 | ge(hat.lineorder.lo_discount, 1), le(hat.lineorder.lo_discount, 3), lt(hat.lineorder.lo_quantity, 25), not(isnull(hat.lineorder.lo_orderdate)) |
|               └─TableFullScan_24         | 601488614.00 | mpp[tiflash] | table:lineorder | keep order:false, stats:pseudo                                                                                                                 |
+------------------------------------------+--------------+--------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------+

3. What did you see instead (Required)

tidb don't choose the mpp plan, causing AP QPS drops

explain SELECT SUM(LO_EXTENDEDPRICE*LO_DISCOUNT) AS REVENUE FROM `LINEORDER`, `DATE` WHERE LO_ORDERDATE = D_DATEKEY AND D_YEAR = 1993 AND LO_DISCOUNT BETWEEN 1 AND 3 AND LO_QUANTITY<25;
+------------------------------+--------------+--------------+-----------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+
| id                           | estRows      | task         | access object   | operator info                                                                                                                                           |
+------------------------------+--------------+--------------+-----------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+
| HashAgg_12                   | 1.00         | root         |                 | funcs:sum(Column#37)->Column#36                                                                                                                         |
| └─Projection_67              | 78524728.51  | root         |                 | mul(hat.lineorder.lo_extendedprice, cast(hat.lineorder.lo_discount, decimal(20,0) BINARY))->Column#37                                                   |
|   └─HashJoin_30              | 78524728.51  | root         |                 | inner join, equal:[eq(hat.date.d_datekey, hat.lineorder.lo_orderdate)]                                                                                  |
|     ├─TableReader_49(Build)  | 365.00       | root         |                 | data:Selection_48                                                                                                                                       |
|     │ └─Selection_48         | 365.00       | cop[tiflash] |                 | eq(hat.date.d_year, 1993)                                                                                                                               |
|     │   └─TableFullScan_47   | 2557.00      | cop[tiflash] | table:date      | keep order:false                                                                                                                                        |
|     └─Projection_43(Probe)   | 600156011.00 | root         |                 | hat.lineorder.lo_orderdate, hat.lineorder.lo_quantity, hat.lineorder.lo_extendedprice, hat.lineorder.lo_discount, tidb_shard(hat.lineorder.lo_orderkey) |
|       └─TableReader_42       | 78524728.51  | root         |                 | data:Selection_41                                                                                                                                       |
|         └─Selection_41       | 78524728.51  | cop[tiflash] |                 | ge(hat.lineorder.lo_discount, 1), le(hat.lineorder.lo_discount, 3), lt(hat.lineorder.lo_quantity, 25), not(isnull(hat.lineorder.lo_orderdate))          |
|           └─TableFullScan_40 | 600156011.00 | cop[tiflash] | table:lineorder | keep order:false                                                                                                                                        |
+------------------------------+--------------+--------------+-----------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+

4. What is your TiDB version? (Required)

https://github.com/pingcap/tidb/commit/137041ac743c24e809e96ac5512dae429a02e7b1 @ release-6.2

chrysan commented 1 year ago
mysql> set session tidb_enforce_mpp=ON;
Query OK, 0 rows affected (0.04 sec)

mysql> explain SELECT SUM(LO_EXTENDEDPRICE*LO_DISCOUNT) AS REVENUE   FROM HAT.LINEORDER, HAT.DATE   WHERE LO_ORDERDATE = D_DATEKEY   AND D_YEAR = 1993   AND LO_DISCOUNT BETWEEN 1 AND 3   AND LO_QUANTITY<25;
+----------------------------------+--------------+--------------+-----------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+
| id                               | estRows      | task         | access object   | operator info                                                                                                                                           |
+----------------------------------+--------------+--------------+-----------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+
| HashAgg_13                       | 1.00         | root         |                 | funcs:sum(Column#37)->Column#36                                                                                                                         |
| └─Projection_72                  | 4992370.53   | root         |                 | mul(hat.lineorder.lo_extendedprice, cast(hat.lineorder.lo_discount, decimal(20,0) BINARY))->Column#37                                                   |
|   └─HashJoin_32                  | 4992370.53   | root         |                 | inner join, equal:[eq(hat.date.d_datekey, hat.lineorder.lo_orderdate)]                                                                                  |
|     ├─TableReader_51(Build)      | 365.00       | root         |                 | data:Selection_50                                                                                                                                       |
|     │ └─Selection_50             | 365.00       | cop[tiflash] |                 | eq(hat.date.d_year, 1993)                                                                                                                               |
|     │   └─TableFullScan_49       | 2557.00      | cop[tiflash] | table:date      | keep order:false                                                                                                                                        |
|     └─Projection_45(Probe)       | 601488614.00 | root         |                 | hat.lineorder.lo_orderdate, hat.lineorder.lo_quantity, hat.lineorder.lo_extendedprice, hat.lineorder.lo_discount, tidb_shard(hat.lineorder.lo_orderkey) |
|       └─TableReader_44           | 4992370.53   | root         |                 | data:Selection_43                                                                                                                                       |
|         └─Selection_43           | 4992370.53   | cop[tiflash] |                 | ge(hat.lineorder.lo_discount, 1), le(hat.lineorder.lo_discount, 3), lt(hat.lineorder.lo_quantity, 25), not(isnull(hat.lineorder.lo_orderdate))          |
|           └─TableFullScan_42     | 601488614.00 | cop[tiflash] | table:lineorder | keep order:false, stats:pseudo                                                                                                                          |
+----------------------------------+--------------+--------------+-----------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+
10 rows in set, 1 warning (0.04 sec)

mysql> show warnings;
+---------+------+---------------------------------------------------------------------------------------------------------------------------+
| Level   | Code | Message                                                                                                                   |
+---------+------+---------------------------------------------------------------------------------------------------------------------------+
| Warning | 1105 | MPP mode may be blocked because column `hat.lineorder._v$_uk_ordr_line_0` is a virtual column which is not supported now. |
+---------+------+---------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.04 sec)
chrysan commented 1 year ago

related with https://github.com/pingcap/tidb/pull/30659 and https://github.com/pingcap/tidb/pull/36771. The special virtual column tidb_shard('xxx'):

  1. should not be considered as "used columns" in rule_partition_pruning
  2. should not affect the access paths selection
  3. should not be kept in projection if the related shard_index is not selected, which makes projection and following operators cannot be pushdown to tiflash
  4. should only be kept when shard_index is selected
JaySon-Huang commented 1 year ago

Workaround by setting the tidb_isolation_read_engines variables in tidb

hat> select @@tidb_isolation_read_engines;
+-------------------------------+
| @@tidb_isolation_read_engines |
+-------------------------------+
| tikv,tiflash,tidb             |
+-------------------------------+
hat> explain SELECT SUM(LO_EXTENDEDPRICE*LO_DISCOUNT) AS REVENUE FROM `LINEORDER`, `DATE` WHERE LO_ORDERDATE = D_DATEKEY AND D_YEAR = 1993 AND LO_DISCOUNT BETWEEN 1 AND 3 AND LO_QUANTITY<25;
+------------------------------+--------------+--------------+-----------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+
| id                           | estRows      | task         | access object   | operator info                                                                                                                                           |
+------------------------------+--------------+--------------+-----------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+
| HashAgg_12                   | 1.00         | root         |                 | funcs:sum(Column#37)->Column#36                                                                                                                         |
| └─Projection_67              | 78562639.16  | root         |                 | mul(hat.lineorder.lo_extendedprice, cast(hat.lineorder.lo_discount, decimal(20,0) BINARY))->Column#37                                                   |
|   └─HashJoin_30              | 78562639.16  | root         |                 | inner join, equal:[eq(hat.date.d_datekey, hat.lineorder.lo_orderdate)]                                                                                  |
|     ├─TableReader_49(Build)  | 365.00       | root         |                 | data:Selection_48                                                                                                                                       |
|     │ └─Selection_48         | 365.00       | cop[tiflash] |                 | eq(hat.date.d_year, 1993)                                                                                                                               |
|     │   └─TableFullScan_47   | 2557.00      | cop[tiflash] | table:date      | keep order:false                                                                                                                                        |
|     └─Projection_43(Probe)   | 600445758.00 | root         |                 | hat.lineorder.lo_orderdate, hat.lineorder.lo_quantity, hat.lineorder.lo_extendedprice, hat.lineorder.lo_discount, tidb_shard(hat.lineorder.lo_orderkey) |
|       └─TableReader_42       | 78562639.16  | root         |                 | data:Selection_41                                                                                                                                       |
|         └─Selection_41       | 78562639.16  | cop[tiflash] |                 | ge(hat.lineorder.lo_discount, 1), le(hat.lineorder.lo_discount, 3), lt(hat.lineorder.lo_quantity, 25), not(isnull(hat.lineorder.lo_orderdate))          |
|           └─TableFullScan_40 | 600445758.00 | cop[tiflash] | table:lineorder | keep order:false                                                                                                                                        |
+------------------------------+--------------+--------------+-----------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+

hat> set tidb_isolation_read_engines = "tiflash,tidb";
hat> select @@tidb_isolation_read_engines;
+-------------------------------+
| @@tidb_isolation_read_engines |
+-------------------------------+
| tiflash,tidb                  |
+-------------------------------+
hat> explain SELECT SUM(LO_EXTENDEDPRICE*LO_DISCOUNT) AS REVENUE FROM `LINEORDER`, `DATE` WHERE LO_ORDERDATE = D_DATEKEY AND D_YEAR = 1993 AND LO_DISCOUNT BETWEEN 1 AND 3 AND LO_QUANTITY<25;
+------------------------------------------+--------------+--------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------+
| id                                       | estRows      | task         | access object   | operator info                                                                                                                                  |
+------------------------------------------+--------------+--------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------+
| HashAgg_36                               | 1.00         | root         |                 | funcs:sum(Column#37)->Column#36                                                                                                                |
| └─TableReader_38                         | 1.00         | root         |                 | data:ExchangeSender_37                                                                                                                         |
|   └─ExchangeSender_37                    | 1.00         | mpp[tiflash] |                 | ExchangeType: PassThrough                                                                                                                      |
|     └─HashAgg_13                         | 1.00         | mpp[tiflash] |                 | funcs:sum(Column#38)->Column#37                                                                                                                |
|       └─Projection_45                    | 78597834.48  | mpp[tiflash] |                 | mul(hat.lineorder.lo_extendedprice, cast(hat.lineorder.lo_discount, decimal(20,0) BINARY))->Column#38                                          |
|         └─Projection_34                  | 78597834.48  | mpp[tiflash] |                 | hat.lineorder.lo_extendedprice, hat.lineorder.lo_discount                                                                                      |
|           └─HashJoin_35                  | 78597834.48  | mpp[tiflash] |                 | inner join, equal:[eq(hat.date.d_datekey, hat.lineorder.lo_orderdate)]                                                                         |
|             ├─ExchangeReceiver_23(Build) | 365.00       | mpp[tiflash] |                 |                                                                                                                                                |
|             │ └─ExchangeSender_22        | 365.00       | mpp[tiflash] |                 | ExchangeType: Broadcast                                                                                                                        |
|             │   └─Selection_21           | 365.00       | mpp[tiflash] |                 | eq(hat.date.d_year, 1993)                                                                                                                      |
|             │     └─TableFullScan_20     | 2557.00      | mpp[tiflash] | table:date      | keep order:false                                                                                                                               |
|             └─Selection_25(Probe)        | 78597834.48  | mpp[tiflash] |                 | ge(hat.lineorder.lo_discount, 1), le(hat.lineorder.lo_discount, 3), lt(hat.lineorder.lo_quantity, 25), not(isnull(hat.lineorder.lo_orderdate)) |
|               └─TableFullScan_24         | 600714752.00 | mpp[tiflash] | table:lineorder | keep order:false                                                                                                                               |
+------------------------------------------+--------------+--------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------+
qw4990 commented 1 year ago

PTAL @winoros

qw4990 commented 2 months ago

Can't reproduce this issue, please contact me if it occurs again.

JaySon-Huang commented 2 months ago

@qw4990 The issue still exist in the master branch

When tidb_isolation_read_engines = "tiflash,tidb", the HashJoin is executed on TiFlash

TiDB root@127.0.0.1:test> set tidb_isolation_read_engines = "tiflash,tidb";
Query OK, 0 rows affected
Time: 0.001s
TiDB root@127.0.0.1:test> set session tidb_enforce_mpp=ON;
Query OK, 0 rows affected
Time: 0.001s
TiDB root@127.0.0.1:test> explain SELECT SUM(LO_EXTENDEDPRICE*LO_DISCOUNT) AS REVENUE FROM `LINEORDER`, `DATE` WHERE LO_ORDERDATE = D_DATEKEY AND D_YEAR = 1993 AND LO_DISCOUNT BETWEEN 1 AND 3 AND LO_QUANTITY<25;
+----------------------------------------+---------+--------------+-----------------+-------------------------------------------------------------------------------------------------------------------------+
| id                                     | estRows | task         | access object   | operator info                                                                                                           |
+----------------------------------------+---------+--------------+-----------------+-------------------------------------------------------------------------------------------------------------------------+
| StreamAgg_18                           | 1.00    | root         |                 | funcs:sum(Column#39)->Column#36                                                                                         |
| └─Projection_76                        | 12.50   | root         |                 | mul(test.lineorder.lo_extendedprice, cast(test.lineorder.lo_discount, decimal(10,0) BINARY))->Column#39                 |
|   └─TableReader_71                     | 12.50   | root         |                 | MppVersion: 2, data:ExchangeSender_70                                                                                   |
|     └─ExchangeSender_70                | 12.50   | mpp[tiflash] |                 | ExchangeType: PassThrough                                                                                               |
|       └─Projection_69                  | 12.50   | mpp[tiflash] |                 | test.lineorder.lo_extendedprice, test.lineorder.lo_discount                                                             |
|         └─HashJoin_68                  | 12.50   | mpp[tiflash] |                 | inner join, equal:[eq(test.date.d_datekey, test.lineorder.lo_orderdate)]                                                |
|           ├─ExchangeReceiver_29(Build) | 10.00   | mpp[tiflash] |                 |                                                                                                                         |
|           │ └─ExchangeSender_28        | 10.00   | mpp[tiflash] |                 | ExchangeType: Broadcast, Compression: FAST                                                                              |
|           │   └─Projection_25          | 10.00   | mpp[tiflash] |                 | test.date.d_datekey                                                                                                     |
|           │     └─TableFullScan_26     | 10.00   | mpp[tiflash] | table:date      | pushed down filter:eq(test.date.d_year, 1993), keep order:false, stats:pseudo                                           |
|           └─Projection_30(Probe)       | 83.00   | mpp[tiflash] |                 | test.lineorder.lo_extendedprice, test.lineorder.lo_discount, test.lineorder.lo_orderdate                                |
|             └─Selection_32             | 83.00   | mpp[tiflash] |                 | lt(test.lineorder.lo_quantity, 25), not(isnull(test.lineorder.lo_orderdate))                                            |
|               └─TableFullScan_31       | 250.00  | mpp[tiflash] | table:lineorder | pushed down filter:ge(test.lineorder.lo_discount, 1), le(test.lineorder.lo_discount, 3), keep order:false, stats:pseudo |
+----------------------------------------+---------+--------------+-----------------+-------------------------------------------------------------------------------------------------------------------------+

While when tidb_isolation_read_engines = "tiflash,tidb,tikv"; the HashJoin is executed in tidb rather than tiflash. This is unexpected and causing performance regression compare to the previous execution plan.

TiDB root@127.0.0.1:test> set tidb_isolation_read_engines = "tiflash,tidb,tikv";
Query OK, 0 rows affected
Time: 0.001s
TiDB root@127.0.0.1:test> set session tidb_enforce_mpp=ON;
Query OK, 0 rows affected
Time: 0.001s
TiDB root@127.0.0.1:test> explain SELECT SUM(LO_EXTENDEDPRICE*LO_DISCOUNT) AS REVENUE FROM `LINEORDER`, `DATE` WHERE LO_ORDERDATE = D_DATEKEY AND D_YEAR = 1993 AND LO_DISCOUNT BETWEEN 1 AND 3 AND LO_QUANTITY<25;
+--------------------------------+---------+--------------+-----------------+-------------------------------------------------------------------------------------------------------------------------+
| id                             | estRows | task         | access object   | operator info                                                                                                           |
+--------------------------------+---------+--------------+-----------------+-------------------------------------------------------------------------------------------------------------------------+
| StreamAgg_18                   | 1.00    | root         |                 | funcs:sum(Column#37)->Column#36                                                                                         |
| └─Projection_62                | 12.50   | root         |                 | mul(test.lineorder.lo_extendedprice, cast(test.lineorder.lo_discount, decimal(10,0) BINARY))->Column#37                 |
|   └─HashJoin_59                | 12.50   | root         |                 | inner join, equal:[eq(test.date.d_datekey, test.lineorder.lo_orderdate)]                                                |
|     ├─TableReader_42(Build)    | 10.00   | root         |                 | MppVersion: 2, data:ExchangeSender_41                                                                                   |
|     │ └─ExchangeSender_41      | 10.00   | mpp[tiflash] |                 | ExchangeType: PassThrough                                                                                               |
|     │   └─Projection_33        | 10.00   | mpp[tiflash] |                 | test.date.d_datekey                                                                                                     |
|     │     └─TableFullScan_26   | 10.00   | mpp[tiflash] | table:date      | pushed down filter:eq(test.date.d_year, 1993), keep order:false, stats:pseudo                                           |
|     └─Projection_43(Probe)     | 83.00   | root         |                 | test.lineorder.lo_extendedprice, test.lineorder.lo_discount, test.lineorder.lo_orderdate                                |
|       └─TableReader_52         | 83.00   | root         |                 | MppVersion: 2, data:ExchangeSender_51                                                                                   |
|         └─ExchangeSender_51    | 83.00   | mpp[tiflash] |                 | ExchangeType: PassThrough                                                                                               |
|           └─Selection_50       | 83.00   | mpp[tiflash] |                 | lt(test.lineorder.lo_quantity, 25), not(isnull(test.lineorder.lo_orderdate))                                            |
|             └─TableFullScan_49 | 250.00  | mpp[tiflash] | table:lineorder | pushed down filter:ge(test.lineorder.lo_discount, 1), le(test.lineorder.lo_discount, 3), keep order:false, stats:pseudo |
+--------------------------------+---------+--------------+-----------------+-------------------------------------------------------------------------------------------------------------------------+
12 rows in set
Time: 0.010s
TiDB root@127.0.0.1:test> show warnings
+---------+------+----------------------------------------------------------------------------------------------------------------------------+
| Level   | Code | Message                                                                                                                    |
+---------+------+----------------------------------------------------------------------------------------------------------------------------+
| Warning | 1105 | MPP mode may be blocked because column `test.lineorder._v$_uk_ordr_line_0` is a virtual column which is not supported now. |
| Warning | 1105 | MPP mode may be blocked because column `test.lineorder._v$_uk_ordr_line_0` is a virtual column which is not supported now. |
+---------+------+----------------------------------------------------------------------------------------------------------------------------+
TiDB root@127.0.0.1:test> select tidb_version() \G
***************************[ 1. row ]***************************
tidb_version() | Release Version: v8.2.0-alpha-22-gcf5c68e
Edition: Community
Git Commit Hash: cf5c68e55587c29d13957ea9db26073f2f7aaf53
Git Branch: HEAD
UTC Build Time: 2024-04-23 16:48:36
GoVersion: go1.21.4
Race Enabled: false
Check Table Before Drop: false
Store: tikv