Skip to content

Commit e63e249

Browse files
authored
fix keep order in table scan is lost when remote read of PartitionTableScan (#7529) (#7536)
close #7519
1 parent 0b00195 commit e63e249

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

dbms/src/Flash/Coprocessor/TiDBTableScan.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ TiDBTableScan::TiDBTableScan(
2727
// Only No-partition table need keep order when tablescan executor required keep order.
2828
// If keep_order is not set, keep order for safety.
2929
, keep_order(!is_partition_table_scan && (table_scan->tbl_scan().keep_order() || !table_scan->tbl_scan().has_keep_order()))
30-
, is_fast_scan(table_scan->tbl_scan().is_fast_scan())
30+
, is_fast_scan(is_partition_table_scan ? table_scan->partition_table_scan().is_fast_scan() : table_scan->tbl_scan().is_fast_scan())
3131
{
3232
if (is_partition_table_scan)
3333
{
@@ -75,6 +75,7 @@ void TiDBTableScan::constructTableScanForRemoteRead(tipb::TableScan * tipb_table
7575
for (auto id : partition_table_scan.primary_prefix_column_ids())
7676
tipb_table_scan->add_primary_prefix_column_ids(id);
7777
tipb_table_scan->set_is_fast_scan(partition_table_scan.is_fast_scan());
78+
tipb_table_scan->set_keep_order(false);
7879
}
7980
else
8081
{

0 commit comments

Comments
 (0)