OmniSciDB  c07336695a
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 
41 class Expr;
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 
76 class ResultSet;
77 using ResultSetPtr = std::shared_ptr<ResultSet>;
78 
79 #endif // QUERYENGINE_RELALGEXECUTIONUNIT_H
std::vector< Analyzer::Expr * > target_exprs
JoinType
Definition: sqldefs.h:98
const std::list< Analyzer::OrderEntry > order_entries
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
const size_t offset
std::list< std::shared_ptr< Analyzer::Expr > > simple_quals