taiyang-li commented on code in PR #7221:
URL: https://github.com/apache/incubator-gluten/pull/7221#discussion_r1758252021
##########
cpp-ch/local-engine/Operator/ExpandTransorm.h:
##########
@@ -46,7 +46,6 @@ class ExpandTransform : public DB::IProcessor
ExpandField project_set_exprs;
bool has_input = false;
bool has_output = false;
- size_t expand_expr_iterator = 0;
Review Comment:
原来的expand流式输出去掉了吗? @lgbo-ustc 看下这里是否ok ?
##########
cpp-ch/local-engine/Operator/ExpandTransform.cpp:
##########
@@ -83,56 +84,53 @@ ExpandTransform::Status ExpandTransform::prepare()
input_chunk = input.pull(true);
has_input = true;
- expand_expr_iterator = 0;
}
return Status::Ready;
}
void ExpandTransform::work()
{
- if (expand_expr_iterator >= project_set_exprs.getExpandRows())
- throw DB::Exception(DB::ErrorCodes::LOGICAL_ERROR,
"expand_expr_iterator >= project_set_exprs.getExpandRows()");
-
+ if (!has_input)
+ return;
const auto & input_header = getInputs().front().getHeader();
const auto & input_columns = input_chunk.getColumns();
const auto & types = project_set_exprs.getTypes();
- const auto & kinds = project_set_exprs.getKinds()[expand_expr_iterator];
- const auto & fields = project_set_exprs.getFields()[expand_expr_iterator];
size_t rows = input_chunk.getNumRows();
- DB::Columns columns(types.size());
- for (size_t col_i = 0; col_i < types.size(); ++col_i)
+ DB::MutableColumns columns(types.size());
Review Comment:
这里为什么要生成新的columns, 有没有可能利用复用老的column, 这个操作相比原来要重不少。
--
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]