Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
Signed-off-by: Lloyd-Pottiger <[email protected]>
  • Loading branch information
Lloyd-Pottiger committed May 23, 2023
1 parent c1d2b83 commit 918750c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion dbms/src/Flash/Coprocessor/TiDBTableScan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ TiDBTableScan::TiDBTableScan(
, pushed_down_filters(is_partition_table_scan ? std::move(table_scan->partition_table_scan().pushed_down_filter_conditions()) : std::move(table_scan->tbl_scan().pushed_down_filter_conditions()))
// 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()))
// When keep_order is true, we will not push down filters to tablescan.
// So even if keep_order is not set, but pushed down filters is not empty, we can't keep order.
, keep_order(!is_partition_table_scan && pushed_down_filters.empty() && (!table_scan->tbl_scan().has_keep_order() || table_scan->tbl_scan().keep_order()))
, is_fast_scan(table_scan->tbl_scan().is_fast_scan())
{
if (is_partition_table_scan)
Expand Down

0 comments on commit 918750c

Please sign in to comment.