OmniSciDB  c0231cc57d
 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 
24 int32_t generate_series_parallel(const int64_t start,
25  const int64_t stop,
26  const int64_t step,
27  Column<int64_t>& series_output);
28 
29 // Note that "start" is a reserved keyword in SQL, so to allow usage as a named
30 // parameter without quoting we added the "series_" prefix to all args
31 
32 // clang-format off
33 /*
34  UDTF: generate_series__cpu_1(TableFunctionManager, int64_t series_start, int64_t series_stop, int64_t series_step | require="series_step != 0") -> Column<int64_t> generate_series
35  UDTF: generate_series__cpu_2(TableFunctionManager, int64_t series_start, int64_t series_stop) -> Column<int64_t> generate_series
36 */
37 // clang-format on
38 
41  const int64_t start,
42  const int64_t stop,
43  const int64_t step,
44  Column<int64_t>& series_output);
45 
48  const int64_t start,
49  const int64_t stop,
50  Column<int64_t>& series_output);
51 
52 // clang-format off
53 /*
54  UDTF: generate_random_strings__cpu_(TableFunctionManager,
55  int64_t num_strings | require="num_strings >= 0",
56  int64_t string_length | require="string_length > 0") ->
57  Column<int64_t> id, Column<TextEncodingDict> rand_str | input_id=args<>
58 */
59 // clang-format on
60 
63  const int64_t num_strings,
64  const int64_t string_length,
65  Column<int64_t>& output_id,
66  Column<TextEncodingDict>& output_strings);
67 
68 #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)
EXTENSION_NOINLINE_HOST int32_t generate_series_parallel(const int64_t start, const int64_t stop, const int64_t step, Column< int64_t > &series_output)
#define EXTENSION_NOINLINE_HOST
Definition: heavydbTypes.h:47
EXTENSION_NOINLINE_HOST int32_t generate_series__cpu_2(TableFunctionManager &mgr, const int64_t start, const int64_t stop, Column< int64_t > &series_output)
EXTENSION_NOINLINE_HOST int32_t generate_series__cpu_1(TableFunctionManager &mgr, const int64_t start, const int64_t stop, const int64_t step, Column< int64_t > &series_output)