duckdb 0.7.2-dev2706.0 → 0.7.2-dev2820.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/binding.gyp +21 -13
- package/package.json +1 -1
- package/src/duckdb/extension/icu/icu-strptime.cpp +1 -1
- package/src/duckdb/extension/json/include/json_functions.hpp +35 -37
- package/src/duckdb/extension/json/include/json_scan.hpp +1 -1
- package/src/duckdb/extension/json/include/json_transform.hpp +1 -1
- package/src/duckdb/extension/json/json-extension.cpp +10 -20
- package/src/duckdb/extension/json/json_functions/copy_json.cpp +2 -2
- package/src/duckdb/extension/json/json_functions/json_array_length.cpp +2 -3
- package/src/duckdb/extension/json/json_functions/json_contains.cpp +2 -2
- package/src/duckdb/extension/json/json_functions/json_create.cpp +20 -20
- package/src/duckdb/extension/json/json_functions/json_extract.cpp +4 -6
- package/src/duckdb/extension/json/json_functions/json_keys.cpp +2 -3
- package/src/duckdb/extension/json/json_functions/json_merge_patch.cpp +2 -2
- package/src/duckdb/extension/json/json_functions/json_serialize_sql.cpp +8 -8
- package/src/duckdb/extension/json/json_functions/json_structure.cpp +2 -2
- package/src/duckdb/extension/json/json_functions/json_transform.cpp +4 -4
- package/src/duckdb/extension/json/json_functions/json_type.cpp +2 -3
- package/src/duckdb/extension/json/json_functions/json_valid.cpp +2 -2
- package/src/duckdb/extension/json/json_functions/read_json.cpp +6 -6
- package/src/duckdb/extension/json/json_functions/read_json_objects.cpp +4 -4
- package/src/duckdb/extension/json/json_functions.cpp +6 -6
- package/src/duckdb/extension/parquet/parquet-extension.cpp +11 -24
- package/src/duckdb/extension/parquet/parquet_metadata.cpp +46 -20
- package/src/duckdb/src/catalog/catalog_entry/pragma_function_catalog_entry.cpp +1 -2
- package/src/duckdb/src/catalog/catalog_entry/scalar_function_catalog_entry.cpp +1 -1
- package/src/duckdb/src/catalog/catalog_entry/scalar_macro_catalog_entry.cpp +2 -2
- package/src/duckdb/src/catalog/catalog_entry/table_function_catalog_entry.cpp +1 -2
- package/src/duckdb/src/catalog/catalog_transaction.cpp +4 -0
- package/src/duckdb/src/catalog/duck_catalog.cpp +8 -1
- package/src/duckdb/src/common/enums/date_part_specifier.cpp +82 -0
- package/src/duckdb/src/common/types/vector.cpp +136 -3
- package/src/duckdb/src/{function → core_functions}/aggregate/algebraic/avg.cpp +9 -12
- package/src/duckdb/src/core_functions/aggregate/algebraic/corr.cpp +13 -0
- package/src/duckdb/src/core_functions/aggregate/algebraic/covar.cpp +21 -0
- package/src/duckdb/src/core_functions/aggregate/algebraic/stddev.cpp +34 -0
- package/src/duckdb/src/{function → core_functions}/aggregate/distributive/approx_count.cpp +3 -3
- package/src/duckdb/src/{function → core_functions}/aggregate/distributive/arg_min_max.cpp +7 -23
- package/src/duckdb/src/{function → core_functions}/aggregate/distributive/bitagg.cpp +10 -10
- package/src/duckdb/src/{function → core_functions}/aggregate/distributive/bitstring_agg.cpp +4 -4
- package/src/duckdb/src/{function → core_functions}/aggregate/distributive/bool.cpp +1 -17
- package/src/duckdb/src/{function → core_functions}/aggregate/distributive/entropy.cpp +5 -4
- package/src/duckdb/src/{function → core_functions}/aggregate/distributive/kurtosis.cpp +5 -6
- package/src/duckdb/src/{function → core_functions}/aggregate/distributive/minmax.cpp +5 -5
- package/src/duckdb/src/{function → core_functions}/aggregate/distributive/product.cpp +2 -11
- package/src/duckdb/src/{function → core_functions}/aggregate/distributive/skew.cpp +5 -6
- package/src/duckdb/src/{function → core_functions}/aggregate/distributive/string_agg.cpp +4 -6
- package/src/duckdb/src/{function → core_functions}/aggregate/distributive/sum.cpp +38 -46
- package/src/duckdb/src/{function → core_functions}/aggregate/holistic/approximate_quantile.cpp +4 -5
- package/src/duckdb/src/{function → core_functions}/aggregate/holistic/mode.cpp +4 -5
- package/src/duckdb/src/{function → core_functions}/aggregate/holistic/quantile.cpp +31 -23
- package/src/duckdb/src/{function → core_functions}/aggregate/holistic/reservoir_quantile.cpp +4 -5
- package/src/duckdb/src/{function → core_functions}/aggregate/nested/histogram.cpp +4 -4
- package/src/duckdb/src/{function → core_functions}/aggregate/nested/list.cpp +6 -10
- package/src/duckdb/src/{function → core_functions}/aggregate/regression/regr_avg.cpp +7 -11
- package/src/duckdb/src/{function → core_functions}/aggregate/regression/regr_count.cpp +4 -4
- package/src/duckdb/src/{function → core_functions}/aggregate/regression/regr_intercept.cpp +5 -8
- package/src/duckdb/src/{function → core_functions}/aggregate/regression/regr_r2.cpp +5 -7
- package/src/duckdb/src/{function → core_functions}/aggregate/regression/regr_slope.cpp +5 -7
- package/src/duckdb/src/{function → core_functions}/aggregate/regression/regr_sxx_syy.cpp +8 -12
- package/src/duckdb/src/{function → core_functions}/aggregate/regression/regr_sxy.cpp +6 -8
- package/src/duckdb/src/core_functions/core_functions.cpp +50 -0
- package/src/duckdb/src/core_functions/function_list.cpp +352 -0
- package/src/duckdb/src/{function → core_functions}/scalar/bit/bitstring.cpp +12 -15
- package/src/duckdb/src/{function → core_functions}/scalar/blob/base64.cpp +6 -6
- package/src/duckdb/src/{function → core_functions}/scalar/blob/encode.cpp +7 -6
- package/src/duckdb/src/{function → core_functions}/scalar/date/age.cpp +3 -3
- package/src/duckdb/src/{function → core_functions}/scalar/date/current.cpp +8 -8
- package/src/duckdb/src/{function → core_functions}/scalar/date/date_diff.cpp +3 -6
- package/src/duckdb/src/{function → core_functions}/scalar/date/date_part.cpp +144 -148
- package/src/duckdb/src/{function → core_functions}/scalar/date/date_sub.cpp +3 -6
- package/src/duckdb/src/{function → core_functions}/scalar/date/date_trunc.cpp +3 -6
- package/src/duckdb/src/{function → core_functions}/scalar/date/epoch.cpp +7 -8
- package/src/duckdb/src/{function → core_functions}/scalar/date/make_date.cpp +14 -14
- package/src/duckdb/src/core_functions/scalar/date/strftime.cpp +251 -0
- package/src/duckdb/src/{function → core_functions}/scalar/date/time_bucket.cpp +4 -5
- package/src/duckdb/src/{function → core_functions}/scalar/date/to_interval.cpp +39 -19
- package/src/duckdb/src/{function/scalar/enum/enum_functions_implementation.cpp → core_functions/scalar/enum/enum_functions.cpp} +18 -22
- package/src/duckdb/src/{function → core_functions}/scalar/generic/alias.cpp +4 -4
- package/src/duckdb/src/{function → core_functions}/scalar/generic/current_setting.cpp +4 -5
- package/src/duckdb/src/{function → core_functions}/scalar/generic/error.cpp +4 -4
- package/src/duckdb/src/{function → core_functions}/scalar/generic/hash.cpp +4 -4
- package/src/duckdb/src/{function → core_functions}/scalar/generic/least.cpp +8 -9
- package/src/duckdb/src/{function → core_functions}/scalar/generic/stats.cpp +4 -4
- package/src/duckdb/src/{function/scalar/system → core_functions/scalar/generic}/system_functions.cpp +24 -13
- package/src/duckdb/src/{function → core_functions}/scalar/generic/typeof.cpp +4 -4
- package/src/duckdb/src/{function → core_functions}/scalar/list/array_slice.cpp +3 -13
- package/src/duckdb/src/{function → core_functions}/scalar/list/flatten.cpp +5 -5
- package/src/duckdb/src/{function → core_functions}/scalar/list/list_aggregates.cpp +2 -13
- package/src/duckdb/src/{function → core_functions}/scalar/list/list_lambdas.cpp +9 -24
- package/src/duckdb/src/{function → core_functions}/scalar/list/list_sort.cpp +8 -22
- package/src/duckdb/src/{function → core_functions}/scalar/list/list_value.cpp +4 -5
- package/src/duckdb/src/{function → core_functions}/scalar/list/range.cpp +8 -6
- package/src/duckdb/src/{function → core_functions}/scalar/map/cardinality.cpp +5 -4
- package/src/duckdb/src/{function → core_functions}/scalar/map/map.cpp +6 -63
- package/src/duckdb/src/{function → core_functions}/scalar/map/map_entries.cpp +5 -4
- package/src/duckdb/src/{function → core_functions}/scalar/map/map_extract.cpp +22 -7
- package/src/duckdb/src/{function → core_functions}/scalar/map/map_from_entries.cpp +6 -5
- package/src/duckdb/src/{function → core_functions}/scalar/map/map_keys_values.cpp +8 -7
- package/src/duckdb/src/{function → core_functions}/scalar/math/numeric.cpp +110 -138
- package/src/duckdb/src/{function → core_functions}/scalar/operators/bitwise.cpp +19 -20
- package/src/duckdb/src/{function/scalar/math → core_functions/scalar/random}/random.cpp +5 -6
- package/src/duckdb/src/{function/scalar/math → core_functions/scalar/random}/setseed.cpp +3 -3
- package/src/duckdb/src/{function → core_functions}/scalar/string/ascii.cpp +4 -5
- package/src/duckdb/src/{function → core_functions}/scalar/string/bar.cpp +4 -4
- package/src/duckdb/src/{function → core_functions}/scalar/string/chr.cpp +5 -6
- package/src/duckdb/src/{function → core_functions}/scalar/string/damerau_levenshtein.cpp +4 -6
- package/src/duckdb/src/{function/scalar/string/mismatches.cpp → core_functions/scalar/string/hamming.cpp} +3 -12
- package/src/duckdb/src/{function → core_functions}/scalar/string/hex.cpp +15 -25
- package/src/duckdb/src/{function → core_functions}/scalar/string/instr.cpp +6 -13
- package/src/duckdb/src/{function → core_functions}/scalar/string/jaccard.cpp +3 -6
- package/src/duckdb/src/{function → core_functions}/scalar/string/jaro_winkler.cpp +7 -6
- package/src/duckdb/src/{function → core_functions}/scalar/string/left_right.cpp +18 -11
- package/src/duckdb/src/{function → core_functions}/scalar/string/levenshtein.cpp +3 -12
- package/src/duckdb/src/{function → core_functions}/scalar/string/md5.cpp +15 -21
- package/src/duckdb/src/{function → core_functions}/scalar/string/pad.cpp +7 -13
- package/src/duckdb/src/{function → core_functions}/scalar/string/printf.cpp +10 -10
- package/src/duckdb/src/{function → core_functions}/scalar/string/repeat.cpp +3 -6
- package/src/duckdb/src/{function → core_functions}/scalar/string/replace.cpp +4 -7
- package/src/duckdb/src/{function → core_functions}/scalar/string/reverse.cpp +3 -3
- package/src/duckdb/src/{function → core_functions}/scalar/string/starts_with.cpp +4 -8
- package/src/duckdb/src/{function → core_functions}/scalar/string/string_split.cpp +11 -11
- package/src/duckdb/src/{function → core_functions}/scalar/string/translate.cpp +4 -7
- package/src/duckdb/src/{function → core_functions}/scalar/string/trim.cpp +19 -14
- package/src/duckdb/src/core_functions/scalar/string/unicode.cpp +28 -0
- package/src/duckdb/src/{function → core_functions}/scalar/struct/struct_insert.cpp +4 -4
- package/src/duckdb/src/{function → core_functions}/scalar/struct/struct_pack.cpp +3 -4
- package/src/duckdb/src/{function → core_functions}/scalar/union/union_extract.cpp +4 -8
- package/src/duckdb/src/{function → core_functions}/scalar/union/union_tag.cpp +4 -8
- package/src/duckdb/src/{function → core_functions}/scalar/union/union_value.cpp +4 -59
- package/src/duckdb/src/execution/operator/persistent/base_csv_reader.cpp +1 -1
- package/src/duckdb/src/execution/operator/persistent/buffered_csv_reader.cpp +1 -1
- package/src/duckdb/src/execution/operator/persistent/parallel_csv_reader.cpp +1 -1
- package/src/duckdb/src/execution/operator/persistent/physical_insert.cpp +19 -12
- package/src/duckdb/src/function/aggregate/distributive_functions.cpp +0 -17
- package/src/duckdb/src/function/cast/string_cast.cpp +1 -1
- package/src/duckdb/src/function/function.cpp +0 -8
- package/src/duckdb/src/function/function_set.cpp +25 -0
- package/src/duckdb/src/function/scalar/generic_functions.cpp +1 -9
- package/src/duckdb/src/function/scalar/nested_functions.cpp +0 -22
- package/src/duckdb/src/function/scalar/operators.cpp +0 -6
- package/src/duckdb/src/function/scalar/{date/strftime.cpp → strftime_format.cpp} +1 -249
- package/src/duckdb/src/function/scalar/string/length.cpp +0 -19
- package/src/duckdb/src/function/scalar/string_functions.cpp +0 -40
- package/src/duckdb/src/function/scalar/system/aggregate_export.cpp +5 -0
- package/src/duckdb/src/function/table/arrow_conversion.cpp +1 -1
- package/src/duckdb/src/function/table/range.cpp +1 -0
- package/src/duckdb/src/function/table/repeat_row.cpp +60 -0
- package/src/duckdb/src/function/table/system/duckdb_functions.cpp +27 -40
- package/src/duckdb/src/function/table/version/pragma_version.cpp +2 -2
- package/src/duckdb/src/include/duckdb/catalog/catalog_entry/aggregate_function_catalog_entry.hpp +3 -3
- package/src/duckdb/src/include/duckdb/catalog/catalog_entry/function_entry.hpp +33 -0
- package/src/duckdb/src/include/duckdb/catalog/catalog_entry/macro_catalog_entry.hpp +2 -2
- package/src/duckdb/src/include/duckdb/catalog/catalog_entry/pragma_function_catalog_entry.hpp +2 -2
- package/src/duckdb/src/include/duckdb/catalog/catalog_entry/scalar_function_catalog_entry.hpp +2 -2
- package/src/duckdb/src/include/duckdb/catalog/catalog_entry/table_function_catalog_entry.hpp +2 -2
- package/src/duckdb/src/include/duckdb/catalog/catalog_transaction.hpp +2 -0
- package/src/duckdb/src/include/duckdb/common/algorithm.hpp +1 -0
- package/src/duckdb/src/include/duckdb/common/types/vector.hpp +11 -1
- package/src/duckdb/src/include/duckdb/{function → core_functions}/aggregate/algebraic/corr.hpp +3 -4
- package/src/duckdb/src/include/duckdb/{function → core_functions}/aggregate/algebraic/covar.hpp +1 -1
- package/src/duckdb/src/include/duckdb/{function → core_functions}/aggregate/algebraic/stddev.hpp +1 -1
- package/src/duckdb/src/include/duckdb/core_functions/aggregate/algebraic_functions.hpp +124 -0
- package/src/duckdb/src/include/duckdb/core_functions/aggregate/distributive_functions.hpp +229 -0
- package/src/duckdb/src/include/duckdb/core_functions/aggregate/holistic_functions.hpp +85 -0
- package/src/duckdb/src/include/duckdb/core_functions/aggregate/nested_functions.hpp +41 -0
- package/src/duckdb/src/include/duckdb/{function → core_functions}/aggregate/regression/regr_count.hpp +3 -4
- package/src/duckdb/src/include/duckdb/{function → core_functions}/aggregate/regression/regr_slope.hpp +2 -2
- package/src/duckdb/src/include/duckdb/core_functions/aggregate/regression_functions.hpp +97 -0
- package/src/duckdb/src/include/duckdb/{function → core_functions}/aggregate/sum_helpers.hpp +1 -1
- package/src/duckdb/src/include/duckdb/{function/scalar/uuid_functions.hpp → core_functions/core_functions.hpp} +7 -5
- package/src/duckdb/src/include/duckdb/core_functions/function_list.hpp +33 -0
- package/src/duckdb/src/include/duckdb/core_functions/scalar/bit_functions.hpp +52 -0
- package/src/duckdb/src/include/duckdb/core_functions/scalar/blob_functions.hpp +58 -0
- package/src/duckdb/src/include/duckdb/core_functions/scalar/date_functions.hpp +544 -0
- package/src/duckdb/src/include/duckdb/core_functions/scalar/enum_functions.hpp +61 -0
- package/src/duckdb/src/include/duckdb/core_functions/scalar/generic_functions.hpp +142 -0
- package/src/duckdb/src/include/duckdb/core_functions/scalar/list_functions.hpp +220 -0
- package/src/duckdb/src/include/duckdb/core_functions/scalar/map_functions.hpp +85 -0
- package/src/duckdb/src/include/duckdb/core_functions/scalar/math_functions.hpp +394 -0
- package/src/duckdb/src/include/duckdb/core_functions/scalar/operators_functions.hpp +70 -0
- package/src/duckdb/src/include/duckdb/core_functions/scalar/random_functions.hpp +49 -0
- package/src/duckdb/src/include/duckdb/core_functions/scalar/string_functions.hpp +439 -0
- package/src/duckdb/src/include/duckdb/core_functions/scalar/struct_functions.hpp +40 -0
- package/src/duckdb/src/include/duckdb/core_functions/scalar/union_functions.hpp +43 -0
- package/src/duckdb/src/include/duckdb/execution/operator/persistent/base_csv_reader.hpp +1 -1
- package/src/duckdb/src/include/duckdb/execution/operator/persistent/csv_reader_options.hpp +1 -1
- package/src/duckdb/src/include/duckdb/execution/operator/persistent/physical_insert.hpp +4 -3
- package/src/duckdb/src/include/duckdb/function/aggregate/distributive_functions.hpp +0 -85
- package/src/duckdb/src/include/duckdb/function/built_in_functions.hpp +0 -8
- package/src/duckdb/src/include/duckdb/function/function_set.hpp +7 -2
- package/src/duckdb/src/include/duckdb/function/scalar/generic_functions.hpp +1 -36
- package/src/duckdb/src/include/duckdb/function/scalar/nested_functions.hpp +0 -120
- package/src/duckdb/src/include/duckdb/function/scalar/operators.hpp +0 -24
- package/src/duckdb/src/include/duckdb/function/scalar/string_functions.hpp +1 -97
- package/src/duckdb/src/include/duckdb/function/table/range.hpp +4 -0
- package/src/duckdb/src/include/duckdb/function/table/read_csv.hpp +1 -1
- package/src/duckdb/src/include/duckdb/main/extension_util.hpp +48 -0
- package/src/duckdb/src/include/duckdb/parser/parsed_data/create_function_info.hpp +6 -0
- package/src/duckdb/src/main/extension/extension_helper.cpp +1 -0
- package/src/duckdb/src/main/extension/extension_load.cpp +48 -4
- package/src/duckdb/src/main/extension/extension_util.cpp +90 -0
- package/src/duckdb/src/planner/binder/statement/bind_create_table.cpp +6 -7
- package/src/duckdb/src/planner/binder/tableref/bind_table_function.cpp +5 -4
- package/src/duckdb/ub_src_common_enums.cpp +2 -0
- package/src/duckdb/ub_src_core_functions.cpp +4 -0
- package/src/duckdb/ub_src_core_functions_aggregate_algebraic.cpp +8 -0
- package/src/duckdb/ub_src_core_functions_aggregate_distributive.cpp +24 -0
- package/src/duckdb/ub_src_core_functions_aggregate_holistic.cpp +8 -0
- package/src/duckdb/ub_src_core_functions_aggregate_nested.cpp +4 -0
- package/src/duckdb/ub_src_core_functions_aggregate_regression.cpp +14 -0
- package/src/duckdb/ub_src_core_functions_scalar_bit.cpp +2 -0
- package/src/duckdb/ub_src_core_functions_scalar_blob.cpp +4 -0
- package/src/duckdb/ub_src_core_functions_scalar_date.cpp +22 -0
- package/src/duckdb/ub_src_core_functions_scalar_enum.cpp +2 -0
- package/src/duckdb/ub_src_core_functions_scalar_generic.cpp +16 -0
- package/src/duckdb/ub_src_core_functions_scalar_list.cpp +14 -0
- package/src/duckdb/ub_src_core_functions_scalar_map.cpp +12 -0
- package/src/duckdb/ub_src_core_functions_scalar_math.cpp +2 -0
- package/src/duckdb/ub_src_core_functions_scalar_operators.cpp +2 -0
- package/src/duckdb/ub_src_core_functions_scalar_random.cpp +4 -0
- package/src/duckdb/ub_src_core_functions_scalar_string.cpp +44 -0
- package/src/duckdb/ub_src_core_functions_scalar_struct.cpp +4 -0
- package/src/duckdb/ub_src_core_functions_scalar_union.cpp +6 -0
- package/src/duckdb/ub_src_function_aggregate.cpp +0 -8
- package/src/duckdb/ub_src_function_aggregate_distributive.cpp +0 -24
- package/src/duckdb/ub_src_function_scalar.cpp +2 -8
- package/src/duckdb/ub_src_function_scalar_generic.cpp +0 -14
- package/src/duckdb/ub_src_function_scalar_list.cpp +0 -14
- package/src/duckdb/ub_src_function_scalar_operators.cpp +0 -2
- package/src/duckdb/ub_src_function_scalar_string.cpp +0 -42
- package/src/duckdb/ub_src_function_scalar_struct.cpp +0 -4
- package/src/duckdb/ub_src_function_scalar_system.cpp +0 -2
- package/src/duckdb/ub_src_function_table.cpp +2 -0
- package/src/duckdb/ub_src_main_extension.cpp +2 -0
- package/src/duckdb/src/function/aggregate/algebraic/corr.cpp +0 -14
- package/src/duckdb/src/function/aggregate/algebraic/covar.cpp +0 -25
- package/src/duckdb/src/function/aggregate/algebraic/stddev.cpp +0 -54
- package/src/duckdb/src/function/aggregate/algebraic_functions.cpp +0 -21
- package/src/duckdb/src/function/aggregate/holistic_functions.cpp +0 -12
- package/src/duckdb/src/function/aggregate/nested_functions.cpp +0 -10
- package/src/duckdb/src/function/aggregate/regression_functions.cpp +0 -21
- package/src/duckdb/src/function/scalar/date_functions.cpp +0 -22
- package/src/duckdb/src/function/scalar/enum_functions.cpp +0 -13
- package/src/duckdb/src/function/scalar/math_functions.cpp +0 -50
- package/src/duckdb/src/function/scalar/trigonometrics_functions.cpp +0 -18
- package/src/duckdb/src/include/duckdb/function/aggregate/algebraic_functions.hpp +0 -56
- package/src/duckdb/src/include/duckdb/function/aggregate/holistic_functions.hpp +0 -33
- package/src/duckdb/src/include/duckdb/function/aggregate/nested_functions.hpp +0 -26
- package/src/duckdb/src/include/duckdb/function/aggregate/regression_functions.hpp +0 -53
- package/src/duckdb/src/include/duckdb/function/scalar/bit_functions.hpp +0 -32
- package/src/duckdb/src/include/duckdb/function/scalar/blob_functions.hpp +0 -24
- package/src/duckdb/src/include/duckdb/function/scalar/date_functions.hpp +0 -73
- package/src/duckdb/src/include/duckdb/function/scalar/enum_functions.hpp +0 -37
- package/src/duckdb/src/include/duckdb/function/scalar/math_functions.hpp +0 -137
- package/src/duckdb/src/include/duckdb/function/scalar/trigonometric_functions.hpp +0 -49
- package/src/duckdb/ub_src_function_aggregate_algebraic.cpp +0 -8
- package/src/duckdb/ub_src_function_aggregate_holistic.cpp +0 -8
- package/src/duckdb/ub_src_function_aggregate_nested.cpp +0 -4
- package/src/duckdb/ub_src_function_aggregate_regression.cpp +0 -14
- package/src/duckdb/ub_src_function_scalar_bit.cpp +0 -2
- package/src/duckdb/ub_src_function_scalar_blob.cpp +0 -4
- package/src/duckdb/ub_src_function_scalar_date.cpp +0 -22
- package/src/duckdb/ub_src_function_scalar_enum.cpp +0 -2
- package/src/duckdb/ub_src_function_scalar_map.cpp +0 -12
- package/src/duckdb/ub_src_function_scalar_math.cpp +0 -6
- package/src/duckdb/ub_src_function_scalar_union.cpp +0 -6
- /package/src/duckdb/src/include/duckdb/function/scalar/{strftime.hpp → strftime_format.hpp} +0 -0
@@ -0,0 +1,229 @@
|
|
1
|
+
//===----------------------------------------------------------------------===//
|
2
|
+
// DuckDB
|
3
|
+
//
|
4
|
+
// duckdb/core_functions/aggregate/distributive_functions.hpp
|
5
|
+
//
|
6
|
+
//
|
7
|
+
//===----------------------------------------------------------------------===//
|
8
|
+
// This file is generated by scripts/generate_functions.py
|
9
|
+
|
10
|
+
#pragma once
|
11
|
+
|
12
|
+
#include "duckdb/function/function_set.hpp"
|
13
|
+
|
14
|
+
namespace duckdb {
|
15
|
+
|
16
|
+
struct ApproxCountDistinctFun {
|
17
|
+
static constexpr const char *Name = "approx_count_distinct";
|
18
|
+
static constexpr const char *Parameters = "x";
|
19
|
+
static constexpr const char *Description = "Computes the approximate count of distinct elements using HyperLogLog.";
|
20
|
+
static constexpr const char *Example = "approx_count_distinct(A)";
|
21
|
+
|
22
|
+
static AggregateFunctionSet GetFunctions();
|
23
|
+
};
|
24
|
+
|
25
|
+
struct ArgMinFun {
|
26
|
+
static constexpr const char *Name = "arg_min";
|
27
|
+
static constexpr const char *Parameters = "arg,val";
|
28
|
+
static constexpr const char *Description = "Finds the row with the minimum val. Calculates the arg expression at that row.";
|
29
|
+
static constexpr const char *Example = "arg_min(A,B)";
|
30
|
+
|
31
|
+
static AggregateFunctionSet GetFunctions();
|
32
|
+
};
|
33
|
+
|
34
|
+
struct ArgminFun {
|
35
|
+
using ALIAS = ArgMinFun;
|
36
|
+
|
37
|
+
static constexpr const char *Name = "argmin";
|
38
|
+
};
|
39
|
+
|
40
|
+
struct MinByFun {
|
41
|
+
using ALIAS = ArgMinFun;
|
42
|
+
|
43
|
+
static constexpr const char *Name = "min_by";
|
44
|
+
};
|
45
|
+
|
46
|
+
struct ArgMaxFun {
|
47
|
+
static constexpr const char *Name = "arg_max";
|
48
|
+
static constexpr const char *Parameters = "arg,val";
|
49
|
+
static constexpr const char *Description = "Finds the row with the maximum val. Calculates the arg expression at that row.";
|
50
|
+
static constexpr const char *Example = "arg_max(A,B)";
|
51
|
+
|
52
|
+
static AggregateFunctionSet GetFunctions();
|
53
|
+
};
|
54
|
+
|
55
|
+
struct ArgmaxFun {
|
56
|
+
using ALIAS = ArgMaxFun;
|
57
|
+
|
58
|
+
static constexpr const char *Name = "argmax";
|
59
|
+
};
|
60
|
+
|
61
|
+
struct MaxByFun {
|
62
|
+
using ALIAS = ArgMaxFun;
|
63
|
+
|
64
|
+
static constexpr const char *Name = "max_by";
|
65
|
+
};
|
66
|
+
|
67
|
+
struct BitAndFun {
|
68
|
+
static constexpr const char *Name = "bit_and";
|
69
|
+
static constexpr const char *Parameters = "arg";
|
70
|
+
static constexpr const char *Description = "Returns the bitwise AND of all bits in a given expression.";
|
71
|
+
static constexpr const char *Example = "bit_and(A)";
|
72
|
+
|
73
|
+
static AggregateFunctionSet GetFunctions();
|
74
|
+
};
|
75
|
+
|
76
|
+
struct BitOrFun {
|
77
|
+
static constexpr const char *Name = "bit_or";
|
78
|
+
static constexpr const char *Parameters = "arg";
|
79
|
+
static constexpr const char *Description = "Returns the bitwise OR of all bits in a given expression.";
|
80
|
+
static constexpr const char *Example = "bit_or(A)";
|
81
|
+
|
82
|
+
static AggregateFunctionSet GetFunctions();
|
83
|
+
};
|
84
|
+
|
85
|
+
struct BitXorFun {
|
86
|
+
static constexpr const char *Name = "bit_xor";
|
87
|
+
static constexpr const char *Parameters = "arg";
|
88
|
+
static constexpr const char *Description = "Returns the bitwise XOR of all bits in a given expression.";
|
89
|
+
static constexpr const char *Example = "bit_xor(A)";
|
90
|
+
|
91
|
+
static AggregateFunctionSet GetFunctions();
|
92
|
+
};
|
93
|
+
|
94
|
+
struct BitstringAggFun {
|
95
|
+
static constexpr const char *Name = "bitstring_agg";
|
96
|
+
static constexpr const char *Parameters = "arg";
|
97
|
+
static constexpr const char *Description = "Returns a bitstring with bits set for each distinct value.";
|
98
|
+
static constexpr const char *Example = "bitstring_agg(A)";
|
99
|
+
|
100
|
+
static AggregateFunctionSet GetFunctions();
|
101
|
+
};
|
102
|
+
|
103
|
+
struct BoolAndFun {
|
104
|
+
static constexpr const char *Name = "bool_and";
|
105
|
+
static constexpr const char *Parameters = "arg";
|
106
|
+
static constexpr const char *Description = "Returns TRUE if every input value is TRUE, otherwise FALSE.";
|
107
|
+
static constexpr const char *Example = "bool_and(A)";
|
108
|
+
|
109
|
+
static AggregateFunction GetFunction();
|
110
|
+
};
|
111
|
+
|
112
|
+
struct BoolOrFun {
|
113
|
+
static constexpr const char *Name = "bool_or";
|
114
|
+
static constexpr const char *Parameters = "arg";
|
115
|
+
static constexpr const char *Description = "Returns TRUE if any input value is TRUE, otherwise FALSE.";
|
116
|
+
static constexpr const char *Example = "bool_or(A)";
|
117
|
+
|
118
|
+
static AggregateFunction GetFunction();
|
119
|
+
};
|
120
|
+
|
121
|
+
struct EntropyFun {
|
122
|
+
static constexpr const char *Name = "entropy";
|
123
|
+
static constexpr const char *Parameters = "x";
|
124
|
+
static constexpr const char *Description = "Returns the log-2 entropy of count input-values.";
|
125
|
+
static constexpr const char *Example = "";
|
126
|
+
|
127
|
+
static AggregateFunctionSet GetFunctions();
|
128
|
+
};
|
129
|
+
|
130
|
+
struct KahanSumFun {
|
131
|
+
static constexpr const char *Name = "kahan_sum";
|
132
|
+
static constexpr const char *Parameters = "arg";
|
133
|
+
static constexpr const char *Description = "Calculates the sum using a more accurate floating point summation (Kahan Sum).";
|
134
|
+
static constexpr const char *Example = "kahan_sum(A)";
|
135
|
+
|
136
|
+
static AggregateFunction GetFunction();
|
137
|
+
};
|
138
|
+
|
139
|
+
struct FsumFun {
|
140
|
+
using ALIAS = KahanSumFun;
|
141
|
+
|
142
|
+
static constexpr const char *Name = "fsum";
|
143
|
+
};
|
144
|
+
|
145
|
+
struct SumkahanFun {
|
146
|
+
using ALIAS = KahanSumFun;
|
147
|
+
|
148
|
+
static constexpr const char *Name = "sumkahan";
|
149
|
+
};
|
150
|
+
|
151
|
+
struct KurtosisFun {
|
152
|
+
static constexpr const char *Name = "kurtosis";
|
153
|
+
static constexpr const char *Parameters = "x";
|
154
|
+
static constexpr const char *Description = "Returns the excess kurtosis (Fisher’s definition) of all input values, with a bias correction according to the sample size";
|
155
|
+
static constexpr const char *Example = "";
|
156
|
+
|
157
|
+
static AggregateFunction GetFunction();
|
158
|
+
};
|
159
|
+
|
160
|
+
struct MinFun {
|
161
|
+
static constexpr const char *Name = "min";
|
162
|
+
static constexpr const char *Parameters = "arg";
|
163
|
+
static constexpr const char *Description = "Returns the minimum value present in arg.";
|
164
|
+
static constexpr const char *Example = "min(A)";
|
165
|
+
|
166
|
+
static AggregateFunctionSet GetFunctions();
|
167
|
+
};
|
168
|
+
|
169
|
+
struct MaxFun {
|
170
|
+
static constexpr const char *Name = "max";
|
171
|
+
static constexpr const char *Parameters = "arg";
|
172
|
+
static constexpr const char *Description = "Returns the maximum value present in arg.";
|
173
|
+
static constexpr const char *Example = "max(A)";
|
174
|
+
|
175
|
+
static AggregateFunctionSet GetFunctions();
|
176
|
+
};
|
177
|
+
|
178
|
+
struct ProductFun {
|
179
|
+
static constexpr const char *Name = "product";
|
180
|
+
static constexpr const char *Parameters = "arg";
|
181
|
+
static constexpr const char *Description = "Calculates the product of all tuples in arg.";
|
182
|
+
static constexpr const char *Example = "product(A)";
|
183
|
+
|
184
|
+
static AggregateFunction GetFunction();
|
185
|
+
};
|
186
|
+
|
187
|
+
struct SkewnessFun {
|
188
|
+
static constexpr const char *Name = "skewness";
|
189
|
+
static constexpr const char *Parameters = "x";
|
190
|
+
static constexpr const char *Description = "Returns the skewness of all input values.";
|
191
|
+
static constexpr const char *Example = "skewness(A)";
|
192
|
+
|
193
|
+
static AggregateFunction GetFunction();
|
194
|
+
};
|
195
|
+
|
196
|
+
struct StringAggFun {
|
197
|
+
static constexpr const char *Name = "string_agg";
|
198
|
+
static constexpr const char *Parameters = "str,arg";
|
199
|
+
static constexpr const char *Description = "Concatenates the column string values with an optional separator.";
|
200
|
+
static constexpr const char *Example = "string_agg(A, '-)";
|
201
|
+
|
202
|
+
static AggregateFunctionSet GetFunctions();
|
203
|
+
};
|
204
|
+
|
205
|
+
struct GroupConcatFun {
|
206
|
+
using ALIAS = StringAggFun;
|
207
|
+
|
208
|
+
static constexpr const char *Name = "group_concat";
|
209
|
+
};
|
210
|
+
|
211
|
+
struct SumFun {
|
212
|
+
static constexpr const char *Name = "sum";
|
213
|
+
static constexpr const char *Parameters = "arg";
|
214
|
+
static constexpr const char *Description = "Calculates the sum value for all tuples in arg.";
|
215
|
+
static constexpr const char *Example = "sum(A)";
|
216
|
+
|
217
|
+
static AggregateFunctionSet GetFunctions();
|
218
|
+
};
|
219
|
+
|
220
|
+
struct SumNoOverflowFun {
|
221
|
+
static constexpr const char *Name = "sum_no_overflow";
|
222
|
+
static constexpr const char *Parameters = "arg";
|
223
|
+
static constexpr const char *Description = "Calculates the sum value for all tuples in arg without overflow checks.";
|
224
|
+
static constexpr const char *Example = "sum_no_overflow(A)";
|
225
|
+
|
226
|
+
static AggregateFunctionSet GetFunctions();
|
227
|
+
};
|
228
|
+
|
229
|
+
} // namespace duckdb
|
@@ -0,0 +1,85 @@
|
|
1
|
+
//===----------------------------------------------------------------------===//
|
2
|
+
// DuckDB
|
3
|
+
//
|
4
|
+
// duckdb/core_functions/aggregate/holistic_functions.hpp
|
5
|
+
//
|
6
|
+
//
|
7
|
+
//===----------------------------------------------------------------------===//
|
8
|
+
// This file is generated by scripts/generate_functions.py
|
9
|
+
|
10
|
+
#pragma once
|
11
|
+
|
12
|
+
#include "duckdb/function/function_set.hpp"
|
13
|
+
|
14
|
+
namespace duckdb {
|
15
|
+
|
16
|
+
struct ApproxQuantileFun {
|
17
|
+
static constexpr const char *Name = "approx_quantile";
|
18
|
+
static constexpr const char *Parameters = "x,pos";
|
19
|
+
static constexpr const char *Description = "Computes the approximate quantile using T-Digest.";
|
20
|
+
static constexpr const char *Example = "approx_quantile(A,0.5)";
|
21
|
+
|
22
|
+
static AggregateFunctionSet GetFunctions();
|
23
|
+
};
|
24
|
+
|
25
|
+
struct MadFun {
|
26
|
+
static constexpr const char *Name = "mad";
|
27
|
+
static constexpr const char *Parameters = "x";
|
28
|
+
static constexpr const char *Description = "Returns the median absolute deviation for the values within x. NULL values are ignored. Temporal types return a positive INTERVAL. ";
|
29
|
+
static constexpr const char *Example = "MEDIAN(ABS(x-MEDIAN(x)))";
|
30
|
+
|
31
|
+
static AggregateFunctionSet GetFunctions();
|
32
|
+
};
|
33
|
+
|
34
|
+
struct MedianFun {
|
35
|
+
static constexpr const char *Name = "median";
|
36
|
+
static constexpr const char *Parameters = "x";
|
37
|
+
static constexpr const char *Description = "Returns the middle value of the set. NULL values are ignored. For even value counts, quantitiative values are averaged and ordinal values return the lower value.";
|
38
|
+
static constexpr const char *Example = "QUANTILE_CONT(x, 0.5)";
|
39
|
+
|
40
|
+
static AggregateFunctionSet GetFunctions();
|
41
|
+
};
|
42
|
+
|
43
|
+
struct ModeFun {
|
44
|
+
static constexpr const char *Name = "mode";
|
45
|
+
static constexpr const char *Parameters = "x";
|
46
|
+
static constexpr const char *Description = "Returns the most frequent value for the values within x. NULL values are ignored.";
|
47
|
+
static constexpr const char *Example = "";
|
48
|
+
|
49
|
+
static AggregateFunctionSet GetFunctions();
|
50
|
+
};
|
51
|
+
|
52
|
+
struct QuantileDiscFun {
|
53
|
+
static constexpr const char *Name = "quantile_disc";
|
54
|
+
static constexpr const char *Parameters = "x,pos";
|
55
|
+
static constexpr const char *Description = "Returns the exact quantile number between 0 and 1 . If pos is a LIST of FLOATs, then the result is a LIST of the corresponding exact quantiles.";
|
56
|
+
static constexpr const char *Example = "";
|
57
|
+
|
58
|
+
static AggregateFunctionSet GetFunctions();
|
59
|
+
};
|
60
|
+
|
61
|
+
struct QuantileFun {
|
62
|
+
using ALIAS = QuantileDiscFun;
|
63
|
+
|
64
|
+
static constexpr const char *Name = "quantile";
|
65
|
+
};
|
66
|
+
|
67
|
+
struct QuantileContFun {
|
68
|
+
static constexpr const char *Name = "quantile_cont";
|
69
|
+
static constexpr const char *Parameters = "x,pos";
|
70
|
+
static constexpr const char *Description = "Returns the intepolated quantile number between 0 and 1 . If pos is a LIST of FLOATs, then the result is a LIST of the corresponding intepolated quantiles. ";
|
71
|
+
static constexpr const char *Example = "";
|
72
|
+
|
73
|
+
static AggregateFunctionSet GetFunctions();
|
74
|
+
};
|
75
|
+
|
76
|
+
struct ReservoirQuantileFun {
|
77
|
+
static constexpr const char *Name = "reservoir_quantile";
|
78
|
+
static constexpr const char *Parameters = "x,quantile,sample_size";
|
79
|
+
static constexpr const char *Description = "Gives the approximate quantile using reservoir sampling, the sample size is optional and uses 8192 as a default size.";
|
80
|
+
static constexpr const char *Example = "reservoir_quantile(A,0.5,1024)";
|
81
|
+
|
82
|
+
static AggregateFunctionSet GetFunctions();
|
83
|
+
};
|
84
|
+
|
85
|
+
} // namespace duckdb
|
@@ -0,0 +1,41 @@
|
|
1
|
+
//===----------------------------------------------------------------------===//
|
2
|
+
// DuckDB
|
3
|
+
//
|
4
|
+
// duckdb/core_functions/aggregate/nested_functions.hpp
|
5
|
+
//
|
6
|
+
//
|
7
|
+
//===----------------------------------------------------------------------===//
|
8
|
+
// This file is generated by scripts/generate_functions.py
|
9
|
+
|
10
|
+
#pragma once
|
11
|
+
|
12
|
+
#include "duckdb/function/function_set.hpp"
|
13
|
+
|
14
|
+
namespace duckdb {
|
15
|
+
|
16
|
+
struct HistogramFun {
|
17
|
+
static constexpr const char *Name = "histogram";
|
18
|
+
static constexpr const char *Parameters = "arg";
|
19
|
+
static constexpr const char *Description = "Returns a LIST of STRUCTs with the fields bucket and count.";
|
20
|
+
static constexpr const char *Example = "histogram(A)";
|
21
|
+
|
22
|
+
static AggregateFunctionSet GetFunctions();
|
23
|
+
static AggregateFunction GetHistogramUnorderedMap(LogicalType &type);
|
24
|
+
};
|
25
|
+
|
26
|
+
struct ListFun {
|
27
|
+
static constexpr const char *Name = "list";
|
28
|
+
static constexpr const char *Parameters = "arg";
|
29
|
+
static constexpr const char *Description = "Returns a LIST containing all the values of a column.";
|
30
|
+
static constexpr const char *Example = "list(A)";
|
31
|
+
|
32
|
+
static AggregateFunction GetFunction();
|
33
|
+
};
|
34
|
+
|
35
|
+
struct ArrayAggFun {
|
36
|
+
using ALIAS = ListFun;
|
37
|
+
|
38
|
+
static constexpr const char *Name = "array_agg";
|
39
|
+
};
|
40
|
+
|
41
|
+
} // namespace duckdb
|
@@ -1,7 +1,7 @@
|
|
1
1
|
//===----------------------------------------------------------------------===//
|
2
2
|
// DuckDB
|
3
3
|
//
|
4
|
-
// duckdb/
|
4
|
+
// duckdb/core_functions/aggregate/regression/regr_count.hpp
|
5
5
|
//
|
6
6
|
//
|
7
7
|
//===----------------------------------------------------------------------===//
|
@@ -9,9 +9,8 @@
|
|
9
9
|
#pragma once
|
10
10
|
|
11
11
|
#include "duckdb/function/aggregate_function.hpp"
|
12
|
-
#include "duckdb/
|
13
|
-
#include "duckdb/
|
14
|
-
#include "duckdb/function/aggregate/algebraic/stddev.hpp"
|
12
|
+
#include "duckdb/core_functions/aggregate/algebraic/covar.hpp"
|
13
|
+
#include "duckdb/core_functions/aggregate/algebraic/stddev.hpp"
|
15
14
|
|
16
15
|
namespace duckdb {
|
17
16
|
|
@@ -7,8 +7,8 @@
|
|
7
7
|
//! Output : Double
|
8
8
|
|
9
9
|
#pragma once
|
10
|
-
#include "duckdb/
|
11
|
-
#include "duckdb/
|
10
|
+
#include "duckdb/core_functions/aggregate/algebraic/stddev.hpp"
|
11
|
+
#include "duckdb/core_functions/aggregate/algebraic/covar.hpp"
|
12
12
|
|
13
13
|
namespace duckdb {
|
14
14
|
|
@@ -0,0 +1,97 @@
|
|
1
|
+
//===----------------------------------------------------------------------===//
|
2
|
+
// DuckDB
|
3
|
+
//
|
4
|
+
// duckdb/core_functions/aggregate/regression_functions.hpp
|
5
|
+
//
|
6
|
+
//
|
7
|
+
//===----------------------------------------------------------------------===//
|
8
|
+
// This file is generated by scripts/generate_functions.py
|
9
|
+
|
10
|
+
#pragma once
|
11
|
+
|
12
|
+
#include "duckdb/function/function_set.hpp"
|
13
|
+
|
14
|
+
namespace duckdb {
|
15
|
+
|
16
|
+
struct RegrAvgxFun {
|
17
|
+
static constexpr const char *Name = "regr_avgx";
|
18
|
+
static constexpr const char *Parameters = "y,x";
|
19
|
+
static constexpr const char *Description = "Returns the average of the independent variable for non-null pairs in a group, where x is the independent variable and y is the dependent variable.";
|
20
|
+
static constexpr const char *Example = "";
|
21
|
+
|
22
|
+
static AggregateFunction GetFunction();
|
23
|
+
};
|
24
|
+
|
25
|
+
struct RegrAvgyFun {
|
26
|
+
static constexpr const char *Name = "regr_avgy";
|
27
|
+
static constexpr const char *Parameters = "y,x";
|
28
|
+
static constexpr const char *Description = "Returns the average of the dependent variable for non-null pairs in a group, where x is the independent variable and y is the dependent variable.";
|
29
|
+
static constexpr const char *Example = "";
|
30
|
+
|
31
|
+
static AggregateFunction GetFunction();
|
32
|
+
};
|
33
|
+
|
34
|
+
struct RegrCountFun {
|
35
|
+
static constexpr const char *Name = "regr_count";
|
36
|
+
static constexpr const char *Parameters = "y,x";
|
37
|
+
static constexpr const char *Description = "Returns the number of non-null number pairs in a group.";
|
38
|
+
static constexpr const char *Example = "(SUM(x*y) - SUM(x) * SUM(y) / COUNT(*)) / COUNT(*)";
|
39
|
+
|
40
|
+
static AggregateFunction GetFunction();
|
41
|
+
};
|
42
|
+
|
43
|
+
struct RegrInterceptFun {
|
44
|
+
static constexpr const char *Name = "regr_intercept";
|
45
|
+
static constexpr const char *Parameters = "y,x";
|
46
|
+
static constexpr const char *Description = "Returns the intercept of the univariate linear regression line for non-null pairs in a group.";
|
47
|
+
static constexpr const char *Example = "AVG(y)-REGR_SLOPE(y,x)*AVG(x)";
|
48
|
+
|
49
|
+
static AggregateFunction GetFunction();
|
50
|
+
};
|
51
|
+
|
52
|
+
struct RegrR2Fun {
|
53
|
+
static constexpr const char *Name = "regr_r2";
|
54
|
+
static constexpr const char *Parameters = "y,x";
|
55
|
+
static constexpr const char *Description = "Returns the coefficient of determination for non-null pairs in a group.";
|
56
|
+
static constexpr const char *Example = "";
|
57
|
+
|
58
|
+
static AggregateFunction GetFunction();
|
59
|
+
};
|
60
|
+
|
61
|
+
struct RegrSlopeFun {
|
62
|
+
static constexpr const char *Name = "regr_slope";
|
63
|
+
static constexpr const char *Parameters = "y,x";
|
64
|
+
static constexpr const char *Description = "Returns the slope of the linear regression line for non-null pairs in a group.";
|
65
|
+
static constexpr const char *Example = "COVAR_POP(x,y) / VAR_POP(x)";
|
66
|
+
|
67
|
+
static AggregateFunction GetFunction();
|
68
|
+
};
|
69
|
+
|
70
|
+
struct RegrSXXFun {
|
71
|
+
static constexpr const char *Name = "regr_sxx";
|
72
|
+
static constexpr const char *Parameters = "y,x";
|
73
|
+
static constexpr const char *Description = "";
|
74
|
+
static constexpr const char *Example = "REGR_COUNT(y, x) * VAR_POP(x)";
|
75
|
+
|
76
|
+
static AggregateFunction GetFunction();
|
77
|
+
};
|
78
|
+
|
79
|
+
struct RegrSXYFun {
|
80
|
+
static constexpr const char *Name = "regr_sxy";
|
81
|
+
static constexpr const char *Parameters = "y,x";
|
82
|
+
static constexpr const char *Description = "Returns the population covariance of input values";
|
83
|
+
static constexpr const char *Example = "REGR_COUNT(y, x) * COVAR_POP(y, x)";
|
84
|
+
|
85
|
+
static AggregateFunction GetFunction();
|
86
|
+
};
|
87
|
+
|
88
|
+
struct RegrSYYFun {
|
89
|
+
static constexpr const char *Name = "regr_syy";
|
90
|
+
static constexpr const char *Parameters = "y,x";
|
91
|
+
static constexpr const char *Description = "";
|
92
|
+
static constexpr const char *Example = "REGR_COUNT(y, x) * VAR_POP(y)";
|
93
|
+
|
94
|
+
static AggregateFunction GetFunction();
|
95
|
+
};
|
96
|
+
|
97
|
+
} // namespace duckdb
|
@@ -1,7 +1,7 @@
|
|
1
1
|
//===----------------------------------------------------------------------===//
|
2
2
|
// DuckDB
|
3
3
|
//
|
4
|
-
// duckdb/
|
4
|
+
// duckdb/core_functions/aggregate/sum_helpers.hpp
|
5
5
|
//
|
6
6
|
//
|
7
7
|
//===----------------------------------------------------------------------===//
|
@@ -1,20 +1,22 @@
|
|
1
1
|
//===----------------------------------------------------------------------===//
|
2
2
|
// DuckDB
|
3
3
|
//
|
4
|
-
// duckdb/
|
4
|
+
// duckdb/core_functions/core_functions.hpp
|
5
5
|
//
|
6
6
|
//
|
7
7
|
//===----------------------------------------------------------------------===//
|
8
8
|
|
9
9
|
#pragma once
|
10
10
|
|
11
|
-
#include "duckdb/
|
12
|
-
#include "duckdb/function/built_in_functions.hpp"
|
11
|
+
#include "duckdb/common/common.hpp"
|
13
12
|
|
14
13
|
namespace duckdb {
|
15
14
|
|
16
|
-
|
17
|
-
|
15
|
+
class Catalog;
|
16
|
+
struct CatalogTransaction;
|
17
|
+
|
18
|
+
struct CoreFunctions {
|
19
|
+
static void RegisterFunctions(Catalog &catalog, CatalogTransaction transaction);
|
18
20
|
};
|
19
21
|
|
20
22
|
} // namespace duckdb
|
@@ -0,0 +1,33 @@
|
|
1
|
+
//===----------------------------------------------------------------------===//
|
2
|
+
// DuckDB
|
3
|
+
//
|
4
|
+
// duckdb/core_functions/function_list.hpp
|
5
|
+
//
|
6
|
+
//
|
7
|
+
//===----------------------------------------------------------------------===//
|
8
|
+
|
9
|
+
#pragma once
|
10
|
+
|
11
|
+
#include "duckdb.hpp"
|
12
|
+
|
13
|
+
namespace duckdb {
|
14
|
+
|
15
|
+
typedef ScalarFunction (*get_scalar_function_t)();
|
16
|
+
typedef ScalarFunctionSet (*get_scalar_function_set_t)();
|
17
|
+
typedef AggregateFunction (*get_aggregate_function_t)();
|
18
|
+
typedef AggregateFunctionSet (*get_aggregate_function_set_t)();
|
19
|
+
|
20
|
+
struct StaticFunctionDefinition {
|
21
|
+
const char *name;
|
22
|
+
const char *parameters;
|
23
|
+
const char *description;
|
24
|
+
const char *example;
|
25
|
+
get_scalar_function_t get_function;
|
26
|
+
get_scalar_function_set_t get_function_set;
|
27
|
+
get_aggregate_function_t get_aggregate_function;
|
28
|
+
get_aggregate_function_set_t get_aggregate_function_set;
|
29
|
+
|
30
|
+
static StaticFunctionDefinition *GetFunctionList();
|
31
|
+
};
|
32
|
+
|
33
|
+
} // namespace duckdb
|
@@ -0,0 +1,52 @@
|
|
1
|
+
//===----------------------------------------------------------------------===//
|
2
|
+
// DuckDB
|
3
|
+
//
|
4
|
+
// duckdb/core_functions/scalar/bit_functions.hpp
|
5
|
+
//
|
6
|
+
//
|
7
|
+
//===----------------------------------------------------------------------===//
|
8
|
+
// This file is generated by scripts/generate_functions.py
|
9
|
+
|
10
|
+
#pragma once
|
11
|
+
|
12
|
+
#include "duckdb/function/function_set.hpp"
|
13
|
+
|
14
|
+
namespace duckdb {
|
15
|
+
|
16
|
+
struct GetBitFun {
|
17
|
+
static constexpr const char *Name = "get_bit";
|
18
|
+
static constexpr const char *Parameters = "bitstring,index";
|
19
|
+
static constexpr const char *Description = "Extracts the nth bit from bitstring; the first (leftmost) bit is indexed 0.";
|
20
|
+
static constexpr const char *Example = "get_bit('0110010'::BIT, 2)";
|
21
|
+
|
22
|
+
static ScalarFunction GetFunction();
|
23
|
+
};
|
24
|
+
|
25
|
+
struct SetBitFun {
|
26
|
+
static constexpr const char *Name = "set_bit";
|
27
|
+
static constexpr const char *Parameters = "bitstring,index,new_value";
|
28
|
+
static constexpr const char *Description = "Sets the nth bit in bitstring to newvalue; the first (leftmost) bit is indexed 0. Returns a new bitstring.";
|
29
|
+
static constexpr const char *Example = "set_bit('0110010'::BIT, 2, 0)";
|
30
|
+
|
31
|
+
static ScalarFunction GetFunction();
|
32
|
+
};
|
33
|
+
|
34
|
+
struct BitPositionFun {
|
35
|
+
static constexpr const char *Name = "bit_position";
|
36
|
+
static constexpr const char *Parameters = "substring,bitstring";
|
37
|
+
static constexpr const char *Description = "Returns first starting index of the specified substring within bits, or zero if it’s not present. The first (leftmost) bit is indexed 1";
|
38
|
+
static constexpr const char *Example = "bit_position('010'::BIT, '1110101'::BIT)";
|
39
|
+
|
40
|
+
static ScalarFunction GetFunction();
|
41
|
+
};
|
42
|
+
|
43
|
+
struct BitStringFun {
|
44
|
+
static constexpr const char *Name = "bitstring";
|
45
|
+
static constexpr const char *Parameters = "bitstring,length";
|
46
|
+
static constexpr const char *Description = "Pads the bitstring until the specified length.";
|
47
|
+
static constexpr const char *Example = "bitstring('1010'::BIT, 7)";
|
48
|
+
|
49
|
+
static ScalarFunction GetFunction();
|
50
|
+
};
|
51
|
+
|
52
|
+
} // namespace duckdb
|
@@ -0,0 +1,58 @@
|
|
1
|
+
//===----------------------------------------------------------------------===//
|
2
|
+
// DuckDB
|
3
|
+
//
|
4
|
+
// duckdb/core_functions/scalar/blob_functions.hpp
|
5
|
+
//
|
6
|
+
//
|
7
|
+
//===----------------------------------------------------------------------===//
|
8
|
+
// This file is generated by scripts/generate_functions.py
|
9
|
+
|
10
|
+
#pragma once
|
11
|
+
|
12
|
+
#include "duckdb/function/function_set.hpp"
|
13
|
+
|
14
|
+
namespace duckdb {
|
15
|
+
|
16
|
+
struct DecodeFun {
|
17
|
+
static constexpr const char *Name = "decode";
|
18
|
+
static constexpr const char *Parameters = "blob";
|
19
|
+
static constexpr const char *Description = "Convert blob to varchar. Fails if blob is not valid utf-8.";
|
20
|
+
static constexpr const char *Example = "decode('\\xC3\\xBC'::BLOB)";
|
21
|
+
|
22
|
+
static ScalarFunction GetFunction();
|
23
|
+
};
|
24
|
+
|
25
|
+
struct EncodeFun {
|
26
|
+
static constexpr const char *Name = "encode";
|
27
|
+
static constexpr const char *Parameters = "string";
|
28
|
+
static constexpr const char *Description = "Convert varchar to blob. Converts utf-8 characters into literal encoding.";
|
29
|
+
static constexpr const char *Example = "encode('my_string_with_ü')";
|
30
|
+
|
31
|
+
static ScalarFunction GetFunction();
|
32
|
+
};
|
33
|
+
|
34
|
+
struct FromBase64Fun {
|
35
|
+
static constexpr const char *Name = "from_base64";
|
36
|
+
static constexpr const char *Parameters = "string";
|
37
|
+
static constexpr const char *Description = "Convert a base64 encoded string to a character string.";
|
38
|
+
static constexpr const char *Example = "from_base64('QQ==')";
|
39
|
+
|
40
|
+
static ScalarFunction GetFunction();
|
41
|
+
};
|
42
|
+
|
43
|
+
struct ToBase64Fun {
|
44
|
+
static constexpr const char *Name = "to_base64";
|
45
|
+
static constexpr const char *Parameters = "blob";
|
46
|
+
static constexpr const char *Description = "Convert a blob to a base64 encoded string.";
|
47
|
+
static constexpr const char *Example = "base64('A'::blob)";
|
48
|
+
|
49
|
+
static ScalarFunction GetFunction();
|
50
|
+
};
|
51
|
+
|
52
|
+
struct Base64Fun {
|
53
|
+
using ALIAS = ToBase64Fun;
|
54
|
+
|
55
|
+
static constexpr const char *Name = "base64";
|
56
|
+
};
|
57
|
+
|
58
|
+
} // namespace duckdb
|