Skip to content

Commit

Permalink
fix(protobuf): store offset and limit in uint64 in TopNNode a…
Browse files Browse the repository at this point in the history
…nd `LimitNode` (#4666)

fix

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
  • Loading branch information
wzzzzd and mergify[bot] authored Aug 16, 2022
1 parent 65c2a24 commit 16cd164
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions proto/batch_plan.proto
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,13 @@ message OrderByNode {

message TopNNode {
repeated plan_common.ColumnOrder column_orders = 1;
uint32 limit = 2;
uint32 offset = 3;
uint64 limit = 2;
uint64 offset = 3;
}

message LimitNode {
uint32 limit = 1;
uint32 offset = 2;
uint64 limit = 1;
uint64 offset = 2;
}

message NestedLoopJoinNode {
Expand Down
4 changes: 2 additions & 2 deletions src/frontend/src/optimizer/plan_node/batch_limit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ impl ToDistributedBatch for BatchLimit {
impl ToBatchProst for BatchLimit {
fn to_batch_prost_body(&self) -> NodeBody {
NodeBody::Limit(LimitNode {
limit: self.logical.limit() as u32,
offset: self.logical.offset() as u32,
limit: self.logical.limit() as u64,
offset: self.logical.offset() as u64,
})
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/frontend/src/optimizer/plan_node/batch_topn.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ impl ToBatchProst for BatchTopN {
fn to_batch_prost_body(&self) -> NodeBody {
let column_orders = self.logical.topn_order().to_protobuf(&self.base.schema);
NodeBody::TopN(TopNNode {
limit: self.logical.limit() as u32,
offset: self.logical.offset() as u32,
limit: self.logical.limit() as u64,
offset: self.logical.offset() as u64,
column_orders,
})
}
Expand Down

0 comments on commit 16cd164

Please sign in to comment.