OmniSciDB  a5dc49c757
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
QueryPhysicalInputsCollector.h
Go to the documentation of this file.
1 /*
2  * Copyright 2022 HEAVY.AI, 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 
23 #ifndef QUERYENGINE_QUERYPHYSICALINPUTSCOLLECTOR_H
24 #define QUERYENGINE_QUERYPHYSICALINPUTSCOLLECTOR_H
25 
26 #include <ostream>
27 #include <unordered_set>
28 
29 class RelAlgNode;
30 
31 struct PhysicalInput {
32  int32_t col_id;
33  int32_t table_id;
34  int32_t db_id;
35 
36  size_t hash() const;
37 
38  bool operator==(const PhysicalInput& that) const;
39 };
40 
41 std::ostream& operator<<(std::ostream&, PhysicalInput const&);
42 
43 namespace std {
44 
45 template <>
46 struct hash<PhysicalInput> {
47  size_t operator()(const PhysicalInput& phys_input) const { return phys_input.hash(); }
48 };
49 
50 } // namespace std
51 
52 std::unordered_set<PhysicalInput> get_physical_inputs(const RelAlgNode*);
53 std::unordered_set<shared::TableKey> get_physical_table_inputs(const RelAlgNode*);
54 
55 #endif // QUERYENGINE_QUERYPHYSICALINPUTSCOLLECTOR_H
bool operator==(const PhysicalInput &that) const
std::ostream & operator<<(std::ostream &os, const SessionInfo &session_info)
Definition: SessionInfo.cpp:57
std::unordered_set< shared::TableKey > get_physical_table_inputs(const RelAlgNode *ra)
std::unordered_set< PhysicalInput > get_physical_inputs(const RelAlgNode *ra)
size_t operator()(const PhysicalInput &phys_input) const