blackfox1983 commented on a change in pull request #4055: URL: https://github.com/apache/incubator-doris/pull/4055#discussion_r451981961
########## File path: be/src/exec/es/es_scroll_query.cpp ########## @@ -76,14 +76,20 @@ std::string ESScrollQueryBuilder::build(const std::map<std::string, std::string> // note: add `query` for this value.... es_query_dsl.AddMember("query", query_node, allocator); bool pure_docvalue = true; - // check docvalue sacan optimization - if (docvalue_context.size() == 0 || docvalue_context.size() < fields.size()) { - pure_docvalue = false; + + // Doris FE already has checked docvalue-scan optimization + if (properties.find(ESScanReader::KEY_DOC_VALUE_MODE) != properties.end()) { + pure_docvalue = atoi(properties.at(ESScanReader::KEY_DOC_VALUE_MODE).c_str()); Review comment: pure_docvalue = properties[ESScanReader::KEY_DOC_VALUE_MODE] == "1" ? true: false; 看到对bool变量赋值,这样子会不会更直观些?而不用考虑atoi返回值成功还是失败的情况下,docvalue是true还是false。 ---------------------------------------------------------------- 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