wuyunfeng commented on a change in pull request #3513:
URL: https://github.com/apache/incubator-doris/pull/3513#discussion_r422451684



##########
File path: be/src/exec/es/es_scroll_parser.h
##########
@@ -50,5 +50,7 @@ class ScrollParser {
 
     rapidjson::Document _document_node;
     rapidjson::Value _inner_hits_node;
+
+    bool _use_doc_value;

Review comment:
       maybe use doc_value_mode is more suitable?
   in future, we can use different parser for _source or doc_value mode

##########
File path: be/src/exec/es/es_scroll_parser.cpp
##########
@@ -275,7 +286,32 @@ int ScrollParser::get_total() {
 Status ScrollParser::fill_tuple(const TupleDescriptor* tuple_desc, 
             Tuple* tuple, MemPool* tuple_pool, bool* line_eof, const 
std::map<std::string, std::string>& docvalue_context) {
     *line_eof = true;
+
     if (_size <= 0 || _line_index >= _size) {
+        // _source is fetched from E.S.
+        if (!_use_doc_value) {
+            return Status::OK();
+        }
+        
+        // _fields(doc_value) is fetched from E.S.

Review comment:
       ```suggestion
           // _fields(doc_value) is fetched from ES
   ```

##########
File path: be/src/exec/es/es_scroll_parser.cpp
##########
@@ -275,7 +286,32 @@ int ScrollParser::get_total() {
 Status ScrollParser::fill_tuple(const TupleDescriptor* tuple_desc, 
             Tuple* tuple, MemPool* tuple_pool, bool* line_eof, const 
std::map<std::string, std::string>& docvalue_context) {
     *line_eof = true;
+
     if (_size <= 0 || _line_index >= _size) {
+        // _source is fetched from E.S.
+        if (!_use_doc_value) {
+            return Status::OK();
+        }
+        
+        // _fields(doc_value) is fetched from E.S.
+        if (_total <= 0 || _line_index >= _total) {
+            return Status::OK();
+        }
+       
+       
+        // here is operations for `enable_doc_value_scan`.

Review comment:
       ```suggestion
           // here is operations for `use_doc_value`.
   ```




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



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

Reply via email to