Gabriel39 commented on code in PR #11991:
URL: https://github.com/apache/doris/pull/11991#discussion_r952183834
##########
be/src/exec/spill_sort_node.cc:
##########
@@ -96,20 +96,20 @@ Status SpillSortNode::get_next(RuntimeState* state,
RowBatch* row_batch, bool* e
DCHECK_EQ(row_batch->num_rows(), 0);
RETURN_IF_ERROR(_sorter->get_next(row_batch, eos));
while ((_num_rows_skipped < _offset)) {
- _num_rows_skipped += row_batch->num_rows();
+ _num_rows_skipped += row_batch->num_rows();
// Throw away rows in the output batch until the offset is skipped.
int rows_to_keep = _num_rows_skipped - _offset;
if (rows_to_keep > 0) {
row_batch->copy_rows(0, row_batch->num_rows() - rows_to_keep,
rows_to_keep);
row_batch->set_num_rows(rows_to_keep);
} else {
- row_batch->set_num_rows(0);
+ row_batch->set_num_rows(0);
}
if (rows_to_keep > 0 || *eos) {
break;
}
RETURN_IF_ERROR(_sorter->get_next(row_batch, eos));
- }
+ }
Review Comment:
```suggestion
}
```
##########
be/src/exec/spill_sort_node.cc:
##########
@@ -96,20 +96,20 @@ Status SpillSortNode::get_next(RuntimeState* state,
RowBatch* row_batch, bool* e
DCHECK_EQ(row_batch->num_rows(), 0);
RETURN_IF_ERROR(_sorter->get_next(row_batch, eos));
while ((_num_rows_skipped < _offset)) {
- _num_rows_skipped += row_batch->num_rows();
+ _num_rows_skipped += row_batch->num_rows();
// Throw away rows in the output batch until the offset is skipped.
int rows_to_keep = _num_rows_skipped - _offset;
if (rows_to_keep > 0) {
row_batch->copy_rows(0, row_batch->num_rows() - rows_to_keep,
rows_to_keep);
row_batch->set_num_rows(rows_to_keep);
} else {
- row_batch->set_num_rows(0);
+ row_batch->set_num_rows(0);
Review Comment:
```suggestion
row_batch->set_num_rows(0);
```
##########
be/src/vec/functions/function_string.h:
##########
@@ -491,6 +491,51 @@ class FunctionStringConcat : public IFunction {
}
};
+class FunctionStringElt : public IFunction {
+public:
+ static constexpr auto name = "elt";
+ static FunctionPtr create() { return
std::make_shared<FunctionStringElt>(); }
+ String get_name() const override { return name; }
+ size_t get_number_of_arguments() const override { return 0; }
+ bool is_variadic() const override { return true; }
+
+ DataTypePtr get_return_type_impl(const DataTypes& arguments) const
override {
+ return std::make_shared<DataTypeString>();
Review Comment:
Should be `Nullable(String)` here
##########
be/src/exec/spill_sort_node.cc:
##########
@@ -96,20 +96,20 @@ Status SpillSortNode::get_next(RuntimeState* state,
RowBatch* row_batch, bool* e
DCHECK_EQ(row_batch->num_rows(), 0);
RETURN_IF_ERROR(_sorter->get_next(row_batch, eos));
while ((_num_rows_skipped < _offset)) {
- _num_rows_skipped += row_batch->num_rows();
+ _num_rows_skipped += row_batch->num_rows();
Review Comment:
```suggestion
_num_rows_skipped += row_batch->num_rows();
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]