imay commented on a change in pull request #2013: Add arrow IPC serialization
for Doris-Spark-Connector
URL: https://github.com/apache/incubator-doris/pull/2013#discussion_r340561332
##########
File path: be/src/service/backend_service.cpp
##########
@@ -318,19 +320,24 @@ void BackendService::get_next(TScanBatchResult& result_,
const TScanNextBatchPar
// during accessing, should disabled last_access_time
context->last_access_time = -1;
TUniqueId fragment_instance_id = context->fragment_instance_id;
- std::shared_ptr<TScanRowBatch> rows_per_col;
+ std::shared_ptr<arrow::RecordBatch> record_batch;
bool eos;
- auto fetch_st =
_exec_env->result_queue_mgr()->fetch_result(fragment_instance_id,
&rows_per_col, &eos);
- if (fetch_st.ok()) {
+ st = _exec_env->result_queue_mgr()->fetch_result(fragment_instance_id,
&record_batch, &eos);
+ if (st.ok()) {
result_.__set_eos(eos);
- // when eos = true rows_per_col = nullptr
if (!eos) {
- result_.__set_rows(*rows_per_col);
- context->offset += (*rows_per_col).num_rows;
+ std::string record_batch_str;
+ st = serialize_record_batch(record_batch, &record_batch_str);
+ st.to_thrift(&t_status);
+ if (st.ok()) {
+ result_.__set_rows(record_batch_str);
Review comment:
copy this string twice. I think you can use move assign.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]