OmniSciDB  04ee39c94c
InputMetadata.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 
17 #ifndef QUERYENGINE_INPUTMETADATA_H
18 #define QUERYENGINE_INPUTMETADATA_H
19 
21 #include "RelAlgExecutionUnit.h"
22 
23 #include <unordered_map>
24 
25 namespace Catalog_Namespace {
26 class Catalog;
27 } // namespace Catalog_Namespace
28 
29 class Executor;
30 
31 using TemporaryTables = std::unordered_map<int, const ResultSetPtr&>;
32 
34  int table_id;
36 };
37 
39  public:
40  InputTableInfoCache(Executor* executor);
41 
42  Fragmenter_Namespace::TableInfo getTableInfo(const int table_id);
43 
44  void clear();
45 
46  private:
47  std::unordered_map<int, Fragmenter_Namespace::TableInfo> cache_;
49 };
50 
51 size_t get_frag_count_of_table(const int table_id, Executor* executor);
52 
53 std::vector<InputTableInfo> get_table_infos(
54  const std::vector<InputDescriptor>& input_descs,
55  Executor* executor);
56 
57 std::vector<InputTableInfo> get_table_infos(const RelAlgExecutionUnit& ra_exe_unit,
58  Executor* executor);
59 
60 #endif // QUERYENGINE_INPUTMETADATA_H
Fragmenter_Namespace::TableInfo info
Definition: InputMetadata.h:35
std::vector< InputTableInfo > get_table_infos(const std::vector< InputDescriptor > &input_descs, Executor *executor)
Executor * executor_
Definition: InputMetadata.h:48
std::unordered_map< int, const ResultSetPtr & > TemporaryTables
Definition: InputMetadata.h:31
size_t get_frag_count_of_table(const int table_id, Executor *executor)
Execution unit for relational algebra. It&#39;s a low-level description of any relational algebra operati...
std::unordered_map< int, Fragmenter_Namespace::TableInfo > cache_
Definition: InputMetadata.h:47