OmniSciDB  1dac507f6e
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
OutputBufferInitialization.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 
22 #ifndef QUERYENGINE_OUTPUTBUFFERINITIALIZATION_H
23 #define QUERYENGINE_OUTPUTBUFFERINITIALIZATION_H
24 
25 #include "Shared/SqlTypesLayout.h"
26 
27 #include <list>
28 #include <memory>
29 #include <utility>
30 #include <vector>
31 
32 namespace Analyzer {
33 class Expr;
34 } // namespace Analyzer
35 
37 
38 std::pair<int64_t, int64_t> inline_int_max_min(const size_t byte_width);
39 
40 std::pair<uint64_t, uint64_t> inline_uint_max_min(const size_t byte_width);
41 
42 int64_t get_agg_initial_val(const SQLAgg agg,
43  const SQLTypeInfo& ti,
44  const bool enable_compaction,
45  const unsigned min_byte_width_to_compact);
46 
47 std::vector<int64_t> init_agg_val_vec(
48  const std::vector<Analyzer::Expr*>& targets,
49  const std::list<std::shared_ptr<Analyzer::Expr>>& quals,
51 
52 const Analyzer::Expr* agg_arg(const Analyzer::Expr* expr);
53 
54 bool constrained_not_null(const Analyzer::Expr* expr,
55  const std::list<std::shared_ptr<Analyzer::Expr>>& quals);
56 
57 void set_notnull(TargetInfo& target, const bool not_null);
58 
59 #endif // QUERYENGINE_OUTPUTBUFFERINITIALIZATION_H
const Analyzer::Expr * agg_arg(const Analyzer::Expr *expr)
SQLAgg
Definition: sqldefs.h:71
bool constrained_not_null(const Analyzer::Expr *expr, const std::list< std::shared_ptr< Analyzer::Expr >> &quals)
std::vector< int64_t > init_agg_val_vec(const std::vector< TargetInfo > &targets, const QueryMemoryDescriptor &query_mem_desc)
int64_t get_agg_initial_val(const SQLAgg agg, const SQLTypeInfo &ti, const bool enable_compaction, const unsigned min_byte_width_to_compact)
std::pair< uint64_t, uint64_t > inline_uint_max_min(const size_t byte_width)
std::pair< int64_t, int64_t > inline_int_max_min(const size_t byte_width)
void set_notnull(TargetInfo &target, const bool not_null)