OmniSciDB  d2f719934e
 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) {
90  return true;
91 
92  default:
93  return false;
94  }
95 }
96 
97 inline bool is_ext_arg_type_column_list(const ExtArgumentType ext_arg_type) {
98  switch (ext_arg_type) {
107  return true;
108 
109  default:
110  return false;
111  }
112 }
113 
114 inline bool is_ext_arg_type_geo(const ExtArgumentType ext_arg_type) {
115  switch (ext_arg_type) {
120  return true;
121 
122  default:
123  return false;
124  }
125 }
126 
127 inline bool is_ext_arg_type_pointer(const ExtArgumentType ext_arg_type) {
128  switch (ext_arg_type) {
136  return true;
137 
138  default:
139  return false;
140  }
141 }
142 
143 inline bool is_ext_arg_type_scalar(const ExtArgumentType ext_arg_type) {
144  switch (ext_arg_type) {
153  return true;
154 
155  default:
156  return false;
157  }
158 }
159 
160 inline bool is_ext_arg_type_scalar_integer(const ExtArgumentType ext_arg_type) {
161  switch (ext_arg_type) {
166  return true;
167  default:
168  return false;
169  }
170 }
171 
172 inline int32_t max_digits_for_ext_integer_arg(const ExtArgumentType ext_arg_type) {
173  switch (ext_arg_type) {
175  return 2;
177  return 4;
179  return 9;
181  return 18;
182  default:
183  UNREACHABLE();
184  return 0;
185  }
186 }
187 
188 inline bool is_ext_arg_type_nonscalar(const ExtArgumentType ext_arg_type) {
189  return !is_ext_arg_type_scalar(ext_arg_type);
190 }
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:255
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)