morningman commented on code in PR #12896:
URL: https://github.com/apache/doris/pull/12896#discussion_r978212119


##########
be/src/vec/exec/format/parquet/vparquet_reader.h:
##########
@@ -74,7 +75,7 @@ class ParquetReader : public GenericReader {
 
     virtual ~ParquetReader();
 
-    Status init_reader(std::vector<ExprContext*>& conjunct_ctxs);
+    Status init_reader(std::map<std::string, ColumnValueRangeType>& 
_colname_to_predicates);

Review Comment:
   ```suggestion
       Status init_reader(std::map<std::string, ColumnValueRangeType>& 
colname_to_predicates);
   ```



##########
be/src/vec/exec/format/parquet/vparquet_reader.cpp:
##########
@@ -58,19 +55,23 @@ Status 
ParquetReader::init_reader(std::vector<ExprContext*>& conjunct_ctxs) {
         // Get the Column Reader for the boolean column
         _map_column.emplace(schema_desc.get_column(i)->name, i);
     }
+    // todo: optimize, move to scanner

Review Comment:
   Move the scannode, not scanner



##########
be/src/vec/exec/scan/vfile_scanner.cpp:
##########
@@ -46,9 +46,10 @@ VFileScanner::VFileScanner(RuntimeState* state, 
NewFileScanNode* parent, int64_t
           _profile(profile),
           _strict_mode(false) {}
 
-Status VFileScanner::prepare(VExprContext** vconjunct_ctx_ptr) {
+Status VFileScanner::prepare(VExprContext** vconjunct_ctx_ptr,
+                             std::map<std::string, ColumnValueRangeType>& 
colname_to_value_range) {
     SCOPED_CONSUME_MEM_TRACKER(_mem_tracker);
-
+    _colname_to_value_range(colname_to_value_range);

Review Comment:
   You can just save `_colname_to_value_range` in file scan node and use a 
pointer in scanner to point to it.
   So that we don't need to copy this for every scanner.



-- 
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: commits-unsubscr...@doris.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


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

Reply via email to