forked from oceanbase/oceanbase
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathob_sort_basic_info.h
More file actions
57 lines (51 loc) · 1.73 KB
/
Copy pathob_sort_basic_info.h
File metadata and controls
57 lines (51 loc) · 1.73 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
/**
* Copyright (c) 2021 OceanBase
* OceanBase CE is licensed under Mulan PubL v2.
* You can use this software according to the terms and conditions of the Mulan PubL v2.
* You may obtain a copy of Mulan PubL v2 at:
* http://license.coscl.org.cn/MulanPubL-2.0
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
* EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
* MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
* See the Mulan PubL v2 for more details.
*/
#ifndef OCEANBASE_SQL_ENGINE_SORT_SORT_BASIC_INFO_H_
#define OCEANBASE_SQL_ENGINE_SORT_SORT_BASIC_INFO_H_
#include "lib/ob_define.h"
#include "share/datum/ob_datum.h"
#include "share/datum/ob_datum_funcs.h"
namespace oceanbase
{
namespace sql
{
struct ObSortFieldCollation
{
OB_UNIS_VERSION(1);
public:
ObSortFieldCollation(uint32_t field_idx,
common::ObCollationType cs_type,
bool is_ascending,
common::ObCmpNullPos null_pos)
: field_idx_(field_idx),
cs_type_(cs_type),
is_ascending_(is_ascending),
null_pos_(null_pos)
{}
ObSortFieldCollation()
: field_idx_(UINT32_MAX),
cs_type_(common::CS_TYPE_INVALID),
is_ascending_(true),
null_pos_(common::NULL_LAST)
{}
TO_STRING_KV(K_(field_idx), K_(cs_type), K_(is_ascending), K_(null_pos));
uint32_t field_idx_;
common::ObCollationType cs_type_;
bool is_ascending_;
common::ObCmpNullPos null_pos_;
};
typedef common::ObCmpFunc ObSortCmpFunc;
typedef common::ObFixedArray<ObSortFieldCollation, common::ObIAllocator> ObSortCollations;
typedef common::ObFixedArray<ObSortCmpFunc, common::ObIAllocator> ObSortFuncs;
} // end namespace sql
} // end namespace oceanbase
#endif /* OCEANBASE_SQL_ENGINE_SORT_SORT_BASIC_INFO_H_ */