malinjawi commented on code in PR #12592:
URL: https://github.com/apache/gluten/pull/12592#discussion_r4339487615


##########
cpp/velox/operators/writer/VeloxColumnarBatchWriter.cc:
##########
@@ -57,6 +57,11 @@ arrow::Status VeloxColumnarBatchWriter::write(const 
std::shared_ptr<ColumnarBatc
 }
 
 arrow::Status VeloxColumnarBatchWriter::close() {
+  // The writer takes its schema from the first batch, so it is only created 
once something has been
+  // written. Closing a writer that never received a batch is a no-op rather 
than a null dereference.
+  if (writer_ == nullptr) {

Review Comment:
   Done in e51f37733.



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