Skip to content

Commit

Permalink
fix keep order in table scan is lost when remote read of PartitionTab…
Browse files Browse the repository at this point in the history
…leScan (#7529) (#7536)

close #7519
  • Loading branch information
ti-chi-bot authored May 24, 2023
1 parent 0b00195 commit e63e249
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion dbms/src/Flash/Coprocessor/TiDBTableScan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ TiDBTableScan::TiDBTableScan(
// Only No-partition table need keep order when tablescan executor required keep order.
// If keep_order is not set, keep order for safety.
, keep_order(!is_partition_table_scan && (table_scan->tbl_scan().keep_order() || !table_scan->tbl_scan().has_keep_order()))
, is_fast_scan(table_scan->tbl_scan().is_fast_scan())
, is_fast_scan(is_partition_table_scan ? table_scan->partition_table_scan().is_fast_scan() : table_scan->tbl_scan().is_fast_scan())
{
if (is_partition_table_scan)
{
Expand Down Expand Up @@ -75,6 +75,7 @@ void TiDBTableScan::constructTableScanForRemoteRead(tipb::TableScan * tipb_table
for (auto id : partition_table_scan.primary_prefix_column_ids())
tipb_table_scan->add_primary_prefix_column_ids(id);
tipb_table_scan->set_is_fast_scan(partition_table_scan.is_fast_scan());
tipb_table_scan->set_keep_order(false);
}
else
{
Expand Down

0 comments on commit e63e249

Please sign in to comment.