imay commented on a change in pull request #1635: Enable parsing columns from 
file path for Broker Load (#1582)
URL: https://github.com/apache/incubator-doris/pull/1635#discussion_r313685109
 
 

 ##########
 File path: be/src/exec/broker_scanner.cpp
 ##########
 @@ -452,6 +456,31 @@ bool BrokerScanner::convert_one_row(
     return fill_dest_tuple(line, tuple, tuple_pool);
 }
 
+inline void BrokerScanner::fill_slot(SlotDescriptor* slot_desc, const Slice& 
value) {
+    if (slot_desc->is_nullable() && is_null(value)) {
+        _src_tuple->set_null(slot_desc->null_indicator_offset());
+        return;
+    }
+    _src_tuple->set_not_null(slot_desc->null_indicator_offset());
+    void* slot = _src_tuple->get_slot(slot_desc->tuple_offset());
+    StringValue* str_slot = reinterpret_cast<StringValue*>(slot);
+    str_slot->ptr = value.data;
+    str_slot->len = value.size;
+}
+
+inline void BrokerScanner::fill_slots_of_columns_from_path(int start, const 
std::vector<SlotDescriptor*>& src_slot_descs, Tuple* tuple) {
 
 Review comment:
   Why don't put this function to BaseScanner to avoid write this twice.
   And if you have `num_columns_from_file`, this function don't need start 
param.

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@doris.apache.org
For additional commands, e-mail: dev-h...@doris.apache.org

Reply via email to