jinchengchenghh commented on code in PR #11868:
URL: https://github.com/apache/gluten/pull/11868#discussion_r3071806821
##########
cpp/velox/compute/iceberg/IcebergWriter.cc:
##########
@@ -212,7 +212,28 @@ IcebergWriter::IcebergWriter(
}
void IcebergWriter::write(const VeloxColumnarBatch& batch) {
- dataSink_->appendData(batch.getRowVector());
+ auto inputRowVector = batch.getRowVector();
+ auto inputRowType = asRowType(inputRowVector->type());
+
+ if (inputRowType->size() != rowType_->size()) {
+ std::vector<VectorPtr> dataColumns;
+ dataColumns.reserve(rowType_->size());
+
+ for (size_t i = 0; i < rowType_->size(); ++i) {
Review Comment:
Use like this to simplify the logic std::vector<int> sub(v.begin() + 1,
v.begin() + 4);
--
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]