OmniSciDB  a5dc49c757
 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_0(Column<int32>) -> Column<int32> $=>$
9  foo_0(ColumnInt32) -> ColumnInt32
10 
11  UDTF: foo_1(Column<int32>, RowMultiplier) -> Column<int32> $=>$
12  foo_1(ColumnInt32, kUserSpecifiedRowMultiplier<2>) -> ColumnInt32
13 
14  UDTF: foo_2(RowMultiplier, Column<int32>) -> Column<int32> $=>$
15  foo_2(kUserSpecifiedRowMultiplier<1>, ColumnInt32) -> ColumnInt32
16 
17  UDTF: foo_3(Column<int32>, Constant<5>) -> Column<int32> $=>$
18  foo_3(ColumnInt32, kConstant<5>) -> ColumnInt32
19 
20  UDTF: foo_4(Column<int32>, int i, int j) -> Column<int32> | output_row_size="i * j" $=>$
21  foo_4(ColumnInt32, Int32 | name=i, Int32 | name=j) -> ColumnInt32 | kPreFlightParameter="i * j"
22 
23  UDTF: foo_5(Column<int32>, int i, int j) -> Column<int32> | output_row_size=5 $=>$
24  foo_5(ColumnInt32, Int32 | name=i, Int32 | name=j) -> ColumnInt32 | kPreFlightParameter=5
25 
26  UDTF: foo_6(Column<int32>, int i, int j) -> Column<int32> | output_row_size=i $=>$
27  foo_6(ColumnInt32, Int32 | name=i, Int32 | name=j) -> ColumnInt32 | kPreFlightParameter=i
28 
29  UDTF: foo_7(Cursor<Column<int32>>) -> Column<int32> $=>$
30  foo_7(Cursor<ColumnInt32> | fields=[field0]) -> ColumnInt32
31 
32  UDTF: foo_8(Cursor<Column<int32>, Column<float>>) -> Column<int32> $=>$
33  foo_8(Cursor<ColumnInt32, ColumnFloat> | fields=[field0,field1]) -> ColumnInt32
34  UDTF: foo_9(Cursor<Column<int32>>, Cursor<Column<float>>) -> Column<int32> $=>$
35  foo_9(Cursor<ColumnInt32> | fields=[field0], Cursor<ColumnFloat> | fields=[field0]) -> ColumnInt32
36 
37  UDTF: foo_10(Column<int32>) -> Column<int32>, Column<float> $=>$
38  foo_10(ColumnInt32) -> ColumnInt32, ColumnFloat
39  UDTF: foo_11(Column<int32>|name=a) -> Column<int32>|name=out $=>$
40  foo_11(ColumnInt32 | name=a) -> ColumnInt32 | name=out
41  UDTF: foo_12(Column<int32>a) -> Column<int32>out $=>$
42  foo_12(ColumnInt32 | name=a) -> ColumnInt32 | name=out
43 
44  UDTF: foo_13(Column<TextEncodingDict>) -> Column<TextEncodingDict> $=>$
45  foo_13(ColumnTextEncodingDict) -> ColumnTextEncodingDict | input_id=args<0>
46  UDTF: foo_14(ColumnList<TextEncodingDict>) -> Column<TextEncodingDict> $=>$
47  foo_14(ColumnListTextEncodingDict) -> ColumnTextEncodingDict | input_id=args<0, 0>
48  UDTF: foo_15(ColumnList<TextEncodingDict>, Column<int>, Column<TextEncodingDict>) -> Column<TextEncodingDict> | input_id=args<2> $=>$
49  foo_15(ColumnListTextEncodingDict, ColumnInt32, ColumnTextEncodingDict) -> ColumnTextEncodingDict | input_id=args<2>
50  UDTF: foo_16(Column<int>, Column<TextEncodingDict>) -> Column<TextEncodingDict> | input_id=args<1> $=>$
51  foo_16(ColumnInt32, ColumnTextEncodingDict) -> ColumnTextEncodingDict | input_id=args<1>
52  UDTF: foo_17(Column<int>, ColumnList<TextEncodingDict>) -> Column<TextEncodingDict> $=>$
53  foo_17(ColumnInt32, ColumnListTextEncodingDict) -> ColumnTextEncodingDict | input_id=args<1, 0>
54  UDTF: foo_18(Column<TextEncodingDict> | name = a) -> Column<TextEncodingDict> | name=out | input_id=args<0> $=>$
55  foo_18(ColumnTextEncodingDict | name=a) -> ColumnTextEncodingDict | name=out | input_id=args<0>
56  UDTF: foo_19(Column<TextEncodingDict> a) -> Column<TextEncodingDict> out | input_id=args<0> $=>$
57  foo_19(ColumnTextEncodingDict | name=a) -> ColumnTextEncodingDict | name=out | input_id=args<0>
58 
59  UDTF: foo_20__cpu_template(Column<int32_t>) -> Column<int32_t> $=>$
60  foo_20__cpu_template(ColumnInt32) -> ColumnInt32
61 
62  UDTF: foo_21__cpu(Column<T>, T, Cursor<ColumnList<U>>) -> Column<T>, T=[int32], U=[float] $=>$
63  foo_21__cpu(ColumnInt32, Int32, Cursor<ColumnListFloat> | fields=[field0]) -> ColumnInt32
64  UDTF: foo_22__cpu(Column<T> in1, T in2, Cursor<ColumnList<U>> in3) -> Column<T> out1, Column<U> out2, T=[int32], U=[float] $=>$
65  foo_22__cpu(ColumnInt32 | name=in1, Int32 | name=in2, Cursor<ColumnListFloat> | name=in3 | fields=[field0]) -> ColumnInt32 | name=out1, ColumnFloat | name=out2
66 
67  UDTF: foo_23__cpu_template(Column<T>) -> Column<U>, T=[int32, int64], U=[float, double] $=>$
68  foo_23__cpu_template(ColumnInt32) -> ColumnFloat $=>$
69  foo_23__cpu_template(ColumnInt64) -> ColumnFloat $=>$
70  foo_23__cpu_template(ColumnInt32) -> ColumnDouble $=>$
71  foo_23__cpu_template(ColumnInt64) -> ColumnDouble
72 
73  UDTF: foo_24__cpu(TableFunctionManager, int64_t) -> Column<int64_t> $=>$
74  foo_24__cpu(TableFunctionManager, Int64) -> ColumnInt64
75 
76  UDTF: foo_25__cpu(TableFunctionManager, Cursor<Column<int64_t> x, Column<int64_t> y> z) -> Column<int64_t> $=>$
77  foo_25__cpu(TableFunctionManager, Cursor<ColumnInt64 | name=x, ColumnInt64 | name=y> | name=z | fields=[x,y]) -> ColumnInt64
78 
79  UDTF: foo_26__cpu(TableFunctionManager) | filter_table_function_transpose=on -> Column<int64_t> $=>$
80  foo_26__cpu(TableFunctionManager) | filter_table_function_transpose=1 -> ColumnInt64
81  UDTF: foo_27__cpu(TableFunctionManager) | filter_table_function_transpose=off -> Column<int64_t> $=>$
82  foo_27__cpu(TableFunctionManager) | filter_table_function_transpose=0 -> ColumnInt64
83  UDTF: foo_28__cpu(TableFunctionManager) | bar=off -> Column<int64_t> $=>$
84  TransformerException: unknown function annotation: `bar`
85  UDTF: foo_29__cpu(TableFunctionManager | bar=off) -> Column<int64_t> $=>$
86  TransformerException: unknown input annotation: `bar`
87  UDTF: foo_30__cpu(TableFunctionManager) -> Column<int64_t> | bar=off $=>$
88  TransformerException: unknown output annotation: `bar`
89 
90  UDTF: foo_31__cpu(TableFunctionManager, Cursor<int32_t x> | fields=[x1]) -> Column<int64_t>!
91  foo_31__cpu(TableFunctionManager, Cursor<Int32 | name=x> | fields=[x1]) -> ColumnInt64
92 
93  UDTF: foo_32_int_require(Column<int> | name=col, int32_t | require="sqrt(arg1) > col.size()" | name=arg1) -> int32_t $=>$
94  foo_32_int_require(ColumnInt32 | name=col, Int32 | require="sqrt(arg1) > col.size()" | name=arg1) -> Int32
95  UDTF: foo_33_int_require_mgr(TableFunctionManager, Column<int> | name=col, int32_t | require="sqrt(arg1) > col.size()" | name=arg1) -> int32_t $=>$
96  foo_33_int_require_mgr(TableFunctionManager, ColumnInt32 | name=col, Int32 | require="sqrt(arg1) > col.size()" | name=arg1) -> Int32
97  UDTF: foo_34_int_require(Column<int> col, int x | require="x > 0" | require="x < 5") -> int $=>$
98  foo_34_int_require(ColumnInt32 | name=col, Int32 | name=x | require="x > 0" | require="x < 5") -> Int32
99  UDTF: foo_35_str_require(TextEncodingNone s | require="s == \"str\"") -> int32_t $=>$
100  foo_35_str_require(TextEncodingNone | name=s | require="s == \"str\"") -> Int32
101  UDTF: foo_36_str_require(TextEncodingNone s | require="s != \"str\"") -> int32_t $=>$
102  foo_36_str_require(TextEncodingNone | name=s | require="s != \"str\"") -> Int32
103 
104 
105  UDTF: foo_37(TableFunctionManager, TextEncodingNone agg_type | require="agg_type == \"MAX\"",
106  Cursor<Column<K> x, Column<T> y>) -> Column<int>, K=[int], T=[float] $=>$
107  foo_37(TableFunctionManager, TextEncodingNone | name=agg_type | require="agg_type == \"MAX\"", Cursor<ColumnInt32 | name=x, ColumnFloat | name=y> | fields=[x,y]) -> ColumnInt32
108 
109  UDTF: foo_38(TableFunctionManager,
110  Cursor<Column<int32_t> a, ColumnList<float> b>,
111  int32_t x,
112  int32_t y | require="x > 0" | require="y > 0") ->
113  Column<int32_t>, Column<int32_t> $=>$
114  foo_38(TableFunctionManager, Cursor<ColumnInt32 | name=a, ColumnListFloat | name=b> | fields=[a,b], Int32 | name=x, Int32 | name=y | require="x > 0" | require="y > 0") -> ColumnInt32, ColumnInt32
115 
116  UDTF: foo_39(TableFunctionManager) -> Column<TextEncodingDict> new_dict | input_id=args<> $=>$
117  foo_39(TableFunctionManager) -> ColumnTextEncodingDict | name=new_dict | input_id=args<-1>
118 
119  UDTF: foo_40(int32_t y | range=[1, 10]) -> Column<int32_t> $=>$
120  foo_40(Int32 | name=y | range=[1,10] | require="1 <= y && y <= 10") -> ColumnInt32
121 
122  UDTF: foo_41(int32_t x | range=[1]) -> Column<int32_t> $=>$
123  TransformerException: "range" requires an interval. Got [1]
124 
125  UDTF: foo_42(int32_t x | range=[1, 10], RowMultiplier) -> Column<int32_t> $=>$
126  foo_42(Int32 | name=x | range=[1,10] | require="1 <= x && x <= 10", kUserSpecifiedRowMultiplier<2>) -> ColumnInt32
127 
128  UDTF: foo_43(int32_t x | default=10, TextEncodingNone str | default="Blah", double d | default=10.0, bool b | default=true) -> Column<int32_t> $=>$
129  foo_43(Int32 | name=x | default=10, TextEncodingNone | name=str | default="Blah", Double | name=d | default=10.0, Bool | name=b | default=True) -> ColumnInt32
130 
131  UDTF: foo_44(Column<int32_t> x | default=10) -> Column<int32_t> $=>$
132  TransformerException: Error in function "foo_44", input annotation 'default=10'. "default" annotation is only supported for scalar types!
133 
134  UDTF: foo_45_template(T x | default=10) -> Column<T>, T=[int32_t, int64_t] $=>$
135  foo_45_template(Int32 | name=x | default=10) -> ColumnInt32 $=>$
136  foo_45_template(Int64 | name=x | default=10) -> ColumnInt64
137 
138  UDTF: foo_46(int32_t x | default=true) -> Column<int32_t> $=>$
139  TransformerException: Error in function "foo_46", input annotation 'default=True'. Argument is of type "int32_t" but value type was inferred as "bool".
140 
141  UDTF: foo_47_template(T x | default = 10) -> Column<T>, T=[int32_t, TextEncodingNone] $=>$
142  TransformerException: Error in function "foo_47_template", input annotation 'default=10'. Argument is of type "TextEncodingNone" but value type was inferred as "int".
143 
144  UDTF: foo_48_template(T x | default = -10) -> Column<T>, T=[int32_t] $=>$
145  foo_48_template(Int32 | name=x | default=-10) -> ColumnInt32
146 
147  UDTF: foo_49(double d | default=-10.0) -> Column<double> $=>$
148  foo_49(Double | name=d | default=-10.0) -> ColumnDouble
149 
150  UDTF: foo_50(int32_t x | default=-10, double d | default=-10.0) -> Column<double> $=>$
151  foo_50(Int32 | name=x | default=-10, Double | name=d | default=-10.0) -> ColumnDouble
152 
153  UDTF: foo_51(ColumnList<T>, ColumnList<U>) -> Column<T>, T=[int64_t], U=[float, int64_t] $=>$
154  TransformerWarning: foo_51 signature is ambiguous as there are two ColumnList with the same subtype in the same group.
155 
156  UDTF: foo_52(ColumnList<T>, Column<T>, ColumnList<T>) -> Column<T>, T=[int64_t] $=>$
157  TransformerWarning: foo_52 signature is ambiguous as there are two ColumnList with the same subtype in the same group.
158 
159  UDTF: foo_53(ColumnList<T>, ColumnList<U>) -> Column<T>, T=[int64_t], U=[int32_t] $=>$
160  foo_53(ColumnListInt64, ColumnListInt32) -> ColumnInt64
161 
162  UDTF: foo_54(Cursor<ColumnList<T>, Column<T>>, Cursor<ColumnList<T>>) -> Column<T>, T=[int64_t] $=>$
163  foo_54(Cursor<ColumnListInt64, ColumnInt64> | fields=[field0,field1], Cursor<ColumnListInt64> | fields=[field0]) -> ColumnInt64
164 
165  UDTF: foo_55(Cursor<Column<int> x | require="x.size() > 2">) -> Column<int> $=>$
166  foo_55(Cursor<ColumnInt32 | name=x | require="x.size() > 2"> | fields=[x] | require="x.size() > 2") -> ColumnInt32
167 
168  */
169 // clang-format on