You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@doris.apache.org by GitBox <gi...@apache.org> on 2019/08/13 07:13:50 UTC

[GitHub] [incubator-doris] yuanlihan commented on a change in pull request #1629: Enable parsing columns from file path for Broker Load (#1582)

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

 ##########
 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:
   Currently, we have two broker scanners. One is BrokerScanner using for reading CSV like row-storage sources. The other is ParquetScanner using for read parquet files, which is a column-storage source. It seems that we cannot reuse the `line_to_src_tuple` method of BrokerScanner

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


With regards,
Apache Git Services

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