OmniSciDB  6686921089
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
test_udtf_signatures.hpp
Go to the documentation of this file.
1 /*
2  This file contains test inputs to generate_TableFunctionsFactory_init.py script.
3 */
4 
5 // clang-format off
6 /*
7 
8  UDTF: foo(Column<int32>) -> Column<int32> !
9  foo(ColumnInt32) -> ColumnInt32
10 
11  UDTF: foo(Column<int32>, RowMultiplier) -> Column<int32> !
12  foo(ColumnInt32, kUserSpecifiedRowMultiplier<2>) -> ColumnInt32
13 
14  UDTF: foo(RowMultiplier, Column<int32>) -> Column<int32> !
15  foo(kUserSpecifiedRowMultiplier<1>, ColumnInt32) -> ColumnInt32
16 
17  UDTF: foo(Column<int32>, Constant<5>) -> Column<int32> !
18  foo(ColumnInt32, kConstant<5>) -> ColumnInt32
19 
20  UDTF: foo(Cursor<Column<int32>>) -> Column<int32> !
21  foo(Cursor<ColumnInt32> | fields=[field0]) -> ColumnInt32
22 
23  UDTF: foo(Cursor<Column<int32>, Column<float>>) -> Column<int32> !
24  foo(Cursor<ColumnInt32, ColumnFloat> | fields=[field0,field1]) -> ColumnInt32
25  UDTF: foo(Cursor<Column<int32>>, Cursor<Column<float>>) -> Column<int32> !
26  foo(Cursor<ColumnInt32> | fields=[field0], Cursor<ColumnFloat> | fields=[field0]) -> ColumnInt32
27 
28  UDTF: foo(Column<int32>) -> Column<int32>, Column<float> !
29  foo(ColumnInt32) -> ColumnInt32, ColumnFloat
30  UDTF: foo(Column<int32>|name=a) -> Column<int32>|name=out !
31  foo(ColumnInt32 | name=a) -> ColumnInt32 | name=out
32  UDTF: foo(Column<int32>a) -> Column<int32>out !
33  foo(ColumnInt32 | name=a) -> ColumnInt32 | name=out
34 
35  UDTF: foo(Column<TextEncodingDict>) -> Column<TextEncodingDict> !
36  foo(ColumnTextEncodingDict) -> ColumnTextEncodingDict | input_id=args<0>
37  UDTF: foo(ColumnList<TextEncodingDict>) -> Column<TextEncodingDict> !
38  foo(ColumnListTextEncodingDict) -> ColumnTextEncodingDict | input_id=args<0, 0>
39  UDTF: foo(ColumnList<TextEncodingDict>, Column<int>, Column<TextEncodingDict>) -> Column<TextEncodingDict> | input_id=args<2> !
40  foo(ColumnListTextEncodingDict, ColumnInt32, ColumnTextEncodingDict) -> ColumnTextEncodingDict | input_id=args<2>
41  UDTF: foo(Column<int>, Column<TextEncodingDict>) -> Column<TextEncodingDict> | input_id=args<1> !
42  foo(ColumnInt32, ColumnTextEncodingDict) -> ColumnTextEncodingDict | input_id=args<1>
43  UDTF: foo(Column<int>, ColumnList<TextEncodingDict>) -> Column<TextEncodingDict> !
44  foo(ColumnInt32, ColumnListTextEncodingDict) -> ColumnTextEncodingDict | input_id=args<1, 0>
45  UDTF: foo(Column<TextEncodingDict> | name = a) -> Column<TextEncodingDict> | name=out | input_id=args<0> !
46  foo(ColumnTextEncodingDict | name=a) -> ColumnTextEncodingDict | name=out | input_id=args<0>
47  UDTF: foo(Column<TextEncodingDict> a) -> Column<TextEncodingDict> out | input_id=args<0> !
48  foo(ColumnTextEncodingDict | name=a) -> ColumnTextEncodingDict | name=out | input_id=args<0>
49 
50  UDTF: foo__cpu_template(Column<int32_t>) -> Column<int32_t> !
51  foo__cpu_template(ColumnInt32) -> ColumnInt32
52 
53  UDTF: foo__cpu(Column<T>, T, Cursor<ColumnList<U>>) -> Column<T>, T=[int32], U=[float] !
54  foo__cpu(ColumnInt32, Int32, Cursor<ColumnListFloat> | fields=[field0]) -> ColumnInt32
55  UDTF: foo__cpu(Column<T> in1, T in2, Cursor<ColumnList<U>> in3) -> Column<T> out1, Column<U> out2, T=[int32], U=[float] !
56  foo__cpu(ColumnInt32 | name=in1, Int32 | name=in2, Cursor<ColumnListFloat> | name=in3 | fields=[field0]) -> ColumnInt32 | name=out1, ColumnFloat | name=out2
57 
58  UDTF: foo__cpu_template(Column<T>) -> Column<U>, T=[int32, int64], U=[float, double] !
59  foo__cpu_template(ColumnInt32) -> ColumnFloat !
60  foo__cpu_template(ColumnInt64) -> ColumnFloat !
61  foo__cpu_template(ColumnInt32) -> ColumnDouble !
62  foo__cpu_template(ColumnInt64) -> ColumnDouble
63 
64  UDTF: foo__cpu(TableFunctionManager, int64_t) -> Column<int64_t> !
65  foo__cpu(TableFunctionManager, Int64) -> ColumnInt64
66 
67  UDTF: foo__cpu(TableFunctionManager, Cursor<Column<int64_t> x, Column<int64_t> y> z) -> Column<int64_t> !
68  foo__cpu(TableFunctionManager, Cursor<ColumnInt64 | name=x, ColumnInt64 | name=y> | name=z | fields=[x,y]) -> ColumnInt64
69 
70  UDTF: foo__cpu(TableFunctionManager) | filter_table_function_transpose=on -> Column<int64_t> !
71  foo__cpu(TableFunctionManager) | filter_table_function_transpose=1 -> ColumnInt64
72  UDTF: foo__cpu(TableFunctionManager) | filter_table_function_transpose=off -> Column<int64_t> !
73  foo__cpu(TableFunctionManager) | filter_table_function_transpose=0 -> ColumnInt64
74  UDTF: foo__cpu(TableFunctionManager) | bar=off -> Column<int64_t> !
75  TransformerException: unknown function annotation: `bar`
76  UDTF: foo__cpu(TableFunctionManager | bar=off) -> Column<int64_t> !
77  TransformerException: unknown input annotation: `bar`
78  UDTF: foo__cpu(TableFunctionManager) -> Column<int64_t> | bar=off !
79  TransformerException: unknown output annotation: `bar`
80 
81  UDTF: foo__cpu(TableFunctionManager, Cursor<int32_t x> | fields=[x1]) -> Column<int64_t>!
82  foo__cpu(TableFunctionManager, Cursor<Int32 | name=x> | fields=[x1]) -> ColumnInt64
83 
84  UDTF: foo_int_require(Column<int> | name=col, int32_t | require="sqrt(arg1) > col.size()" | name=arg1) -> int32_t !
85  foo_int_require(ColumnInt32 | name=col, Int32 | require="sqrt(arg1) > col.size()" | name=arg1) -> Int32
86  UDTF: foo_int_require_mgr(TableFunctionManager, Column<int> | name=col, int32_t | require="sqrt(arg1) > col.size()" | name=arg1) -> int32_t !
87  foo_int_require_mgr(TableFunctionManager, ColumnInt32 | name=col, Int32 | require="sqrt(arg1) > col.size()" | name=arg1) -> Int32
88  UDTF: foo_int_require(Column<int> col, int x | require="x > 0" | require="x < 5") -> int !
89  foo_int_require(ColumnInt32 | name=col, Int32 | name=x | require="x > 0" | require="x < 5") -> Int32
90  UDTF: foo_str_require(TextEncodingNone s | require="s == \"str\"") -> int32_t !
91  foo_str_require(TextEncodingNone | name=s | require="s == \"str\"") -> Int32
92  */
93 // clang-format on