duckdb 0.8.2-dev4871.0 → 0.8.2-dev5002.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/duckdb/src/common/operator/cast_operators.cpp +18 -0
- package/src/duckdb/src/common/row_operations/row_matcher.cpp +5 -38
- package/src/duckdb/src/common/types/data_chunk.cpp +48 -11
- package/src/duckdb/src/common/types/vector.cpp +0 -1
- package/src/duckdb/src/common/types.cpp +1 -1
- package/src/duckdb/src/core_functions/scalar/list/array_slice.cpp +5 -1
- package/src/duckdb/src/core_functions/scalar/list/list_sort.cpp +10 -1
- package/src/duckdb/src/core_functions/scalar/map/map_concat.cpp +0 -2
- package/src/duckdb/src/execution/nested_loop_join/nested_loop_join_inner.cpp +20 -27
- package/src/duckdb/src/execution/nested_loop_join/nested_loop_join_mark.cpp +21 -9
- package/src/duckdb/src/execution/operator/aggregate/physical_hash_aggregate.cpp +7 -7
- package/src/duckdb/src/execution/operator/csv_scanner/csv_reader_options.cpp +1 -1
- package/src/duckdb/src/function/cast/time_casts.cpp +12 -0
- package/src/duckdb/src/function/pragma/pragma_queries.cpp +3 -0
- package/src/duckdb/src/function/table/version/pragma_version.cpp +2 -2
- package/src/duckdb/src/include/duckdb/common/multi_file_reader.hpp +5 -0
- package/src/duckdb/src/include/duckdb/common/operator/cast_operators.hpp +27 -0
- package/src/duckdb/src/include/duckdb/common/operator/comparison_operators.hpp +38 -2
- package/src/duckdb/src/include/duckdb/core_functions/scalar/bit_functions.hpp +4 -4
- package/src/duckdb/src/include/duckdb/core_functions/scalar/blob_functions.hpp +4 -4
- package/src/duckdb/src/include/duckdb/core_functions/scalar/date_functions.hpp +5 -5
- package/src/duckdb/src/include/duckdb/core_functions/scalar/enum_functions.hpp +7 -7
- package/src/duckdb/src/include/duckdb/core_functions/scalar/generic_functions.hpp +12 -12
- package/src/duckdb/src/include/duckdb/core_functions/scalar/list_functions.hpp +12 -12
- package/src/duckdb/src/include/duckdb/core_functions/scalar/map_functions.hpp +3 -3
- package/src/duckdb/src/include/duckdb/core_functions/scalar/math_functions.hpp +33 -33
- package/src/duckdb/src/include/duckdb/core_functions/scalar/operators_functions.hpp +2 -2
- package/src/duckdb/src/include/duckdb/core_functions/scalar/random_functions.hpp +3 -3
- package/src/duckdb/src/include/duckdb/core_functions/scalar/string_functions.hpp +12 -12
- package/src/duckdb/src/include/duckdb/core_functions/scalar/struct_functions.hpp +2 -2
- package/src/duckdb/src/include/duckdb/core_functions/scalar/union_functions.hpp +2 -2
- package/src/duckdb/src/include/duckdb/planner/expression_binder/base_select_binder.hpp +1 -0
- package/src/duckdb/src/include/duckdb/planner/operator/logical_create_table.hpp +1 -2
- package/src/duckdb/src/include/duckdb/planner/operator/logical_delete.hpp +1 -1
- package/src/duckdb/src/include/duckdb/planner/operator/logical_insert.hpp +1 -1
- package/src/duckdb/src/include/duckdb/planner/operator/logical_update.hpp +1 -1
- package/src/duckdb/src/include/duckdb/storage/data_table.hpp +1 -1
- package/src/duckdb/src/include/duckdb/storage/table/row_group_collection.hpp +1 -1
- package/src/duckdb/src/planner/binder/query_node/bind_select_node.cpp +28 -6
- package/src/duckdb/src/planner/binder/statement/bind_drop.cpp +3 -0
- package/src/duckdb/src/planner/expression_binder/base_select_binder.cpp +14 -6
- package/src/duckdb/src/planner/operator/logical_create_table.cpp +3 -3
- package/src/duckdb/src/planner/operator/logical_delete.cpp +3 -2
- package/src/duckdb/src/planner/operator/logical_insert.cpp +3 -2
- package/src/duckdb/src/planner/operator/logical_update.cpp +3 -2
- package/src/duckdb/src/storage/data_table.cpp +8 -8
- package/src/duckdb/src/storage/local_storage.cpp +2 -3
- package/src/duckdb/src/storage/serialization/serialize_logical_operator.cpp +64 -80
- package/src/duckdb/src/storage/storage_manager.cpp +6 -2
- package/src/duckdb/src/storage/table/row_group.cpp +6 -0
- package/src/duckdb/src/storage/table/row_group_collection.cpp +4 -3
- package/src/duckdb/src/storage/table/struct_column_data.cpp +2 -0
- package/src/duckdb/src/transaction/duck_transaction.cpp +1 -0
@@ -8,11 +8,11 @@
|
|
8
8
|
|
9
9
|
#pragma once
|
10
10
|
|
11
|
-
#include "duckdb/common/
|
11
|
+
#include "duckdb/common/helper.hpp"
|
12
12
|
#include "duckdb/common/types.hpp"
|
13
13
|
#include "duckdb/common/types/hugeint.hpp"
|
14
14
|
#include "duckdb/common/types/interval.hpp"
|
15
|
-
#include "duckdb/common/
|
15
|
+
#include "duckdb/common/types/string_type.hpp"
|
16
16
|
|
17
17
|
#include <cstring>
|
18
18
|
|
@@ -142,6 +142,42 @@ struct DistinctLessThanEquals {
|
|
142
142
|
}
|
143
143
|
};
|
144
144
|
|
145
|
+
//===--------------------------------------------------------------------===//
|
146
|
+
// Comparison Operator Wrappers (so (Not)DistinctFrom have the same API)
|
147
|
+
//===--------------------------------------------------------------------===//
|
148
|
+
template <class OP>
|
149
|
+
struct ComparisonOperationWrapper {
|
150
|
+
static constexpr const bool COMPARE_NULL = false;
|
151
|
+
|
152
|
+
template <class T>
|
153
|
+
static inline bool Operation(const T &left, const T &right, bool left_null, bool right_null) {
|
154
|
+
if (right_null || left_null) {
|
155
|
+
return false;
|
156
|
+
}
|
157
|
+
return OP::template Operation<T>(left, right);
|
158
|
+
}
|
159
|
+
};
|
160
|
+
|
161
|
+
template <>
|
162
|
+
struct ComparisonOperationWrapper<DistinctFrom> {
|
163
|
+
static constexpr const bool COMPARE_NULL = true;
|
164
|
+
|
165
|
+
template <class T>
|
166
|
+
static inline bool Operation(const T &left, const T &right, bool left_null, bool right_null) {
|
167
|
+
return DistinctFrom::template Operation<T>(left, right, left_null, right_null);
|
168
|
+
}
|
169
|
+
};
|
170
|
+
|
171
|
+
template <>
|
172
|
+
struct ComparisonOperationWrapper<NotDistinctFrom> {
|
173
|
+
static constexpr const bool COMPARE_NULL = true;
|
174
|
+
|
175
|
+
template <class T>
|
176
|
+
static inline bool Operation(const T &left, const T &right, bool left_null, bool right_null) {
|
177
|
+
return NotDistinctFrom::template Operation<T>(left, right, left_null, right_null);
|
178
|
+
}
|
179
|
+
};
|
180
|
+
|
145
181
|
//===--------------------------------------------------------------------===//
|
146
182
|
// Specialized Boolean Comparison Operators
|
147
183
|
//===--------------------------------------------------------------------===//
|
@@ -18,7 +18,7 @@ namespace duckdb {
|
|
18
18
|
struct GetBitFun {
|
19
19
|
static constexpr const char *Name = "get_bit";
|
20
20
|
static constexpr const char *Parameters = "bitstring,index";
|
21
|
-
static constexpr const char *Description = "Extracts the nth bit from bitstring; the first (leftmost) bit is indexed 0
|
21
|
+
static constexpr const char *Description = "Extracts the nth bit from bitstring; the first (leftmost) bit is indexed 0";
|
22
22
|
static constexpr const char *Example = "get_bit('0110010'::BIT, 2)";
|
23
23
|
|
24
24
|
static ScalarFunction GetFunction();
|
@@ -27,7 +27,7 @@ struct GetBitFun {
|
|
27
27
|
struct SetBitFun {
|
28
28
|
static constexpr const char *Name = "set_bit";
|
29
29
|
static constexpr const char *Parameters = "bitstring,index,new_value";
|
30
|
-
static constexpr const char *Description = "Sets the nth bit in bitstring to newvalue; the first (leftmost) bit is indexed 0. Returns a new bitstring
|
30
|
+
static constexpr const char *Description = "Sets the nth bit in bitstring to newvalue; the first (leftmost) bit is indexed 0. Returns a new bitstring";
|
31
31
|
static constexpr const char *Example = "set_bit('0110010'::BIT, 2, 0)";
|
32
32
|
|
33
33
|
static ScalarFunction GetFunction();
|
@@ -36,7 +36,7 @@ struct SetBitFun {
|
|
36
36
|
struct BitPositionFun {
|
37
37
|
static constexpr const char *Name = "bit_position";
|
38
38
|
static constexpr const char *Parameters = "substring,bitstring";
|
39
|
-
static constexpr const char *Description = "Returns first starting index of the specified substring within bits, or zero if it
|
39
|
+
static constexpr const char *Description = "Returns first starting index of the specified substring within bits, or zero if it is not present. The first (leftmost) bit is indexed 1";
|
40
40
|
static constexpr const char *Example = "bit_position('010'::BIT, '1110101'::BIT)";
|
41
41
|
|
42
42
|
static ScalarFunction GetFunction();
|
@@ -45,7 +45,7 @@ struct BitPositionFun {
|
|
45
45
|
struct BitStringFun {
|
46
46
|
static constexpr const char *Name = "bitstring";
|
47
47
|
static constexpr const char *Parameters = "bitstring,length";
|
48
|
-
static constexpr const char *Description = "Pads the bitstring until the specified length
|
48
|
+
static constexpr const char *Description = "Pads the bitstring until the specified length";
|
49
49
|
static constexpr const char *Example = "bitstring('1010'::BIT, 7)";
|
50
50
|
|
51
51
|
static ScalarFunction GetFunction();
|
@@ -18,7 +18,7 @@ namespace duckdb {
|
|
18
18
|
struct DecodeFun {
|
19
19
|
static constexpr const char *Name = "decode";
|
20
20
|
static constexpr const char *Parameters = "blob";
|
21
|
-
static constexpr const char *Description = "Convert blob to varchar. Fails if blob is not valid utf-8
|
21
|
+
static constexpr const char *Description = "Convert blob to varchar. Fails if blob is not valid utf-8";
|
22
22
|
static constexpr const char *Example = "decode('\\xC3\\xBC'::BLOB)";
|
23
23
|
|
24
24
|
static ScalarFunction GetFunction();
|
@@ -27,7 +27,7 @@ struct DecodeFun {
|
|
27
27
|
struct EncodeFun {
|
28
28
|
static constexpr const char *Name = "encode";
|
29
29
|
static constexpr const char *Parameters = "string";
|
30
|
-
static constexpr const char *Description = "Convert varchar to blob. Converts utf-8 characters into literal encoding
|
30
|
+
static constexpr const char *Description = "Convert varchar to blob. Converts utf-8 characters into literal encoding";
|
31
31
|
static constexpr const char *Example = "encode('my_string_with_ü')";
|
32
32
|
|
33
33
|
static ScalarFunction GetFunction();
|
@@ -36,7 +36,7 @@ struct EncodeFun {
|
|
36
36
|
struct FromBase64Fun {
|
37
37
|
static constexpr const char *Name = "from_base64";
|
38
38
|
static constexpr const char *Parameters = "string";
|
39
|
-
static constexpr const char *Description = "Convert a base64 encoded string to a character string
|
39
|
+
static constexpr const char *Description = "Convert a base64 encoded string to a character string";
|
40
40
|
static constexpr const char *Example = "from_base64('QQ==')";
|
41
41
|
|
42
42
|
static ScalarFunction GetFunction();
|
@@ -45,7 +45,7 @@ struct FromBase64Fun {
|
|
45
45
|
struct ToBase64Fun {
|
46
46
|
static constexpr const char *Name = "to_base64";
|
47
47
|
static constexpr const char *Parameters = "blob";
|
48
|
-
static constexpr const char *Description = "Convert a blob to a base64 encoded string
|
48
|
+
static constexpr const char *Description = "Convert a blob to a base64 encoded string";
|
49
49
|
static constexpr const char *Example = "base64('A'::blob)";
|
50
50
|
|
51
51
|
static ScalarFunction GetFunction();
|
@@ -120,7 +120,7 @@ struct DayFun {
|
|
120
120
|
struct DayNameFun {
|
121
121
|
static constexpr const char *Name = "dayname";
|
122
122
|
static constexpr const char *Parameters = "ts";
|
123
|
-
static constexpr const char *Description = "The (English) name of the weekday
|
123
|
+
static constexpr const char *Description = "The (English) name of the weekday";
|
124
124
|
static constexpr const char *Example = "dayname(TIMESTAMP '1992-03-22')";
|
125
125
|
|
126
126
|
static ScalarFunctionSet GetFunctions();
|
@@ -357,7 +357,7 @@ struct MonthFun {
|
|
357
357
|
struct MonthNameFun {
|
358
358
|
static constexpr const char *Name = "monthname";
|
359
359
|
static constexpr const char *Parameters = "ts";
|
360
|
-
static constexpr const char *Description = "The (English) name of the month
|
360
|
+
static constexpr const char *Description = "The (English) name of the month";
|
361
361
|
static constexpr const char *Example = "monthname(TIMESTAMP '1992-09-20')";
|
362
362
|
|
363
363
|
static ScalarFunctionSet GetFunctions();
|
@@ -393,7 +393,7 @@ struct StrfTimeFun {
|
|
393
393
|
struct StrpTimeFun {
|
394
394
|
static constexpr const char *Name = "strptime";
|
395
395
|
static constexpr const char *Parameters = "text,format";
|
396
|
-
static constexpr const char *Description = "Converts string to timestamp with time zone according to the format string if %Z is specified
|
396
|
+
static constexpr const char *Description = "Converts string to timestamp with time zone according to the format string if %Z is specified";
|
397
397
|
static constexpr const char *Example = "strptime('Wed, 1 January 1992 - 08:38:40 PST', '%a, %-d %B %Y - %H:%M:%S %Z')";
|
398
398
|
|
399
399
|
static ScalarFunctionSet GetFunctions();
|
@@ -402,7 +402,7 @@ struct StrpTimeFun {
|
|
402
402
|
struct TimeBucketFun {
|
403
403
|
static constexpr const char *Name = "time_bucket";
|
404
404
|
static constexpr const char *Parameters = "bucket_width,timestamp,origin";
|
405
|
-
static constexpr const char *Description = "Truncate
|
405
|
+
static constexpr const char *Description = "Truncate TIMESTAMPTZ by the specified interval bucket_width. Buckets are aligned relative to origin TIMESTAMPTZ. The origin defaults to 2000-01-03 00:00:00+00 for buckets that do not include a month or year interval, and to 2000-01-01 00:00:00+00 for month and year buckets";
|
406
406
|
static constexpr const char *Example = "time_bucket(INTERVAL '2 weeks', TIMESTAMP '1992-04-20 15:26:00-07', TIMESTAMP '1992-04-01 00:00:00-07')";
|
407
407
|
|
408
408
|
static ScalarFunctionSet GetFunctions();
|
@@ -519,7 +519,7 @@ struct ToYearsFun {
|
|
519
519
|
struct TryStrpTimeFun {
|
520
520
|
static constexpr const char *Name = "try_strptime";
|
521
521
|
static constexpr const char *Parameters = "text,format";
|
522
|
-
static constexpr const char *Description = "Converts string to timestamp using the format string (timestamp with time zone if %Z is specified). Returns NULL on failure
|
522
|
+
static constexpr const char *Description = "Converts string to timestamp using the format string (timestamp with time zone if %Z is specified). Returns NULL on failure";
|
523
523
|
static constexpr const char *Example = "try_strptime('Wed, 1 January 1992 - 08:38:40 PM', '%a, %-d %B %Y - %I:%M:%S %p')";
|
524
524
|
|
525
525
|
static ScalarFunctionSet GetFunctions();
|
@@ -18,8 +18,8 @@ namespace duckdb {
|
|
18
18
|
struct EnumFirstFun {
|
19
19
|
static constexpr const char *Name = "enum_first";
|
20
20
|
static constexpr const char *Parameters = "enum";
|
21
|
-
static constexpr const char *Description = "Returns the first value of the input enum type
|
22
|
-
static constexpr const char *Example = "enum_first(
|
21
|
+
static constexpr const char *Description = "Returns the first value of the input enum type";
|
22
|
+
static constexpr const char *Example = "enum_first(NULL::mood)";
|
23
23
|
|
24
24
|
static ScalarFunction GetFunction();
|
25
25
|
};
|
@@ -27,8 +27,8 @@ struct EnumFirstFun {
|
|
27
27
|
struct EnumLastFun {
|
28
28
|
static constexpr const char *Name = "enum_last";
|
29
29
|
static constexpr const char *Parameters = "enum";
|
30
|
-
static constexpr const char *Description = "Returns the last value of the input enum type
|
31
|
-
static constexpr const char *Example = "enum_last(
|
30
|
+
static constexpr const char *Description = "Returns the last value of the input enum type";
|
31
|
+
static constexpr const char *Example = "enum_last(NULL::mood)";
|
32
32
|
|
33
33
|
static ScalarFunction GetFunction();
|
34
34
|
};
|
@@ -45,8 +45,8 @@ struct EnumCodeFun {
|
|
45
45
|
struct EnumRangeFun {
|
46
46
|
static constexpr const char *Name = "enum_range";
|
47
47
|
static constexpr const char *Parameters = "enum";
|
48
|
-
static constexpr const char *Description = "Returns all values of the input enum type as an array
|
49
|
-
static constexpr const char *Example = "enum_range(
|
48
|
+
static constexpr const char *Description = "Returns all values of the input enum type as an array";
|
49
|
+
static constexpr const char *Example = "enum_range(NULL::mood)";
|
50
50
|
|
51
51
|
static ScalarFunction GetFunction();
|
52
52
|
};
|
@@ -54,7 +54,7 @@ struct EnumRangeFun {
|
|
54
54
|
struct EnumRangeBoundaryFun {
|
55
55
|
static constexpr const char *Name = "enum_range_boundary";
|
56
56
|
static constexpr const char *Parameters = "start,end";
|
57
|
-
static constexpr const char *Description = "Returns the range between the two given enum values as an array. The values must be of the same enum type. When the first parameter is NULL, the result starts with the first value of the enum type. When the second parameter is NULL, the result ends with the last value of the enum type
|
57
|
+
static constexpr const char *Description = "Returns the range between the two given enum values as an array. The values must be of the same enum type. When the first parameter is NULL, the result starts with the first value of the enum type. When the second parameter is NULL, the result ends with the last value of the enum type";
|
58
58
|
static constexpr const char *Example = "enum_range_boundary(NULL, 'happy'::mood)";
|
59
59
|
|
60
60
|
static ScalarFunction GetFunction();
|
@@ -27,7 +27,7 @@ struct AliasFun {
|
|
27
27
|
struct CurrentSettingFun {
|
28
28
|
static constexpr const char *Name = "current_setting";
|
29
29
|
static constexpr const char *Parameters = "setting_name";
|
30
|
-
static constexpr const char *Description = "
|
30
|
+
static constexpr const char *Description = "Returns the current value of the configuration setting";
|
31
31
|
static constexpr const char *Example = "current_setting('access_mode')";
|
32
32
|
|
33
33
|
static ScalarFunction GetFunction();
|
@@ -45,7 +45,7 @@ struct ErrorFun {
|
|
45
45
|
struct HashFun {
|
46
46
|
static constexpr const char *Name = "hash";
|
47
47
|
static constexpr const char *Parameters = "param";
|
48
|
-
static constexpr const char *Description = "Returns an integer with the hash of the value. Note that this is not a cryptographic hash
|
48
|
+
static constexpr const char *Description = "Returns an integer with the hash of the value. Note that this is not a cryptographic hash";
|
49
49
|
static constexpr const char *Example = "hash('🦆')";
|
50
50
|
|
51
51
|
static ScalarFunction GetFunction();
|
@@ -54,7 +54,7 @@ struct HashFun {
|
|
54
54
|
struct LeastFun {
|
55
55
|
static constexpr const char *Name = "least";
|
56
56
|
static constexpr const char *Parameters = "arg1, arg2, ...";
|
57
|
-
static constexpr const char *Description = "Returns the lowest value of the set of input parameters
|
57
|
+
static constexpr const char *Description = "Returns the lowest value of the set of input parameters";
|
58
58
|
static constexpr const char *Example = "least(42, 84)";
|
59
59
|
|
60
60
|
static ScalarFunctionSet GetFunctions();
|
@@ -63,7 +63,7 @@ struct LeastFun {
|
|
63
63
|
struct GreatestFun {
|
64
64
|
static constexpr const char *Name = "greatest";
|
65
65
|
static constexpr const char *Parameters = "arg1, arg2, ...";
|
66
|
-
static constexpr const char *Description = "Returns the highest value of the set of input parameters
|
66
|
+
static constexpr const char *Description = "Returns the highest value of the set of input parameters";
|
67
67
|
static constexpr const char *Example = "greatest(42, 84)";
|
68
68
|
|
69
69
|
static ScalarFunctionSet GetFunctions();
|
@@ -72,7 +72,7 @@ struct GreatestFun {
|
|
72
72
|
struct StatsFun {
|
73
73
|
static constexpr const char *Name = "stats";
|
74
74
|
static constexpr const char *Parameters = "expression";
|
75
|
-
static constexpr const char *Description = "Returns a string with statistics about the expression. Expression can be a column, constant, or SQL expression
|
75
|
+
static constexpr const char *Description = "Returns a string with statistics about the expression. Expression can be a column, constant, or SQL expression";
|
76
76
|
static constexpr const char *Example = "stats(5)";
|
77
77
|
|
78
78
|
static ScalarFunction GetFunction();
|
@@ -81,7 +81,7 @@ struct StatsFun {
|
|
81
81
|
struct TypeOfFun {
|
82
82
|
static constexpr const char *Name = "typeof";
|
83
83
|
static constexpr const char *Parameters = "expression";
|
84
|
-
static constexpr const char *Description = "Returns the name of the data type of the result of the expression
|
84
|
+
static constexpr const char *Description = "Returns the name of the data type of the result of the expression";
|
85
85
|
static constexpr const char *Example = "typeof('abc')";
|
86
86
|
|
87
87
|
static ScalarFunction GetFunction();
|
@@ -99,7 +99,7 @@ struct CurrentQueryFun {
|
|
99
99
|
struct CurrentSchemaFun {
|
100
100
|
static constexpr const char *Name = "current_schema";
|
101
101
|
static constexpr const char *Parameters = "";
|
102
|
-
static constexpr const char *Description = "
|
102
|
+
static constexpr const char *Description = "Returns the name of the currently active schema. Default is main";
|
103
103
|
static constexpr const char *Example = "current_schema()";
|
104
104
|
|
105
105
|
static ScalarFunction GetFunction();
|
@@ -108,7 +108,7 @@ struct CurrentSchemaFun {
|
|
108
108
|
struct CurrentSchemasFun {
|
109
109
|
static constexpr const char *Name = "current_schemas";
|
110
110
|
static constexpr const char *Parameters = "include_implicit";
|
111
|
-
static constexpr const char *Description = "
|
111
|
+
static constexpr const char *Description = "Returns list of schemas. Pass a parameter of True to include implicit schemas";
|
112
112
|
static constexpr const char *Example = "current_schemas(true)";
|
113
113
|
|
114
114
|
static ScalarFunction GetFunction();
|
@@ -117,7 +117,7 @@ struct CurrentSchemasFun {
|
|
117
117
|
struct CurrentDatabaseFun {
|
118
118
|
static constexpr const char *Name = "current_database";
|
119
119
|
static constexpr const char *Parameters = "";
|
120
|
-
static constexpr const char *Description = "
|
120
|
+
static constexpr const char *Description = "Returns the name of the currently active database";
|
121
121
|
static constexpr const char *Example = "current_database()";
|
122
122
|
|
123
123
|
static ScalarFunction GetFunction();
|
@@ -126,7 +126,7 @@ struct CurrentDatabaseFun {
|
|
126
126
|
struct InSearchPathFun {
|
127
127
|
static constexpr const char *Name = "in_search_path";
|
128
128
|
static constexpr const char *Parameters = "database_name,schema_name";
|
129
|
-
static constexpr const char *Description = "Returns whether or not the database/schema are in the search path
|
129
|
+
static constexpr const char *Description = "Returns whether or not the database/schema are in the search path";
|
130
130
|
static constexpr const char *Example = "in_search_path('memory', 'main')";
|
131
131
|
|
132
132
|
static ScalarFunction GetFunction();
|
@@ -135,7 +135,7 @@ struct InSearchPathFun {
|
|
135
135
|
struct CurrentTransactionIdFun {
|
136
136
|
static constexpr const char *Name = "txid_current";
|
137
137
|
static constexpr const char *Parameters = "";
|
138
|
-
static constexpr const char *Description = "Returns the current transaction’s ID (a BIGINT). It will assign a new one if the current transaction does not have one already
|
138
|
+
static constexpr const char *Description = "Returns the current transaction’s ID (a BIGINT). It will assign a new one if the current transaction does not have one already";
|
139
139
|
static constexpr const char *Example = "txid_current()";
|
140
140
|
|
141
141
|
static ScalarFunction GetFunction();
|
@@ -144,7 +144,7 @@ struct CurrentTransactionIdFun {
|
|
144
144
|
struct VersionFun {
|
145
145
|
static constexpr const char *Name = "version";
|
146
146
|
static constexpr const char *Parameters = "";
|
147
|
-
static constexpr const char *Description = "
|
147
|
+
static constexpr const char *Description = "Returns the currently active version of DuckDB in this format: v0.3.2 ";
|
148
148
|
static constexpr const char *Example = "version()";
|
149
149
|
|
150
150
|
static ScalarFunction GetFunction();
|
@@ -27,7 +27,7 @@ struct ListFlattenFun {
|
|
27
27
|
struct ListAggregateFun {
|
28
28
|
static constexpr const char *Name = "list_aggregate";
|
29
29
|
static constexpr const char *Parameters = "list,name";
|
30
|
-
static constexpr const char *Description = "Executes the aggregate function name on the elements of list
|
30
|
+
static constexpr const char *Description = "Executes the aggregate function name on the elements of list";
|
31
31
|
static constexpr const char *Example = "list_aggregate([1, 2, NULL], 'min')";
|
32
32
|
|
33
33
|
static ScalarFunction GetFunction();
|
@@ -60,7 +60,7 @@ struct AggregateFun {
|
|
60
60
|
struct ListDistinctFun {
|
61
61
|
static constexpr const char *Name = "list_distinct";
|
62
62
|
static constexpr const char *Parameters = "list";
|
63
|
-
static constexpr const char *Description = "Removes all duplicates and NULLs from a list. Does not preserve the original order
|
63
|
+
static constexpr const char *Description = "Removes all duplicates and NULLs from a list. Does not preserve the original order";
|
64
64
|
static constexpr const char *Example = "list_distinct([1, 1, NULL, -3, 1, 5])";
|
65
65
|
|
66
66
|
static ScalarFunction GetFunction();
|
@@ -75,7 +75,7 @@ struct ArrayDistinctFun {
|
|
75
75
|
struct ListUniqueFun {
|
76
76
|
static constexpr const char *Name = "list_unique";
|
77
77
|
static constexpr const char *Parameters = "list";
|
78
|
-
static constexpr const char *Description = "Counts the unique elements of a list
|
78
|
+
static constexpr const char *Description = "Counts the unique elements of a list";
|
79
79
|
static constexpr const char *Example = "list_unique([1, 1, NULL, -3, 1, 5])";
|
80
80
|
|
81
81
|
static ScalarFunction GetFunction();
|
@@ -90,7 +90,7 @@ struct ArrayUniqueFun {
|
|
90
90
|
struct ListValueFun {
|
91
91
|
static constexpr const char *Name = "list_value";
|
92
92
|
static constexpr const char *Parameters = "any,...";
|
93
|
-
static constexpr const char *Description = "Create a LIST containing the argument values
|
93
|
+
static constexpr const char *Description = "Create a LIST containing the argument values";
|
94
94
|
static constexpr const char *Example = "list_value(4, 5, 6)";
|
95
95
|
|
96
96
|
static ScalarFunction GetFunction();
|
@@ -105,7 +105,7 @@ struct ListPackFun {
|
|
105
105
|
struct ListSliceFun {
|
106
106
|
static constexpr const char *Name = "list_slice";
|
107
107
|
static constexpr const char *Parameters = "list,begin,end[,step]";
|
108
|
-
static constexpr const char *Description = "Extract a sublist using slice conventions. Negative values are accepted
|
108
|
+
static constexpr const char *Description = "Extract a sublist using slice conventions. Negative values are accepted";
|
109
109
|
static constexpr const char *Example = "list_slice(l, 2, 4)";
|
110
110
|
|
111
111
|
static ScalarFunctionSet GetFunctions();
|
@@ -120,7 +120,7 @@ struct ArraySliceFun {
|
|
120
120
|
struct ListSortFun {
|
121
121
|
static constexpr const char *Name = "list_sort";
|
122
122
|
static constexpr const char *Parameters = "list";
|
123
|
-
static constexpr const char *Description = "Sorts the elements of the list
|
123
|
+
static constexpr const char *Description = "Sorts the elements of the list";
|
124
124
|
static constexpr const char *Example = "list_sort([3, 6, 1, 2])";
|
125
125
|
|
126
126
|
static ScalarFunctionSet GetFunctions();
|
@@ -135,7 +135,7 @@ struct ArraySortFun {
|
|
135
135
|
struct ListReverseSortFun {
|
136
136
|
static constexpr const char *Name = "list_reverse_sort";
|
137
137
|
static constexpr const char *Parameters = "list";
|
138
|
-
static constexpr const char *Description = "Sorts the elements of the list in reverse order
|
138
|
+
static constexpr const char *Description = "Sorts the elements of the list in reverse order";
|
139
139
|
static constexpr const char *Example = "list_reverse_sort([3, 6, 1, 2])";
|
140
140
|
|
141
141
|
static ScalarFunctionSet GetFunctions();
|
@@ -150,7 +150,7 @@ struct ArrayReverseSortFun {
|
|
150
150
|
struct ListTransformFun {
|
151
151
|
static constexpr const char *Name = "list_transform";
|
152
152
|
static constexpr const char *Parameters = "list,lambda";
|
153
|
-
static constexpr const char *Description = "Returns a list that is the result of applying the lambda function to each element of the input list. See the Lambda Functions section for more details
|
153
|
+
static constexpr const char *Description = "Returns a list that is the result of applying the lambda function to each element of the input list. See the Lambda Functions section for more details";
|
154
154
|
static constexpr const char *Example = "list_transform([1, 2, 3], x -> x + 1)";
|
155
155
|
|
156
156
|
static ScalarFunction GetFunction();
|
@@ -183,7 +183,7 @@ struct ApplyFun {
|
|
183
183
|
struct ListFilterFun {
|
184
184
|
static constexpr const char *Name = "list_filter";
|
185
185
|
static constexpr const char *Parameters = "list,lambda";
|
186
|
-
static constexpr const char *Description = "Constructs a list from those elements of the input list for which the lambda function returns true
|
186
|
+
static constexpr const char *Description = "Constructs a list from those elements of the input list for which the lambda function returns true";
|
187
187
|
static constexpr const char *Example = "list_filter([3, 4, 5], x -> x > 4)";
|
188
188
|
|
189
189
|
static ScalarFunction GetFunction();
|
@@ -222,7 +222,7 @@ struct ListRangeFun {
|
|
222
222
|
struct ListCosineSimilarityFun {
|
223
223
|
static constexpr const char *Name = "list_cosine_similarity";
|
224
224
|
static constexpr const char *Parameters = "list1,list2";
|
225
|
-
static constexpr const char *Description = "Compute the cosine similarity between two lists
|
225
|
+
static constexpr const char *Description = "Compute the cosine similarity between two lists";
|
226
226
|
static constexpr const char *Example = "list_cosine_similarity([1, 2, 3], [1, 2, 3])";
|
227
227
|
|
228
228
|
static ScalarFunctionSet GetFunctions();
|
@@ -237,7 +237,7 @@ struct ListCosineSimilarityFunAlias {
|
|
237
237
|
struct ListDistanceFun {
|
238
238
|
static constexpr const char *Name = "list_distance";
|
239
239
|
static constexpr const char *Parameters = "list1,list2";
|
240
|
-
static constexpr const char *Description = "Compute the distance between two lists
|
240
|
+
static constexpr const char *Description = "Compute the distance between two lists";
|
241
241
|
static constexpr const char *Example = "list_distance([1, 2, 3], [1, 2, 3])";
|
242
242
|
|
243
243
|
static ScalarFunctionSet GetFunctions();
|
@@ -252,7 +252,7 @@ struct ListDistanceFunAlias {
|
|
252
252
|
struct ListInnerProductFun {
|
253
253
|
static constexpr const char *Name = "list_inner_product";
|
254
254
|
static constexpr const char *Parameters = "list1,list2";
|
255
|
-
static constexpr const char *Description = "Compute the inner product between two lists
|
255
|
+
static constexpr const char *Description = "Compute the inner product between two lists";
|
256
256
|
static constexpr const char *Example = "list_inner_product([1, 2, 3], [1, 2, 3])";
|
257
257
|
|
258
258
|
static ScalarFunctionSet GetFunctions();
|
@@ -18,7 +18,7 @@ namespace duckdb {
|
|
18
18
|
struct CardinalityFun {
|
19
19
|
static constexpr const char *Name = "cardinality";
|
20
20
|
static constexpr const char *Parameters = "map";
|
21
|
-
static constexpr const char *Description = "
|
21
|
+
static constexpr const char *Description = "Returns the size of the map (or the number of entries in the map)";
|
22
22
|
static constexpr const char *Example = "cardinality( map([4, 2], ['a', 'b']) );";
|
23
23
|
|
24
24
|
static ScalarFunction GetFunction();
|
@@ -27,7 +27,7 @@ struct CardinalityFun {
|
|
27
27
|
struct MapFun {
|
28
28
|
static constexpr const char *Name = "map";
|
29
29
|
static constexpr const char *Parameters = "keys,values";
|
30
|
-
static constexpr const char *Description = "Creates a map from a set of keys and values
|
30
|
+
static constexpr const char *Description = "Creates a map from a set of keys and values";
|
31
31
|
static constexpr const char *Example = "map(['key1', 'key2'], ['val1', 'val2'])";
|
32
32
|
|
33
33
|
static ScalarFunction GetFunction();
|
@@ -45,7 +45,7 @@ struct MapEntriesFun {
|
|
45
45
|
struct MapExtractFun {
|
46
46
|
static constexpr const char *Name = "map_extract";
|
47
47
|
static constexpr const char *Parameters = "map,key";
|
48
|
-
static constexpr const char *Description = "
|
48
|
+
static constexpr const char *Description = "Returns a list containing the value for a given key or an empty list if the key is not contained in the map. The type of the key provided in the second parameter must match the type of the map’s keys else an error is returned";
|
49
49
|
static constexpr const char *Example = "map_extract(map(['key'], ['val']), 'key')";
|
50
50
|
|
51
51
|
static ScalarFunction GetFunction();
|