diff --git a/dbms/src/Flash/Coprocessor/TiDBTableScan.cpp b/dbms/src/Flash/Coprocessor/TiDBTableScan.cpp index 20a12770c73..7ece272d04f 100644 --- a/dbms/src/Flash/Coprocessor/TiDBTableScan.cpp +++ b/dbms/src/Flash/Coprocessor/TiDBTableScan.cpp @@ -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) { @@ -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 {