OmniSciDB  1dac507f6e
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
RelAlgExecutionUnit.h
Go to the documentation of this file.
1 /*
2  * Copyright 2017 MapD Technologies, Inc.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
26 #ifndef QUERYENGINE_RELALGEXECUTIONUNIT_H
27 #define QUERYENGINE_RELALGEXECUTIONUNIT_H
28 
29 #include "../Shared/sqldefs.h"
31 #include "QueryFeatures.h"
32 
33 #include <list>
34 #include <memory>
35 #include <vector>
36 
38 
39 namespace Analyzer {
40 class Expr;
41 class ColumnVar;
42 class Estimator;
43 struct OrderEntry;
44 
45 } // namespace Analyzer
46 
47 struct SortInfo {
48  const std::list<Analyzer::OrderEntry> order_entries;
50  const size_t limit;
51  const size_t offset;
52 };
53 
54 struct JoinCondition {
55  std::list<std::shared_ptr<Analyzer::Expr>> quals;
57 };
58 
59 using JoinQualsPerNestingLevel = std::vector<JoinCondition>;
60 
62  const std::vector<InputDescriptor> input_descs;
63  std::list<std::shared_ptr<const InputColDescriptor>> input_col_descs;
64  std::list<std::shared_ptr<Analyzer::Expr>> simple_quals;
65  std::list<std::shared_ptr<Analyzer::Expr>> quals;
67  const std::list<std::shared_ptr<Analyzer::Expr>> groupby_exprs;
68  std::vector<Analyzer::Expr*> target_exprs;
69  const std::shared_ptr<Analyzer::Estimator> estimator;
71  size_t scan_limit;
73  bool use_bump_allocator{false};
74 };
75 
77  const std::vector<InputDescriptor> input_descs;
78  std::list<std::shared_ptr<const InputColDescriptor>> input_col_descs;
79  std::vector<Analyzer::Expr*> input_exprs;
80  std::vector<Analyzer::ColumnVar*> table_func_inputs;
81  std::vector<Analyzer::Expr*> target_exprs;
82  const std::optional<size_t> output_buffer_multiplier;
83  const std::string table_func_name;
84 };
85 
86 class ResultSet;
87 using ResultSetPtr = std::shared_ptr<ResultSet>;
88 
89 #endif // QUERYENGINE_RELALGEXECUTIONUNIT_H
std::vector< Analyzer::Expr * > target_exprs
const std::string table_func_name
JoinType
Definition: sqldefs.h:98
std::vector< Analyzer::Expr * > input_exprs
std::vector< Analyzer::ColumnVar * > table_func_inputs
const std::optional< size_t > output_buffer_multiplier
const std::list< Analyzer::OrderEntry > order_entries
const std::vector< InputDescriptor > input_descs
const SortAlgorithm algorithm
std::vector< JoinCondition > JoinQualsPerNestingLevel
std::shared_ptr< ResultSet > ResultSetPtr
const std::list< std::shared_ptr< Analyzer::Expr > > groupby_exprs
const std::vector< InputDescriptor > input_descs
QueryFeatureDescriptor query_features
const size_t limit
const SortInfo sort_info
const JoinQualsPerNestingLevel join_quals
SortAlgorithm
const std::shared_ptr< Analyzer::Estimator > estimator
std::list< std::shared_ptr< Analyzer::Expr > > quals
std::list< std::shared_ptr< Analyzer::Expr > > quals
std::list< std::shared_ptr< const InputColDescriptor > > input_col_descs
std::vector< Analyzer::Expr * > target_exprs
std::list< std::shared_ptr< const InputColDescriptor > > input_col_descs
const size_t offset
std::list< std::shared_ptr< Analyzer::Expr > > simple_quals