zhanglistar commented on code in PR #7221:
URL: https://github.com/apache/incubator-gluten/pull/7221#discussion_r1758584743


##########
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:
   这里确实有点重了



-- 
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]

Reply via email to