chenlinzhong commented on code in PR #8765:
URL: https://github.com/apache/incubator-doris/pull/8765#discussion_r846931636


##########
be/src/runtime/export_sink.cpp:
##########
@@ -96,6 +97,13 @@ Status ExportSink::send(RuntimeState* state, RowBatch* 
batch) {
     int num_rows = batch->num_rows();
     // we send at most 1024 rows at a time
     int batch_send_rows = num_rows > 1024 ? 1024 : num_rows;
+    if (!_send_header && _t_export_sink.header.size() > 0) {
+        size_t written_len = 0;
+        RETURN_IF_ERROR(
+                _file_writer->write(reinterpret_cast<const 
uint8_t*>(_t_export_sink.header.c_str()),
+                                    _t_export_sink.header.size(), 
&written_len));
+        _send_header = true;

Review Comment:
   ok



##########
be/src/runtime/export_sink.h:
##########
@@ -77,6 +77,7 @@ class ExportSink : public DataSink {
     RuntimeProfile::Counter* _bytes_written_counter;
     RuntimeProfile::Counter* _rows_written_counter;
     RuntimeProfile::Counter* _write_timer;
+    bool _send_header;

Review Comment:
   ok



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