OmniSciDB  04ee39c94c
AggregatedColRange.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 /*
18  * @file AggregatedColRange.h
19  * @author Alex Suhan <alex@mapd.com>
20  * @brief Cache for physical column ranges. Set by the aggregator on the leaves.
21  *
22  * Copyright (c) 2016 MapD Technologies, Inc. All rights reserved.
23  */
24 
25 #ifndef QUERYENGINE_AGGREGATEDCOLRANGECACHE_H
26 #define QUERYENGINE_AGGREGATEDCOLRANGECACHE_H
27 
28 #include "ExpressionRange.h"
30 
31 #include <unordered_map>
32 
34  public:
36 
37  void setColRange(const PhysicalInput&, const ExpressionRange&);
38 
39  const std::unordered_map<PhysicalInput, ExpressionRange>& asMap() const;
40 
41  void clear();
42 
43  private:
44  std::unordered_map<PhysicalInput, ExpressionRange> cache_;
45 };
46 
47 #endif // QUERYENGINE_AGGREGATEDCOLRANGECACHE_H
const std::unordered_map< PhysicalInput, ExpressionRange > & asMap() const
void setColRange(const PhysicalInput &, const ExpressionRange &)
ExpressionRange getColRange(const PhysicalInput &) const
std::unordered_map< PhysicalInput, ExpressionRange > cache_