OmniSciDB  c1a53651b2
 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 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 #pragma once
18 
20 
22  switch (ext_arg_type) {
59  default:
60  return ext_arg_type;
61  }
62 }
63 
65  const ExtArgumentType ext_arg_type) {
66  switch (ext_arg_type) {
103  default:
104  return ext_arg_type;
105  }
106 }
107 
108 inline bool is_ext_arg_type_array(const ExtArgumentType ext_arg_type) {
109  switch (ext_arg_type) {
119  return true;
120 
121  default:
122  return false;
123  }
124 }
125 
126 inline bool is_ext_arg_type_column(const ExtArgumentType ext_arg_type) {
127  switch (ext_arg_type) {
147  return true;
148 
149  default:
150  return false;
151  }
152 }
153 
154 inline bool is_ext_arg_type_column_list(const ExtArgumentType ext_arg_type) {
155  switch (ext_arg_type) {
174  return true;
175 
176  default:
177  return false;
178  }
179 }
180 
181 inline bool is_ext_arg_type_geo(const ExtArgumentType ext_arg_type) {
182  switch (ext_arg_type) {
189  return true;
190 
191  default:
192  return false;
193  }
194 }
195 
196 inline bool is_ext_arg_type_pointer(const ExtArgumentType ext_arg_type) {
197  switch (ext_arg_type) {
205  return true;
206 
207  default:
208  return false;
209  }
210 }
211 
212 inline bool is_ext_arg_type_scalar(const ExtArgumentType ext_arg_type) {
213  switch (ext_arg_type) {
226  return true;
227 
228  default:
229  return false;
230  }
231 }
232 
233 inline bool is_ext_arg_type_scalar_integer(const ExtArgumentType ext_arg_type) {
234  switch (ext_arg_type) {
242  return true;
243  default:
244  return false;
245  }
246 }
247 
248 inline int32_t max_digits_for_ext_integer_arg(const ExtArgumentType ext_arg_type) {
249  switch (ext_arg_type) {
251  return 2;
253  return 4;
255  return 9;
257  return 18;
258  default:
259  UNREACHABLE();
260  return 0;
261  }
262 }
263 
264 inline bool is_ext_arg_type_nonscalar(const ExtArgumentType ext_arg_type) {
265  return !is_ext_arg_type_scalar(ext_arg_type);
266 }
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:337
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)
Supported runtime functions management and retrieval.
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)