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

 ##########
 File path: be/src/exec/parquet_reader.cpp
 ##########
 @@ -204,13 +208,23 @@ Status ParquetReaderWrap::read(Tuple* tuple, const 
std::vector<SlotDescriptor*>&
     uint8_t tmp_buf[128] = {0};
     int32_t wbytes = 0;
     const uint8_t *value = nullptr;
+    int index = 0;
     int column_index = 0;
     try {
         size_t slots = tuple_slot_descs.size();
         for (size_t i = 0; i < slots; ++i) {
             auto slot_desc = tuple_slot_descs[i];
-            column_index = i;// column index in batch record
-            switch (_parquet_column_type[i]) {
+            auto iter = _columns_from_path.find(slot_desc->col_name());
 
 Review comment:
   I think we can write a common function to fill partition columns which can 
be used in both two scanners, like `fill_dest_tuple`. If this function is not 
easy to write and used by scanners, it's OK to write one copy for each.

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