OmniSciDB  a987f07e93
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
UtilityTableFunctions.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 
21 #ifndef __CUDACC__
22 
23 // Note that "start" is a reserved keyword in SQL, so to allow usage as a named
24 // parameter without quoting we added the "series_" prefix to all args
25 
26 // clang-format off
27 /*
28  UDTF: generate_series__cpu_template(TableFunctionManager, int64_t series_start, int64_t series_stop, int64_t series_step | require="series_step != 0") -> Column<int64_t> generate_series
29  UDTF: generate_series__cpu_template(TableFunctionManager, T series_start, T series_stop) -> Column<T> generate_series, T=[int64_t]
30  UDTF: generate_series__cpu_template(TableFunctionManager, Timestamp series_start, Timestamp series_stop, T series_step | require="series_step != 0") -> Column<Timestamp> generate_series, T=[DayTimeInterval, YearMonthTimeInterval]
31 */
32 // clang-format on
33 
34 template <typename T, typename K>
36  const T start,
37  const T stop,
38  const K step,
39  Column<T>& series_output);
40 
41 template <typename T>
43  const T start,
44  const T stop,
45  Column<T>& series_output);
46 
47 // clang-format off
48 /*
49  UDTF: generate_random_strings__cpu_(TableFunctionManager,
50  int64_t num_strings | require="num_strings >= 0",
51  int64_t string_length | require="string_length > 0") ->
52  Column<int64_t> id, Column<TextEncodingDict> rand_str | input_id=args<>
53 */
54 // clang-format on
55 
58  const int64_t num_strings,
59  const int64_t string_length,
60  Column<int64_t>& output_id,
61  Column<TextEncodingDict>& output_strings);
62 
63 #endif // __CUDACC__
EXTENSION_NOINLINE_HOST int32_t generate_random_strings__cpu_(TableFunctionManager &mgr, const int64_t num_strings, const int64_t string_length, Column< int64_t > &output_id, Column< TextEncodingDict > &output_strings)
#define HOST
#define EXTENSION_NOINLINE_HOST
Definition: heavydbTypes.h:49
#define NEVER_INLINE
NEVER_INLINE HOST int32_t generate_series__cpu_template(TableFunctionManager &mgr, const T start, const T stop, const K step, Column< T > &series_output)