File tree Expand file tree Collapse file tree 2 files changed +6
-7
lines changed
src/servers/http/v1/query Expand file tree Collapse file tree 2 files changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -189,6 +189,7 @@ maplit = { workspace = true }
189189mysql_async = { workspace = true }
190190p256 = { workspace = true }
191191pretty_assertions = { workspace = true }
192+ proptest = { workspace = true }
192193reqwest = { workspace = true }
193194serde_json.workspace = true
194195serde_yaml = { workspace = true }
@@ -197,7 +198,6 @@ tempfile = { workspace = true }
197198tower = { workspace = true }
198199url = { workspace = true }
199200wiremock = { workspace = true }
200- proptest = { workspace = true }
201201
202202[build-dependencies ]
203203databend-common-building = { workspace = true }
Original file line number Diff line number Diff line change @@ -213,16 +213,15 @@ impl PageBuilder {
213213 fn try_append_block ( & mut self , block : DataBlock ) -> Option < DataBlock > {
214214 assert ! ( self . has_capacity( ) ) ;
215215 let ( take_rows, memory_size) = self . calculate_take_rows ( & block) ;
216- let total = block. num_rows ( ) ;
217- if take_rows < total {
216+ let total_rows = block. num_rows ( ) ;
217+ if take_rows < total_rows {
218218 self . remain_size = 0 ;
219- self . remain_rows -= total ;
219+ self . remain_rows -= take_rows ;
220220 self . blocks . push ( block. slice ( 0 ..take_rows) ) ;
221- Some ( block. slice ( take_rows..total ) )
221+ Some ( block. slice ( take_rows..total_rows ) )
222222 } else {
223223 self . remain_size -= min ( self . remain_size , memory_size) ;
224- self . remain_rows -= total;
225-
224+ self . remain_rows -= total_rows;
226225 self . blocks . push ( block) ;
227226 None
228227 }
You can’t perform that action at this time.
0 commit comments