OmniSciDB  a5dc49c757
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ResultSetSortImpl.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 
17 #ifndef QUERYENGINE_RESULTSETSORTIMPL_H
18 #define QUERYENGINE_RESULTSETSORTIMPL_H
19 
20 #include "../Shared/TargetInfo.h"
21 #include "CompilationOptions.h"
22 
23 struct PodOrderEntry {
24  int tle_no; /* targetlist entry number: 1-based */
25  bool is_desc; /* true if order is DESC */
26  bool nulls_first; /* true if nulls are ordered first. otherwise last. */
27 };
28 
30  const size_t entry_count;
31  const size_t col_off;
32  const size_t col_bytes;
33  const size_t row_bytes;
35  const int64_t target_groupby_index;
36 };
37 
38 namespace Data_Namespace {
39 
40 class DataMgr;
41 
42 } // namespace Data_Namespace
43 
44 template <class K>
45 std::vector<uint32_t> baseline_sort(const ExecutorDeviceType device_type,
46  const int device_id,
47  Data_Namespace::DataMgr* data_mgr,
48  const int8_t* groupby_buffer,
49  const PodOrderEntry& oe,
50  const GroupByBufferLayoutInfo& layout,
51  const size_t top_n,
52  const size_t start,
53  const size_t step);
54 
55 #endif // QUERYENGINE_RESULTSETSORTIMPL_H
ExecutorDeviceType
bool nulls_first
std::vector< uint32_t > baseline_sort(const ExecutorDeviceType device_type, const int device_id, Data_Namespace::DataMgr *data_mgr, const int8_t *groupby_buffer, const PodOrderEntry &oe, const GroupByBufferLayoutInfo &layout, const size_t top_n, const size_t start, const size_t step)
int tle_no
bool is_desc
const TargetInfo oe_target_info
const int64_t target_groupby_index