OmniSciDB  085a039ca4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TableFunctionHelper.h
Go to the documentation of this file.
1 /*
2  * Copyright 2021 OmniSci, 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 #pragma once
18 
20 
22  switch (ext_arg_type) {
37  default:
38  return ext_arg_type;
39  }
40 }
41 
43  const ExtArgumentType ext_arg_type) {
44  switch (ext_arg_type) {
59  default:
60  return ext_arg_type;
61  }
62 }
63 
64 inline bool is_ext_arg_type_array(const ExtArgumentType ext_arg_type) {
65  switch (ext_arg_type) {
73  return true;
74 
75  default:
76  return false;
77  }
78 }
79 
80 inline bool is_ext_arg_type_column(const ExtArgumentType ext_arg_type) {
81  switch (ext_arg_type) {
91  return true;
92 
93  default:
94  return false;
95  }
96 }
97 
98 inline bool is_ext_arg_type_column_list(const ExtArgumentType ext_arg_type) {
99  switch (ext_arg_type) {
108  return true;
109 
110  default:
111  return false;
112  }
113 }
114 
115 inline bool is_ext_arg_type_geo(const ExtArgumentType ext_arg_type) {
116  switch (ext_arg_type) {
121  return true;
122 
123  default:
124  return false;
125  }
126 }
127 
128 inline bool is_ext_arg_type_pointer(const ExtArgumentType ext_arg_type) {
129  switch (ext_arg_type) {
137  return true;
138 
139  default:
140  return false;
141  }
142 }
143 
144 inline bool is_ext_arg_type_scalar(const ExtArgumentType ext_arg_type) {
145  switch (ext_arg_type) {
155  return true;
156 
157  default:
158  return false;
159  }
160 }
161 
162 inline bool is_ext_arg_type_scalar_integer(const ExtArgumentType ext_arg_type) {
163  switch (ext_arg_type) {
169  return true;
170  default:
171  return false;
172  }
173 }
174 
175 inline int32_t max_digits_for_ext_integer_arg(const ExtArgumentType ext_arg_type) {
176  switch (ext_arg_type) {
178  return 2;
180  return 4;
182  return 9;
184  return 18;
185  default:
186  UNREACHABLE();
187  return 0;
188  }
189 }
190 
191 inline bool is_ext_arg_type_nonscalar(const ExtArgumentType ext_arg_type) {
192  return !is_ext_arg_type_scalar(ext_arg_type);
193 }
bool is_ext_arg_type_scalar(const ExtArgumentType ext_arg_type)
bool is_ext_arg_type_column(const ExtArgumentType ext_arg_type)
#define UNREACHABLE()
Definition: Logger.h:267
bool is_ext_arg_type_scalar_integer(const ExtArgumentType ext_arg_type)
ExtArgumentType ext_arg_type_ensure_column(const ExtArgumentType ext_arg_type)
bool is_ext_arg_type_column_list(const ExtArgumentType ext_arg_type)
bool is_ext_arg_type_nonscalar(const ExtArgumentType ext_arg_type)
bool is_ext_arg_type_geo(const ExtArgumentType ext_arg_type)
bool is_ext_arg_type_array(const ExtArgumentType ext_arg_type)
int32_t max_digits_for_ext_integer_arg(const ExtArgumentType ext_arg_type)
ExtArgumentType ext_arg_type_ensure_column_list(const ExtArgumentType ext_arg_type)
bool is_ext_arg_type_pointer(const ExtArgumentType ext_arg_type)