Skip to content

Commit

Permalink
refine
Browse files Browse the repository at this point in the history
  • Loading branch information
chenzl25 committed Nov 24, 2023
1 parent d2fdd33 commit 29375a4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
5 changes: 1 addition & 4 deletions proto/batch_plan.proto
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,8 @@ message RowSeqScanNode {
}
// If along with `batch_limit`, `chunk_size` will be set.
ChunkSize chunk_size = 6;
message Limit {
uint64 limit = 1;
}
// The pushed down `batch_limit`. Max rows needed to return.
Limit limit = 7;
optional uint64 limit = 7;
}

message SysRowSeqScanNode {
Expand Down
2 changes: 1 addition & 1 deletion src/batch/src/executor/row_seq_scan.rs
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ impl BoxedExecutorBuilder for RowSeqScanExecutorBuilder {
} else {
source.context.get_config().developer.chunk_size as u32
};
let limit = seq_scan_node.limit.clone().map(|limit| limit.limit);
let limit = seq_scan_node.limit;
let metrics = source.context().batch_metrics();

dispatch_state_store!(source.context().state_store(), state_store, {
Expand Down
4 changes: 2 additions & 2 deletions src/frontend/src/optimizer/plan_node/batch_seq_scan.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ use risingwave_common::error::Result;
use risingwave_common::types::ScalarImpl;
use risingwave_common::util::scan_range::{is_full_range, ScanRange};
use risingwave_pb::batch_plan::plan_node::NodeBody;
use risingwave_pb::batch_plan::row_seq_scan_node::{ChunkSize, Limit};
use risingwave_pb::batch_plan::row_seq_scan_node::ChunkSize;
use risingwave_pb::batch_plan::RowSeqScanNode;

use super::batch::prelude::*;
Expand Down Expand Up @@ -251,7 +251,7 @@ impl ToBatchPb for BatchSeqScan {
.core
.chunk_size
.map(|chunk_size| ChunkSize { chunk_size }),
limit: self.limit().map(|limit| Limit { limit }),
limit: *self.limit(),
})
}
}
Expand Down

0 comments on commit 29375a4

Please sign in to comment.