OmniSciDB  72c90bc290
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SignatureTestTableFunctions.cpp
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 #include "TableFunctionsTesting.h"
18 
19 /*
20  This file contains signature-related compile-time test UDTFs.
21  These functions test features related to UDTF signatures, such
22  as input/output sizing, templating, pre-flight features, overloading, etc.
23  */
24 
25 #ifndef __CUDACC__
26 
27 template <typename T, typename U, typename K>
29  const Column<U>& input2,
30  Column<K>& out) {
31  if constexpr (std::is_same<T, TextEncodingDict>::value &&
32  std::is_same<U, TextEncodingDict>::value) {
33  set_output_row_size(input1.size());
34  for (int64_t i = 0; i < input1.size(); i++) {
35  out[i] = input1[i];
36  }
37  return input1.size();
38  }
39 
41  if constexpr (std::is_same<T, int32_t>::value && std::is_same<U, double>::value) {
42  out[0] = 10;
43  } else if constexpr (std::is_same<T, double>::value && std::is_same<U, double>::value) {
44  out[0] = 20;
45  } else if constexpr (std::is_same<T, int32_t>::value &&
46  std::is_same<U, int32_t>::value) {
47  out[0] = 30;
48  } else if constexpr (std::is_same<T, double>::value &&
49  std::is_same<U, int32_t>::value) {
50  out[0] = 40;
51  }
52  return 1;
53 }
54 
55 // explicit instantiations
56 template NEVER_INLINE HOST int32_t
58  const Column<int32_t>& input2,
59  Column<int32_t>& out);
60 template NEVER_INLINE HOST int32_t
62  const Column<double>& input2,
63  Column<int32_t>& out);
64 template NEVER_INLINE HOST int32_t
66  const Column<int32_t>& input2,
67  Column<int32_t>& out);
68 template NEVER_INLINE HOST int32_t
70  const Column<double>& input2,
71  Column<int32_t>& out);
72 template NEVER_INLINE HOST int32_t
74  const Column<TextEncodingDict>& input2,
76 
77 #endif // #ifndef __CUDACC__
78 
79 #ifndef __CUDACC__
80 
81 template <typename T>
83  Column<T>& out) {
85  T acc = 0;
86  for (int64_t i = 0; i < input.size(); i++) {
87  acc += input[i];
88  }
89  out[0] = acc;
90  return 1;
91 }
92 
93 // explicit instantiations
94 template NEVER_INLINE HOST int32_t
96 template NEVER_INLINE HOST int32_t
98 
99 template <typename T>
101  Column<T>& out) {
102  T acc1 = 0, acc2 = 0;
103  for (int64_t i = 0; i < input.size(); i++) {
104  if (i % 2 == 0) {
105  acc1 += input[i];
106  } else {
107  acc2 += input[i];
108  }
109  }
110  out[0] = acc1;
111  out[1] = acc2;
112  return 2;
113 }
114 
115 template NEVER_INLINE HOST int32_t
117 template NEVER_INLINE HOST int32_t
119 
120 template <typename T>
122  int32_t c,
123  Column<T>& out) {
124  for (int64_t i = 0; i < c; i++) {
125  out[i] = 0;
126  }
127  for (int64_t i = 0; i < input.size(); i++) {
128  out[i % c] += input[i];
129  }
130  return c;
131 }
132 
133 // explicit instantiations
134 template NEVER_INLINE HOST int32_t
136  int32_t c,
137  Column<int32_t>& out);
138 template NEVER_INLINE HOST int32_t
140  int32_t c,
141  Column<double>& out);
142 
143 template <typename T>
145  int32_t m,
146  Column<T>& out) {
147  for (int64_t j = 0; j < m; j++) {
148  for (int64_t i = 0; i < input.size(); i++) {
149  out[j * input.size() + i] += input[i];
150  }
151  }
152  return m * input.size();
153 }
154 
155 // explicit instantiations
156 template NEVER_INLINE HOST int32_t
158  int32_t m,
159  Column<int32_t>& out);
160 template NEVER_INLINE HOST int32_t
162  int32_t m,
163  Column<double>& out);
164 
165 #endif // #ifndef __CUDACC__
166 
167 #ifndef __CUDACC__
168 
169 template <typename T>
172  answer[0] = 42;
173  return 1;
174 }
175 
176 // explicit instantiations
177 template NEVER_INLINE HOST int32_t
179 
180 #endif // #ifndef __CUDACC__
181 
183 #ifdef __CUDACC__
184  int32_t start = threadIdx.x + blockDim.x * blockIdx.x;
185  int32_t stop = static_cast<int32_t>(42);
186  int32_t step = blockDim.x * gridDim.x;
187 #else
188  auto start = 0;
189  auto stop = 42;
190  auto step = 1;
191 #endif
192  for (auto i = start; i < stop; i += step) {
193  answer[i] = 42 * i;
194  }
195  return 42;
196 }
197 
198 #ifndef __CUDACC__
199 
200 template <typename T>
201 NEVER_INLINE HOST int32_t
203  T quotient = num;
205  int32_t counter{0};
206  while (quotient >= 1) {
207  answer[counter++] = quotient;
208  quotient /= 10;
209  }
210  return counter;
211 }
212 
213 template NEVER_INLINE HOST int32_t
215 template NEVER_INLINE HOST int32_t
217 template NEVER_INLINE HOST int32_t
219 template NEVER_INLINE HOST int32_t
221 
222 #endif // #ifndef __CUDACC__
223 
225  const int64_t num2,
226  Column<int64_t>& answer1,
227  Column<int64_t>& answer2) {
228 #ifdef __CUDACC__
229  int32_t start = threadIdx.x + blockDim.x * blockIdx.x;
230  int32_t stop = static_cast<int32_t>(5);
231  int32_t step = blockDim.x * gridDim.x;
232 #else
233  auto start = 0;
234  auto stop = 5;
235  auto step = 1;
236 #endif
237  for (auto i = start; i < stop; i += step) {
238  answer1[i] = num1 + i * num2;
239  answer2[i] = num1 - i * num2;
240  }
241  return 5;
242 }
243 
244 #ifndef __CUDACC__
245 
248  int32_t c,
249  Column<int32_t>& output) {
250  for (int32_t i = 0; i < c; i++) {
251  output[i] = input_num;
252  }
253  return c;
254 }
255 
256 #endif // #ifndef __CUDACC__
257 
258 #ifndef __CUDACC__
259 
260 template <typename T>
261 NEVER_INLINE HOST int32_t
263  int32_t c,
264  Column<T>& output) {
265  for (int32_t i = 0; i < c; i++) {
266  output[i] = input_num;
267  }
268  return c;
269 }
270 
271 // explicit instantiations
272 template NEVER_INLINE HOST int32_t
274  int32_t c,
275  Column<int32_t>& output);
276 template NEVER_INLINE HOST int32_t
278  int32_t c,
279  Column<float>& output);
280 
281 #endif // #ifndef __CUDACC__
282 
283 #ifdef __CUDACC__
284 
285 EXTENSION_NOINLINE int32_t
286 ct_no_cursor_user_constant_sizer__gpu_(const int32_t input_num,
287  int32_t c,
288  Column<int32_t>& output) {
289  int32_t start = threadIdx.x + blockDim.x * blockIdx.x;
290  int32_t step = blockDim.x * gridDim.x;
291 
292  for (int32_t i = start; i < c; i += step) {
293  output[i] = input_num;
294  }
295  return c;
296 }
297 
298 template <typename T>
299 TEMPLATE_NOINLINE int32_t
300 ct_templated_no_cursor_user_constant_sizer__gpu_template(const T input_num,
301  int32_t c,
302  Column<T>& output) {
303  int32_t start = threadIdx.x + blockDim.x * blockIdx.x;
304  int32_t step = blockDim.x * gridDim.x;
305 
306  for (int32_t i = start; i < c; i += step) {
307  output[i] = input_num;
308  }
309  return c;
310 }
311 
312 // explicit instantiations
313 template TEMPLATE_NOINLINE int32_t
314 ct_templated_no_cursor_user_constant_sizer__gpu_template(const int32_t input_num,
315  int32_t c,
316  Column<int32_t>& output);
317 template TEMPLATE_NOINLINE int32_t
318 ct_templated_no_cursor_user_constant_sizer__gpu_template(const float input_num,
319  int32_t c,
320  Column<float>& output);
321 
322 #endif //__CUDACC__
323 
324 #ifndef __CUDACC__
325 
327  const int32_t i,
328  Column<int32_t>& out) {
330  out[0] = 3;
331  return 1;
332 }
333 
335  const TextEncodingNone& s,
336  Column<int32_t>& out) {
338  out[0] = 3;
339  return 1;
340 }
341 
343  const Column<int32_t>& input1,
344  const int32_t i,
345  Column<int32_t>& out) {
347  out[0] = 4;
348  return 1;
349 }
350 
351 template <typename T, typename K>
353  const int32_t i,
354  Column<K>& out) {
356  if constexpr (std::is_same<T, int32_t>::value) {
357  out[0] = 5;
358  } else if constexpr (std::is_same<T, double>::value) {
359  out[0] = 6.0;
360  }
361  return 1;
362 }
363 
364 // explicit instantiations
365 template NEVER_INLINE HOST int32_t
367  const int32_t i,
368  Column<int>& out);
369 template NEVER_INLINE HOST int32_t
371  const int32_t i,
372  Column<int>& out);
373 
375  const int32_t i,
376  Column<int32_t>& out) {
378  out[0] = 7;
379  return 1;
380 }
381 
383  const TextEncodingNone& i,
384  Column<int32_t>& out) {
386  out[0] = 8;
387  return 1;
388 }
389 
391  const TextEncodingNone& i,
392  Column<int32_t>& out) {
394  out[0] = 9;
395  return 1;
396 }
397 
400  const int64_t x,
401  Column<int64_t>& out) {
403  out[0] = 10;
404  return 1;
405 }
406 
409  const int64_t x,
410  Column<int64_t>& out) {
412  out[0] = 11;
413  return 1;
414 }
415 
417  int64_t y,
418  Column<int64_t>& out) {
420  out[0] = 12;
421  return 1;
422 }
423 
425  const Column<int32_t>& input,
426  const TextEncodingNone& t,
427  Column<int32_t>& out) {
429  mgr.set_output_row_size(1);
430  TextEncodingNone t2(mgr, t.getString());
431  out[0] = 11;
432  return 1;
433 }
434 
435 #endif // #ifndef __CUDACC__
436 
437 #ifdef __CUDACC__
438 
439 EXTENSION_NOINLINE int32_t ct_require_device_cuda__gpu_(const Column<int32_t>& input1,
440  const int32_t i,
441  Column<int32_t>& out) {
442  out[0] = (i > 0 ? 12345 : 54321);
443  return 1;
444 }
445 
446 #endif //__CUDACC__
447 
449  const int32_t i,
450  const int32_t j,
451  Column<int32_t>& out) {
452  out[0] = 123;
453  out[1] = 456;
454  return out.size();
455 }
456 
458  Column<int32_t>& out) {
459  out[0] = 789;
460  out[1] = 321;
461  return out.size();
462 }
463 
464 #ifndef __CUDACC__
465 
466 EXTENSION_NOINLINE int32_t
468  const Column<int32_t>& col,
469  const ColumnList<int32_t>& lst,
470  const int x,
471  const int y,
472  Column<int32_t>& out) {
473  mgr.set_output_row_size(lst.numCols() + 1);
474  out[0] = col[0];
475  for (int i = 0; i < lst.numCols(); i++) {
476  out[i + 1] = lst[i][0];
477  }
478  return out.size();
479 }
480 
481 EXTENSION_NOINLINE int32_t
483  const Column<int32_t>& col,
484  const ColumnList<int32_t>& lst,
485  const int x,
486  const int y,
487  Column<int32_t>& out) {
488  mgr.set_output_row_size(lst.numCols() + 1);
489  out[0] = col[1];
490  for (int i = 0; i < lst.numCols(); i++) {
491  out[i + 1] = lst[i][1];
492  }
493  return out.size();
494 }
495 
497  const int32_t arg1,
498  const int32_t arg2,
499  Column<int32_t>& out1,
500  Column<int32_t>& out2) {
501  mgr.set_output_row_size(1);
502  out1[0] = arg1;
503  out2[0] = arg2;
504  return 1;
505 }
506 
509  const Column<int32_t>& input_arg1,
510  const Column<int32_t>& input_arg2,
511  const int32_t arg1,
512  const int32_t arg2,
513  Column<int32_t>& out1,
514  Column<int32_t>& out2) {
515  const int32_t num_rows = input_arg1.size();
516  mgr.set_output_row_size(num_rows);
517  for (int32_t r = 0; r < num_rows; ++r) {
518  out1[r] = input_arg1[r] + arg1;
519  out2[r] = input_arg2[r] + arg2;
520  }
521  return num_rows;
522 }
523 
524 // Test table functions overloaded on scalar types
525 // Calcite should pick the proper overloaded operator for each templated table function
526 template <typename T>
528  Column<T>& out) {
530  if constexpr (std::is_same<T, int64_t>::value) {
531  out[0] = scalar;
532  } else if constexpr (std::is_same<T, Timestamp>::value) {
533  out[0] = scalar.time;
534  }
535  return 1;
536 }
537 
538 // explicit instantiations
539 template NEVER_INLINE HOST int32_t
541 
542 template NEVER_INLINE HOST int32_t
543 ct_overload_scalar_test__cpu_template(const int64_t scalar, Column<int64_t>& out);
544 
545 // Test table functions overloaded on column types
546 // Calcite should pick the proper overloaded operator for each templated table function
547 template <typename T>
549  Column<T>& out) {
550  int64_t size = input.size();
551  set_output_row_size(size);
552  for (int64_t i = 0; i < size; ++i) {
553  if (input.isNull(i)) {
554  out.setNull(i);
555  } else {
556  out[i] = input[i];
557  }
558  }
559  return size;
560 }
561 
562 // explicit instantiations
563 template NEVER_INLINE HOST int32_t
565  Column<Timestamp>& out);
566 
567 template NEVER_INLINE HOST int32_t
570 
571 template NEVER_INLINE HOST int32_t
573 
574 template NEVER_INLINE HOST int32_t
577 
578 template NEVER_INLINE HOST int32_t
580  Column<Array<int64_t>>& out);
581 
582 // Test Calcite overload resolution for table functions with ColumnList arguments
583 // Calcite should pick the proper overloaded operator for each templated table function
584 template <typename T, typename K>
585 NEVER_INLINE HOST int32_t
587  const ColumnList<T>& col_list,
588  const Column<K>& last_col,
589  Column<K>& out) {
591  int64_t num_cols = col_list.numCols();
592  T sum = 0;
593  for (int64_t i = 0; i < num_cols; ++i) {
594  const Column<T>& col = col_list[i];
595  for (int64_t j = 0; j < col.size(); ++j) {
596  sum += col[j];
597  }
598  }
599  if (sum > 0) {
600  out[0] = first_col[0];
601  } else {
602  out[0] = last_col[0];
603  }
604  return 1;
605 }
606 
607 // explicit instantiations
608 template NEVER_INLINE HOST int32_t
610  const ColumnList<int64_t>& col_list,
611  const Column<int64_t>& last_col,
612  Column<int64_t>& out);
613 
614 template NEVER_INLINE HOST int32_t
616  const ColumnList<double>& col_list,
617  const Column<int64_t>& last_col,
618  Column<int64_t>& out);
619 
620 // Test Calcite overload resolution for table functions with multiple ColumnList arguments
621 template <typename T, typename K>
622 NEVER_INLINE HOST int32_t
624  const ColumnList<K>& col_list1,
625  const ColumnList<T>& col_list2,
626  const Column<T>& last_col,
627  Column<K>& out) {
629  int64_t num_cols = col_list1.numCols();
630  K sum = 0;
631  for (int64_t i = 0; i < num_cols; ++i) {
632  const Column<K>& col = col_list1[i];
633  for (int64_t j = 0; j < col.size(); ++j) {
634  sum += col[j];
635  }
636  }
637 
638  int64_t num_cols2 = col_list2.numCols();
639  T sum2 = 0;
640  for (int64_t i = 0; i < num_cols2; ++i) {
641  const Column<T>& col = col_list2[i];
642  for (int64_t j = 0; j < col.size(); ++j) {
643  sum2 += col[j];
644  }
645  }
646 
647  if (sum + sum2 > 0) {
648  out[0] = first_col[0];
649  } else {
650  out[0] = last_col[0];
651  }
652  return 1;
653 }
654 
655 // explicit instantiations
656 template NEVER_INLINE HOST int32_t
658  const ColumnList<int64_t>& col_list1,
659  const ColumnList<double>& col_list2,
660  const Column<double>& last_col,
661  Column<int64_t>& out);
662 
663 template NEVER_INLINE HOST int32_t
665  const ColumnList<int64_t>& col_list1,
666  const ColumnList<int64_t>& col_list2,
667  const Column<int64_t>& last_col,
668  Column<int64_t>& out);
669 
670 #endif // ifndef __CUDACC__
671 
673  const int32_t x,
674  const int32_t multiplier,
675  Column<int32_t>& out) {
676  out[0] = 0;
677  return 1;
678 }
679 
680 template <typename T>
682  const T x,
683  const int32_t multiplier,
684  Column<T>& out) {
685  int32_t size = inp.size();
686  for (int i = 0; i < size; ++i) {
687  out[i] = inp[i] * x;
688  }
689 
690  return size;
691 }
692 
693 // explicit instantiations
694 template TEMPLATE_NOINLINE int32_t
696  const int8_t x,
697  const int32_t multiplier,
698  Column<int8_t>& out);
699 
700 template TEMPLATE_NOINLINE int32_t
702  const int16_t x,
703  const int32_t multiplier,
704  Column<int16_t>& out);
705 
706 template TEMPLATE_NOINLINE int32_t
708  const int32_t x,
709  const int32_t multiplier,
710  Column<int32_t>& out);
711 
712 template TEMPLATE_NOINLINE int32_t
714  const int64_t x,
715  const int32_t multiplier,
716  Column<int64_t>& out);
717 
718 template <typename T>
720  const T x,
721  const int32_t multiplier,
722  Column<T>& out) {
723  int32_t size = inp.size();
724  for (int i = 0; i < size; ++i) {
725  out[i] = inp[i] / x;
726  }
727 
728  return size;
729 }
730 
731 // explicit instantiations
732 template TEMPLATE_NOINLINE int32_t
734  const float x,
735  const int32_t multiplier,
736  Column<float>& out);
737 
738 template TEMPLATE_NOINLINE int32_t
740  const double x,
741  const int32_t multiplier,
742  Column<double>& out);
743 
744 #ifndef __CUDACC__
745 
746 EXTENSION_NOINLINE int32_t
748  const Column<TextEncodingDict>& inp,
749  const TextEncodingNone& suffix,
751  int32_t size = inp.size();
752  mgr.set_output_row_size(size);
753  for (int i = 0; i < size; ++i) {
754  std::string output_string = inp.getString(i);
755  output_string += suffix.getString();
756  const TextEncodingDict concatted_id = out.getOrAddTransient(output_string);
757  out[i] = concatted_id;
758  }
759 
760  return size;
761 }
762 
763 EXTENSION_NOINLINE int32_t
765  const Column<TextEncodingDict>& input1,
767  int32_t size = input1.size();
768  mgr.set_output_row_size(size);
769  for (int i = 0; i < size; ++i) {
770  out[i] = input1[i];
771  }
772  return size;
773 }
774 
775 EXTENSION_NOINLINE int32_t
777  const Column<int64_t>& input1,
778  Column<int64_t>& out) {
779  int32_t size = input1.size();
780  mgr.set_output_row_size(size);
781  for (int i = 0; i < size; ++i) {
782  out[i] = input1[i];
783  }
784  return size;
785 }
786 
787 EXTENSION_NOINLINE int32_t
789  const Column<double>& input1,
790  Column<double>& out) {
791  int32_t size = input1.size();
792  mgr.set_output_row_size(size);
793  for (int i = 0; i < size; ++i) {
794  out[i] = input1[i];
795  }
796  return size;
797 }
798 
799 EXTENSION_NOINLINE int32_t
801  const Column<Timestamp>& input1,
802  Column<Timestamp>& out) {
803  int32_t size = input1.size();
804  mgr.set_output_row_size(size);
805  for (int i = 0; i < size; ++i) {
806  out[i] = input1[i];
807  }
808  return size;
809 }
810 
811 template <typename T>
812 TEMPLATE_NOINLINE int32_t
814  const Column<T>& first,
815  const ColumnList<T>& list,
816  Column<T>& out) {
817  mgr.set_output_row_size(list.numCols() + 1);
818  out[0] = first[0];
819  for (int i = 0; i < list.numCols(); i++) {
820  out[i + 1] = list[i][0];
821  }
822  return out.size();
823 }
824 
825 // explicit instantiations
826 template TEMPLATE_NOINLINE int32_t
828  const Column<float>& first,
829  const ColumnList<float>& list,
830  Column<float>& out);
831 
832 template TEMPLATE_NOINLINE int32_t
834  const Column<double>& first,
835  const ColumnList<double>& list,
836  Column<double>& out);
837 
838 #endif
DEVICE const std::string getString(int64_t index) const
void set_output_row_size(int64_t num_rows)
Definition: heavydbTypes.h:373
EXTENSION_NOINLINE_HOST void set_output_row_size(int64_t num_rows)
EXTENSION_NOINLINE_HOST int32_t ct_require_text_enc_dict__cpu_(const Column< TextEncodingDict > &input, const int64_t x, Column< int64_t > &out)
#define EXTENSION_NOINLINE
Definition: heavydbTypes.h:58
EXTENSION_NOINLINE_HOST int32_t ct_require_str__cpu_(const Column< int32_t > &input1, const TextEncodingNone &s, Column< int32_t > &out)
EXTENSION_NOINLINE_HOST int32_t ct_require_cursor__cpu_(const Column< int64_t > &input, int64_t y, Column< int64_t > &out)
EXTENSION_NOINLINE_HOST int32_t ct_scalar_named_args__cpu_(TableFunctionManager &mgr, const int32_t arg1, const int32_t arg2, Column< int32_t > &out1, Column< int32_t > &out2)
std::string getString() const
Definition: heavydbTypes.h:641
DEVICE int64_t size() const
NEVER_INLINE HOST int32_t ct_named_rowmul_output__cpu_template(const Column< T > &input, int32_t m, Column< T > &out)
DEVICE int64_t numCols() const
EXTENSION_NOINLINE_HOST int32_t ct_require_mgr(TableFunctionManager &mgr, const Column< int32_t > &input1, const int32_t i, Column< int32_t > &out)
TEMPLATE_NOINLINE int32_t ct_test_int_default_arg__template(const Column< T > &inp, const T x, const int32_t multiplier, Column< T > &out)
EXTENSION_NOINLINE int32_t ct_test_preflight_multicursor_qe227__cpu_(TableFunctionManager &mgr, const Column< int32_t > &col, const ColumnList< int32_t > &lst, const int x, const int y, Column< int32_t > &out)
EXTENSION_NOINLINE int32_t ct_test_calcite_casting_char__cpu_(TableFunctionManager &mgr, const Column< TextEncodingDict > &input1, Column< TextEncodingDict > &out)
EXTENSION_NOINLINE_HOST int32_t ct_require_text_collist_enc_dict__cpu_(const ColumnList< TextEncodingDict > &input, const int64_t x, Column< int64_t > &out)
NEVER_INLINE HOST int32_t ct_overload_scalar_test__cpu_template(const T scalar, Column< T > &out)
EXTENSION_NOINLINE int32_t ct_test_preflight_singlecursor_qe227__cpu_(TableFunctionManager &mgr, const Column< int32_t > &col, const ColumnList< int32_t > &lst, const int x, const int y, Column< int32_t > &out)
std::string suffix(SQLTypes type)
Definition: Codegen.cpp:69
EXTENSION_NOINLINE int32_t ct_test_calcite_casting_double__cpu_(TableFunctionManager &mgr, const Column< double > &input1, Column< double > &out)
#define HOST
NEVER_INLINE HOST int32_t ct_named_user_const_output__cpu_template(const Column< T > &input, int32_t c, Column< T > &out)
NEVER_INLINE HOST int32_t ct_overload_column_test__cpu_template(const Column< T > &input, Column< T > &out)
NEVER_INLINE HOST int32_t ct_templated_no_cursor_user_constant_sizer__cpu_template(const T input_num, int32_t c, Column< T > &output)
EXTENSION_NOINLINE int32_t ct_test_preflight_sizer(const Column< int32_t > &input, const int32_t i, const int32_t j, Column< int32_t > &out)
NEVER_INLINE HOST int32_t ct_named_const_output__cpu_template(const Column< T > &input, Column< T > &out)
EXTENSION_NOINLINE int32_t ct_test_preflight_sizer_const(const Column< int32_t > &input, Column< int32_t > &out)
EXTENSION_NOINLINE int32_t ct_test_string_default_arg__cpu_(TableFunctionManager &mgr, const Column< TextEncodingDict > &inp, const TextEncodingNone &suffix, Column< TextEncodingDict > &out)
#define EXTENSION_NOINLINE_HOST
Definition: heavydbTypes.h:55
EXTENSION_NOINLINE_HOST int32_t ct_cursor_named_args__cpu_(TableFunctionManager &mgr, const Column< int32_t > &input_arg1, const Column< int32_t > &input_arg2, const int32_t arg1, const int32_t arg2, Column< int32_t > &out1, Column< int32_t > &out2)
NEVER_INLINE HOST int32_t ct_scalar_1_arg_runtime_sizing__cpu_template(const T num, Column< T > &answer)
EXTENSION_NOINLINE_HOST int32_t ct_require_or_str__cpu_(const Column< int32_t > &input1, const TextEncodingNone &i, Column< int32_t > &out)
DEVICE bool isNull(int64_t index) const
DEVICE void setNull(int64_t index)
TEMPLATE_NOINLINE int32_t ct_test_float_default_arg__template(const Column< T > &inp, const T x, const int32_t multiplier, Column< T > &out)
EXTENSION_NOINLINE int32_t ct_require_range__cpu_(const Column< int32_t > &input1, const int32_t x, const int32_t multiplier, Column< int32_t > &out)
NEVER_INLINE HOST int32_t ct_overload_column_list_test2__cpu_template(const Column< K > &first_col, const ColumnList< K > &col_list1, const ColumnList< T > &col_list2, const Column< T > &last_col, Column< K > &out)
NEVER_INLINE HOST int32_t ct_require_templating__cpu_template(const Column< T > &input1, const int32_t i, Column< K > &out)
EXTENSION_NOINLINE_HOST int32_t ct_require_and__cpu_(const Column< int32_t > &input1, const int32_t i, Column< int32_t > &out)
EXTENSION_NOINLINE_HOST int32_t ct_require_str_diff__cpu_(const Column< int32_t > &input1, const TextEncodingNone &i, Column< int32_t > &out)
#define NEVER_INLINE
EXTENSION_NOINLINE int32_t ct_no_arg_constant_sizing(Column< int32_t > &answer)
EXTENSION_NOINLINE_HOST int32_t ct_test_allocator(TableFunctionManager &mgr, const Column< int32_t > &input, const TextEncodingNone &t, Column< int32_t > &out)
NEVER_INLINE HOST int32_t ct_named_output__cpu_template(const Column< T > &input, Column< T > &out)
EXTENSION_NOINLINE int32_t ct_scalar_2_args_constant_sizing(const int64_t num1, const int64_t num2, Column< int64_t > &answer1, Column< int64_t > &answer2)
DEVICE int64_t size() const
TEMPLATE_NOINLINE int32_t ct_test_calcite_casting_columnlist__template_cpu_(TableFunctionManager &mgr, const Column< T > &first, const ColumnList< T > &list, Column< T > &out)
NEVER_INLINE HOST int32_t ct_overload_column_list_test__cpu_template(const Column< K > &first_col, const ColumnList< T > &col_list, const Column< K > &last_col, Column< K > &out)
DEVICE const TextEncodingDict getOrAddTransient(const std::string &str)
void enable_output_allocations()
Definition: heavydbTypes.h:381
NEVER_INLINE HOST int32_t ct_binding_column2__cpu_template(const Column< T > &input1, const Column< U > &input2, Column< K > &out)
NEVER_INLINE HOST int32_t ct_no_arg_runtime_sizing__cpu_template(Column< T > &answer)
EXTENSION_NOINLINE_HOST int32_t ct_no_cursor_user_constant_sizer__cpu_(const int32_t input_num, int32_t c, Column< int32_t > &output)
EXTENSION_NOINLINE int32_t ct_test_calcite_casting_timestamp__cpu_(TableFunctionManager &mgr, const Column< Timestamp > &input1, Column< Timestamp > &out)
#define TEMPLATE_NOINLINE
Definition: heavydbTypes.h:60
EXTENSION_NOINLINE_HOST int32_t ct_require__cpu_(const Column< int32_t > &input1, const int32_t i, Column< int32_t > &out)
EXTENSION_NOINLINE int32_t ct_test_calcite_casting_bigint__cpu_(TableFunctionManager &mgr, const Column< int64_t > &input1, Column< int64_t > &out)