HappenLee commented on a change in pull request #8174: URL: https://github.com/apache/incubator-doris/pull/8174#discussion_r813526824
########## File path: be/src/exec/scan_node.cpp ########## @@ -40,4 +42,30 @@ Status ScanNode::prepare(RuntimeState* state) { return Status::OK(); } +// This function is used to remove pushed expr in expr tree. +// It relies on the logic of function convertConjunctsToAndCompoundPredicate() of FE splicing expr. +// It requires FE to satisfy each splicing with 'and' expr, and spliced from left to right, in order. +// Expr tree specific forms do not require requirements. +std::string ScanNode::_peel_pushed_conjuncts(std::function<bool(int)> checker) { Review comment: 1. `const std::function<bool(int)>&` or `const auto&` 2. peel pushed vconjunct ########## File path: be/src/exec/es_http_scan_node.h ########## @@ -117,8 +116,9 @@ class EsHttpScanNode : public ScanNode { std::vector<EsPredicate*> _predicates; Review comment: what‘'s the different between the two var ? need more comment ########## File path: be/src/vec/functions/function_fake.h ########## @@ -0,0 +1,60 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +#pragma once + +#include "common/status.h" +#include "vec/core/types.h" +#include "vec/data_types/data_type_number.h" +#include "vec/functions/simple_function_factory.h" +#include "vec/utils/util.hpp" + +namespace doris::vectorized { + +struct FunctionEsqueryImpl { + static constexpr auto name = "esquery"; + static DataTypePtr get_return_type_impl(const DataTypes& arguments) { + return std::make_shared<DataTypeUInt8>(); + } +}; + Review comment: more comment to know how to use the function ########## File path: be/src/exec/es_http_scan_node.cpp ########## @@ -92,14 +95,20 @@ Status EsHttpScanNode::prepare(RuntimeState* state) { // build predicate Status EsHttpScanNode::build_conjuncts_list() { Status status = Status::OK(); + _conjunct_to_predicate.resize(_conjunct_ctxs.size()); Review comment: maybe the `_conjunct_to_predicate` should be local var and may be bool is ok? -- 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