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
@@ -67,6 +67,9 @@ static unique_ptr<FunctionData> DuckDBFunctionsBind(ClientContext &context, Tabl
|
|
67
67
|
names.emplace_back("function_oid");
|
68
68
|
return_types.emplace_back(LogicalType::BIGINT);
|
69
69
|
|
70
|
+
names.emplace_back("example");
|
71
|
+
return_types.emplace_back(LogicalType::VARCHAR);
|
72
|
+
|
70
73
|
return nullptr;
|
71
74
|
}
|
72
75
|
|
@@ -105,20 +108,16 @@ struct ScalarFunctionExtractor {
|
|
105
108
|
return Value("scalar");
|
106
109
|
}
|
107
110
|
|
108
|
-
static Value GetFunctionDescription(ScalarFunctionCatalogEntry &entry, idx_t offset) {
|
109
|
-
return Value();
|
110
|
-
}
|
111
|
-
|
112
111
|
static Value GetReturnType(ScalarFunctionCatalogEntry &entry, idx_t offset) {
|
113
112
|
return Value(entry.functions.GetFunctionByOffset(offset).return_type.ToString());
|
114
113
|
}
|
115
114
|
|
116
|
-
static Value GetParameters(ScalarFunctionCatalogEntry &entry, idx_t offset) {
|
115
|
+
static vector<Value> GetParameters(ScalarFunctionCatalogEntry &entry, idx_t offset) {
|
117
116
|
vector<Value> results;
|
118
117
|
for (idx_t i = 0; i < entry.functions.GetFunctionByOffset(offset).arguments.size(); i++) {
|
119
118
|
results.emplace_back("col" + to_string(i));
|
120
119
|
}
|
121
|
-
return
|
120
|
+
return results;
|
122
121
|
}
|
123
122
|
|
124
123
|
static Value GetParameterTypes(ScalarFunctionCatalogEntry &entry, idx_t offset) {
|
@@ -154,20 +153,16 @@ struct AggregateFunctionExtractor {
|
|
154
153
|
return Value("aggregate");
|
155
154
|
}
|
156
155
|
|
157
|
-
static Value GetFunctionDescription(AggregateFunctionCatalogEntry &entry, idx_t offset) {
|
158
|
-
return Value();
|
159
|
-
}
|
160
|
-
|
161
156
|
static Value GetReturnType(AggregateFunctionCatalogEntry &entry, idx_t offset) {
|
162
157
|
return Value(entry.functions.GetFunctionByOffset(offset).return_type.ToString());
|
163
158
|
}
|
164
159
|
|
165
|
-
static Value GetParameters(AggregateFunctionCatalogEntry &entry, idx_t offset) {
|
160
|
+
static vector<Value> GetParameters(AggregateFunctionCatalogEntry &entry, idx_t offset) {
|
166
161
|
vector<Value> results;
|
167
162
|
for (idx_t i = 0; i < entry.functions.GetFunctionByOffset(offset).arguments.size(); i++) {
|
168
163
|
results.emplace_back("col" + to_string(i));
|
169
164
|
}
|
170
|
-
return
|
165
|
+
return results;
|
171
166
|
}
|
172
167
|
|
173
168
|
static Value GetParameterTypes(AggregateFunctionCatalogEntry &entry, idx_t offset) {
|
@@ -203,15 +198,11 @@ struct MacroExtractor {
|
|
203
198
|
return Value("macro");
|
204
199
|
}
|
205
200
|
|
206
|
-
static Value GetFunctionDescription(ScalarMacroCatalogEntry &entry, idx_t offset) {
|
207
|
-
return Value();
|
208
|
-
}
|
209
|
-
|
210
201
|
static Value GetReturnType(ScalarMacroCatalogEntry &entry, idx_t offset) {
|
211
202
|
return Value();
|
212
203
|
}
|
213
204
|
|
214
|
-
static Value GetParameters(ScalarMacroCatalogEntry &entry, idx_t offset) {
|
205
|
+
static vector<Value> GetParameters(ScalarMacroCatalogEntry &entry, idx_t offset) {
|
215
206
|
vector<Value> results;
|
216
207
|
for (auto ¶m : entry.function->parameters) {
|
217
208
|
D_ASSERT(param->type == ExpressionType::COLUMN_REF);
|
@@ -221,7 +212,7 @@ struct MacroExtractor {
|
|
221
212
|
for (auto ¶m_entry : entry.function->default_parameters) {
|
222
213
|
results.emplace_back(param_entry.first);
|
223
214
|
}
|
224
|
-
return
|
215
|
+
return results;
|
225
216
|
}
|
226
217
|
|
227
218
|
static Value GetParameterTypes(ScalarMacroCatalogEntry &entry, idx_t offset) {
|
@@ -259,15 +250,11 @@ struct TableMacroExtractor {
|
|
259
250
|
return Value("table_macro");
|
260
251
|
}
|
261
252
|
|
262
|
-
static Value GetFunctionDescription(TableMacroCatalogEntry &entry, idx_t offset) {
|
263
|
-
return Value();
|
264
|
-
}
|
265
|
-
|
266
253
|
static Value GetReturnType(TableMacroCatalogEntry &entry, idx_t offset) {
|
267
254
|
return Value();
|
268
255
|
}
|
269
256
|
|
270
|
-
static Value GetParameters(TableMacroCatalogEntry &entry, idx_t offset) {
|
257
|
+
static vector<Value> GetParameters(TableMacroCatalogEntry &entry, idx_t offset) {
|
271
258
|
vector<Value> results;
|
272
259
|
for (auto ¶m : entry.function->parameters) {
|
273
260
|
D_ASSERT(param->type == ExpressionType::COLUMN_REF);
|
@@ -277,7 +264,7 @@ struct TableMacroExtractor {
|
|
277
264
|
for (auto ¶m_entry : entry.function->default_parameters) {
|
278
265
|
results.emplace_back(param_entry.first);
|
279
266
|
}
|
280
|
-
return
|
267
|
+
return results;
|
281
268
|
}
|
282
269
|
|
283
270
|
static Value GetParameterTypes(TableMacroCatalogEntry &entry, idx_t offset) {
|
@@ -317,15 +304,11 @@ struct TableFunctionExtractor {
|
|
317
304
|
return Value("table");
|
318
305
|
}
|
319
306
|
|
320
|
-
static Value GetFunctionDescription(TableFunctionCatalogEntry &entry, idx_t offset) {
|
321
|
-
return Value();
|
322
|
-
}
|
323
|
-
|
324
307
|
static Value GetReturnType(TableFunctionCatalogEntry &entry, idx_t offset) {
|
325
308
|
return Value();
|
326
309
|
}
|
327
310
|
|
328
|
-
static Value GetParameters(TableFunctionCatalogEntry &entry, idx_t offset) {
|
311
|
+
static vector<Value> GetParameters(TableFunctionCatalogEntry &entry, idx_t offset) {
|
329
312
|
vector<Value> results;
|
330
313
|
auto fun = entry.functions.GetFunctionByOffset(offset);
|
331
314
|
for (idx_t i = 0; i < fun.arguments.size(); i++) {
|
@@ -334,7 +317,7 @@ struct TableFunctionExtractor {
|
|
334
317
|
for (auto ¶m : fun.named_parameters) {
|
335
318
|
results.emplace_back(param.first);
|
336
319
|
}
|
337
|
-
return
|
320
|
+
return results;
|
338
321
|
}
|
339
322
|
|
340
323
|
static Value GetParameterTypes(TableFunctionCatalogEntry &entry, idx_t offset) {
|
@@ -373,15 +356,11 @@ struct PragmaFunctionExtractor {
|
|
373
356
|
return Value("pragma");
|
374
357
|
}
|
375
358
|
|
376
|
-
static Value GetFunctionDescription(PragmaFunctionCatalogEntry &entry, idx_t offset) {
|
377
|
-
return Value();
|
378
|
-
}
|
379
|
-
|
380
359
|
static Value GetReturnType(PragmaFunctionCatalogEntry &entry, idx_t offset) {
|
381
360
|
return Value();
|
382
361
|
}
|
383
362
|
|
384
|
-
static Value GetParameters(PragmaFunctionCatalogEntry &entry, idx_t offset) {
|
363
|
+
static vector<Value> GetParameters(PragmaFunctionCatalogEntry &entry, idx_t offset) {
|
385
364
|
vector<Value> results;
|
386
365
|
auto fun = entry.functions.GetFunctionByOffset(offset);
|
387
366
|
|
@@ -391,7 +370,7 @@ struct PragmaFunctionExtractor {
|
|
391
370
|
for (auto ¶m : fun.named_parameters) {
|
392
371
|
results.emplace_back(param.first);
|
393
372
|
}
|
394
|
-
return
|
373
|
+
return results;
|
395
374
|
}
|
396
375
|
|
397
376
|
static Value GetParameterTypes(PragmaFunctionCatalogEntry &entry, idx_t offset) {
|
@@ -422,7 +401,7 @@ struct PragmaFunctionExtractor {
|
|
422
401
|
};
|
423
402
|
|
424
403
|
template <class T, class OP>
|
425
|
-
bool ExtractFunctionData(
|
404
|
+
bool ExtractFunctionData(FunctionEntry &entry, idx_t function_idx, DataChunk &output, idx_t output_offset) {
|
426
405
|
auto &function = entry.Cast<T>();
|
427
406
|
idx_t col = 0;
|
428
407
|
|
@@ -439,13 +418,18 @@ bool ExtractFunctionData(CatalogEntry &entry, idx_t function_idx, DataChunk &out
|
|
439
418
|
output.SetValue(col++, output_offset, Value(OP::GetFunctionType()));
|
440
419
|
|
441
420
|
// function_description, LogicalType::VARCHAR
|
442
|
-
output.SetValue(col++, output_offset,
|
421
|
+
output.SetValue(col++, output_offset, entry.description.empty() ? Value() : entry.description);
|
443
422
|
|
444
423
|
// return_type, LogicalType::VARCHAR
|
445
424
|
output.SetValue(col++, output_offset, OP::GetReturnType(function, function_idx));
|
446
425
|
|
447
426
|
// parameters, LogicalType::LIST(LogicalType::VARCHAR)
|
448
|
-
|
427
|
+
auto parameters = OP::GetParameters(function, function_idx);
|
428
|
+
for (idx_t param_idx = 0; param_idx < function.parameter_names.size() && param_idx < parameters.size();
|
429
|
+
param_idx++) {
|
430
|
+
parameters[param_idx] = Value(function.parameter_names[param_idx]);
|
431
|
+
}
|
432
|
+
output.SetValue(col++, output_offset, Value::LIST(LogicalType::VARCHAR, std::move(parameters)));
|
449
433
|
|
450
434
|
// parameter_types, LogicalType::LIST(LogicalType::VARCHAR)
|
451
435
|
output.SetValue(col++, output_offset, OP::GetParameterTypes(function, function_idx));
|
@@ -465,6 +449,9 @@ bool ExtractFunctionData(CatalogEntry &entry, idx_t function_idx, DataChunk &out
|
|
465
449
|
// function_oid, LogicalType::BIGINT
|
466
450
|
output.SetValue(col++, output_offset, Value::BIGINT(function.oid));
|
467
451
|
|
452
|
+
// example, LogicalType::VARCHAR
|
453
|
+
output.SetValue(col++, output_offset, entry.example.empty() ? Value() : entry.example);
|
454
|
+
|
468
455
|
return function_idx + 1 == OP::FunctionCount(function);
|
469
456
|
}
|
470
457
|
|
@@ -478,7 +465,7 @@ void DuckDBFunctionsFunction(ClientContext &context, TableFunctionInput &data_p,
|
|
478
465
|
// either fill up the chunk or return all the remaining columns
|
479
466
|
idx_t count = 0;
|
480
467
|
while (data.offset < data.entries.size() && count < STANDARD_VECTOR_SIZE) {
|
481
|
-
auto &entry = data.entries[data.offset].get();
|
468
|
+
auto &entry = data.entries[data.offset].get().Cast<FunctionEntry>();
|
482
469
|
bool finished;
|
483
470
|
|
484
471
|
switch (entry.type) {
|
@@ -1,8 +1,8 @@
|
|
1
1
|
#ifndef DUCKDB_VERSION
|
2
|
-
#define DUCKDB_VERSION "0.7.2-
|
2
|
+
#define DUCKDB_VERSION "0.7.2-dev2820"
|
3
3
|
#endif
|
4
4
|
#ifndef DUCKDB_SOURCE_ID
|
5
|
-
#define DUCKDB_SOURCE_ID "
|
5
|
+
#define DUCKDB_SOURCE_ID "fc797c18cf"
|
6
6
|
#endif
|
7
7
|
#include "duckdb/function/table/system_functions.hpp"
|
8
8
|
#include "duckdb/main/database.hpp"
|
package/src/duckdb/src/include/duckdb/catalog/catalog_entry/aggregate_function_catalog_entry.hpp
CHANGED
@@ -8,7 +8,7 @@
|
|
8
8
|
|
9
9
|
#pragma once
|
10
10
|
|
11
|
-
#include "duckdb/catalog/
|
11
|
+
#include "duckdb/catalog/catalog_entry/function_entry.hpp"
|
12
12
|
#include "duckdb/catalog/catalog_set.hpp"
|
13
13
|
#include "duckdb/function/function.hpp"
|
14
14
|
#include "duckdb/parser/parsed_data/create_aggregate_function_info.hpp"
|
@@ -16,14 +16,14 @@
|
|
16
16
|
namespace duckdb {
|
17
17
|
|
18
18
|
//! An aggregate function in the catalog
|
19
|
-
class AggregateFunctionCatalogEntry : public
|
19
|
+
class AggregateFunctionCatalogEntry : public FunctionEntry {
|
20
20
|
public:
|
21
21
|
static constexpr const CatalogType Type = CatalogType::AGGREGATE_FUNCTION_ENTRY;
|
22
22
|
static constexpr const char *Name = "aggregate function";
|
23
23
|
|
24
24
|
public:
|
25
25
|
AggregateFunctionCatalogEntry(Catalog &catalog, SchemaCatalogEntry &schema, CreateAggregateFunctionInfo &info)
|
26
|
-
:
|
26
|
+
: FunctionEntry(CatalogType::AGGREGATE_FUNCTION_ENTRY, catalog, schema, info), functions(info.functions) {
|
27
27
|
}
|
28
28
|
|
29
29
|
//! The aggregate functions
|
@@ -0,0 +1,33 @@
|
|
1
|
+
//===----------------------------------------------------------------------===//
|
2
|
+
// DuckDB
|
3
|
+
//
|
4
|
+
// duckdb/catalog/catalog_entry/function_entry.hpp
|
5
|
+
//
|
6
|
+
//
|
7
|
+
//===----------------------------------------------------------------------===//
|
8
|
+
|
9
|
+
#pragma once
|
10
|
+
|
11
|
+
#include "duckdb/catalog/standard_entry.hpp"
|
12
|
+
#include "duckdb/parser/parsed_data/create_function_info.hpp"
|
13
|
+
|
14
|
+
namespace duckdb {
|
15
|
+
|
16
|
+
//! An aggregate function in the catalog
|
17
|
+
class FunctionEntry : public StandardEntry {
|
18
|
+
public:
|
19
|
+
FunctionEntry(CatalogType type, Catalog &catalog, SchemaCatalogEntry &schema, CreateFunctionInfo &info)
|
20
|
+
: StandardEntry(type, schema, catalog, info.name) {
|
21
|
+
description = std::move(info.description);
|
22
|
+
parameter_names = std::move(info.parameter_names);
|
23
|
+
example = std::move(info.example);
|
24
|
+
}
|
25
|
+
|
26
|
+
//! The description (if any)
|
27
|
+
string description;
|
28
|
+
//! Parameter names (if any)
|
29
|
+
vector<string> parameter_names;
|
30
|
+
//! The example (if any)
|
31
|
+
string example;
|
32
|
+
};
|
33
|
+
} // namespace duckdb
|
@@ -9,14 +9,14 @@
|
|
9
9
|
#pragma once
|
10
10
|
|
11
11
|
#include "duckdb/catalog/catalog_set.hpp"
|
12
|
-
#include "duckdb/catalog/
|
12
|
+
#include "duckdb/catalog/catalog_entry/function_entry.hpp"
|
13
13
|
#include "duckdb/function/macro_function.hpp"
|
14
14
|
#include "duckdb/parser/parsed_data/create_macro_info.hpp"
|
15
15
|
|
16
16
|
namespace duckdb {
|
17
17
|
|
18
18
|
//! A macro function in the catalog
|
19
|
-
class MacroCatalogEntry : public
|
19
|
+
class MacroCatalogEntry : public FunctionEntry {
|
20
20
|
public:
|
21
21
|
MacroCatalogEntry(Catalog &catalog, SchemaCatalogEntry &schema, CreateMacroInfo &info);
|
22
22
|
|
package/src/duckdb/src/include/duckdb/catalog/catalog_entry/pragma_function_catalog_entry.hpp
CHANGED
@@ -8,7 +8,7 @@
|
|
8
8
|
|
9
9
|
#pragma once
|
10
10
|
|
11
|
-
#include "duckdb/catalog/
|
11
|
+
#include "duckdb/catalog/catalog_entry/function_entry.hpp"
|
12
12
|
#include "duckdb/function/pragma_function.hpp"
|
13
13
|
#include "duckdb/function/function_set.hpp"
|
14
14
|
|
@@ -18,7 +18,7 @@ class Catalog;
|
|
18
18
|
struct CreatePragmaFunctionInfo;
|
19
19
|
|
20
20
|
//! A table function in the catalog
|
21
|
-
class PragmaFunctionCatalogEntry : public
|
21
|
+
class PragmaFunctionCatalogEntry : public FunctionEntry {
|
22
22
|
public:
|
23
23
|
static constexpr const CatalogType Type = CatalogType::PRAGMA_FUNCTION_ENTRY;
|
24
24
|
static constexpr const char *Name = "pragma function";
|
package/src/duckdb/src/include/duckdb/catalog/catalog_entry/scalar_function_catalog_entry.hpp
CHANGED
@@ -8,7 +8,7 @@
|
|
8
8
|
|
9
9
|
#pragma once
|
10
10
|
|
11
|
-
#include "duckdb/catalog/
|
11
|
+
#include "duckdb/catalog/catalog_entry/function_entry.hpp"
|
12
12
|
#include "duckdb/catalog/catalog_set.hpp"
|
13
13
|
#include "duckdb/function/function.hpp"
|
14
14
|
#include "duckdb/parser/parsed_data/create_scalar_function_info.hpp"
|
@@ -16,7 +16,7 @@
|
|
16
16
|
namespace duckdb {
|
17
17
|
|
18
18
|
//! A table function in the catalog
|
19
|
-
class ScalarFunctionCatalogEntry : public
|
19
|
+
class ScalarFunctionCatalogEntry : public FunctionEntry {
|
20
20
|
public:
|
21
21
|
static constexpr const CatalogType Type = CatalogType::SCALAR_FUNCTION_ENTRY;
|
22
22
|
static constexpr const char *Name = "scalar function";
|
package/src/duckdb/src/include/duckdb/catalog/catalog_entry/table_function_catalog_entry.hpp
CHANGED
@@ -8,7 +8,7 @@
|
|
8
8
|
|
9
9
|
#pragma once
|
10
10
|
|
11
|
-
#include "duckdb/catalog/
|
11
|
+
#include "duckdb/catalog/catalog_entry/function_entry.hpp"
|
12
12
|
#include "duckdb/catalog/catalog_set.hpp"
|
13
13
|
#include "duckdb/function/function.hpp"
|
14
14
|
#include "duckdb/parser/parsed_data/create_table_function_info.hpp"
|
@@ -16,7 +16,7 @@
|
|
16
16
|
namespace duckdb {
|
17
17
|
|
18
18
|
//! A table function in the catalog
|
19
|
-
class TableFunctionCatalogEntry : public
|
19
|
+
class TableFunctionCatalogEntry : public FunctionEntry {
|
20
20
|
public:
|
21
21
|
static constexpr const CatalogType Type = CatalogType::TABLE_FUNCTION_ENTRY;
|
22
22
|
static constexpr const char *Name = "table function";
|
@@ -419,12 +419,16 @@ struct FSSTVector {
|
|
419
419
|
DUCKDB_API static idx_t GetCount(Vector &vector);
|
420
420
|
};
|
421
421
|
|
422
|
+
enum class MapInvalidReason : uint8_t { VALID, NULL_KEY_LIST, NULL_KEY, DUPLICATE_KEY };
|
423
|
+
|
422
424
|
struct MapVector {
|
423
425
|
DUCKDB_API static const Vector &GetKeys(const Vector &vector);
|
424
426
|
DUCKDB_API static const Vector &GetValues(const Vector &vector);
|
425
427
|
DUCKDB_API static Vector &GetKeys(Vector &vector);
|
426
428
|
DUCKDB_API static Vector &GetValues(Vector &vector);
|
427
|
-
static
|
429
|
+
DUCKDB_API static MapInvalidReason
|
430
|
+
CheckMapValidity(Vector &map, idx_t count, const SelectionVector &sel = *FlatVector::IncrementalSelectionVector());
|
431
|
+
DUCKDB_API static void MapConversionVerify(Vector &vector, idx_t count);
|
428
432
|
};
|
429
433
|
|
430
434
|
struct StructVector {
|
@@ -432,6 +436,8 @@ struct StructVector {
|
|
432
436
|
DUCKDB_API static vector<unique_ptr<Vector>> &GetEntries(Vector &vector);
|
433
437
|
};
|
434
438
|
|
439
|
+
enum class UnionInvalidReason : uint8_t { VALID, TAG_OUT_OF_RANGE, NO_MEMBERS, VALIDITY_OVERLAP };
|
440
|
+
|
435
441
|
struct UnionVector {
|
436
442
|
// Unions are stored as structs, but the first child is always the "tag"
|
437
443
|
// vector, specifying the currently selected member for that row.
|
@@ -465,6 +471,10 @@ struct UnionVector {
|
|
465
471
|
//! This will also handle invalidation of the non-selected members
|
466
472
|
DUCKDB_API static void SetToMember(Vector &vector, union_tag_t tag, Vector &member_vector, idx_t count,
|
467
473
|
bool keep_tags_for_null);
|
474
|
+
|
475
|
+
DUCKDB_API static UnionInvalidReason
|
476
|
+
CheckUnionValidity(Vector &vector, idx_t count,
|
477
|
+
const SelectionVector &sel = *FlatVector::IncrementalSelectionVector());
|
468
478
|
};
|
469
479
|
|
470
480
|
struct SequenceVector {
|
package/src/duckdb/src/include/duckdb/{function → core_functions}/aggregate/algebraic/corr.hpp
RENAMED
@@ -1,7 +1,7 @@
|
|
1
1
|
//===----------------------------------------------------------------------===//
|
2
2
|
// DuckDB
|
3
3
|
//
|
4
|
-
// duckdb/
|
4
|
+
// duckdb/core_functions/aggregate/algebraic/corr.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
|
|
package/src/duckdb/src/include/duckdb/{function → core_functions}/aggregate/algebraic/covar.hpp
RENAMED
@@ -1,7 +1,7 @@
|
|
1
1
|
//===----------------------------------------------------------------------===//
|
2
2
|
// DuckDB
|
3
3
|
//
|
4
|
-
// duckdb/
|
4
|
+
// duckdb/core_functions/aggregate/algebraic/covar.hpp
|
5
5
|
//
|
6
6
|
//
|
7
7
|
//===----------------------------------------------------------------------===//
|
package/src/duckdb/src/include/duckdb/{function → core_functions}/aggregate/algebraic/stddev.hpp
RENAMED
@@ -1,7 +1,7 @@
|
|
1
1
|
//===----------------------------------------------------------------------===//
|
2
2
|
// DuckDB
|
3
3
|
//
|
4
|
-
// duckdb/
|
4
|
+
// duckdb/core_functions/aggregate/algebraic/stddev.hpp
|
5
5
|
//
|
6
6
|
//
|
7
7
|
//===----------------------------------------------------------------------===//
|
@@ -0,0 +1,124 @@
|
|
1
|
+
//===----------------------------------------------------------------------===//
|
2
|
+
// DuckDB
|
3
|
+
//
|
4
|
+
// duckdb/core_functions/aggregate/algebraic_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 AvgFun {
|
17
|
+
static constexpr const char *Name = "avg";
|
18
|
+
static constexpr const char *Parameters = "x";
|
19
|
+
static constexpr const char *Description = "Calculates the average value for all tuples in x.";
|
20
|
+
static constexpr const char *Example = "SUM(x) / COUNT(*)";
|
21
|
+
|
22
|
+
static AggregateFunctionSet GetFunctions();
|
23
|
+
};
|
24
|
+
|
25
|
+
struct MeanFun {
|
26
|
+
using ALIAS = AvgFun;
|
27
|
+
|
28
|
+
static constexpr const char *Name = "mean";
|
29
|
+
};
|
30
|
+
|
31
|
+
struct CorrFun {
|
32
|
+
static constexpr const char *Name = "corr";
|
33
|
+
static constexpr const char *Parameters = "y,x";
|
34
|
+
static constexpr const char *Description = "Returns the correlation coefficient for non-null pairs in a group.";
|
35
|
+
static constexpr const char *Example = "COVAR_POP(y, x) / (STDDEV_POP(x) * STDDEV_POP(y))";
|
36
|
+
|
37
|
+
static AggregateFunction GetFunction();
|
38
|
+
};
|
39
|
+
|
40
|
+
struct CovarPopFun {
|
41
|
+
static constexpr const char *Name = "covar_pop";
|
42
|
+
static constexpr const char *Parameters = "y,x";
|
43
|
+
static constexpr const char *Description = "Returns the population covariance of input values.";
|
44
|
+
static constexpr const char *Example = "(SUM(x*y) - SUM(x) * SUM(y) / COUNT(*)) / COUNT(*)";
|
45
|
+
|
46
|
+
static AggregateFunction GetFunction();
|
47
|
+
};
|
48
|
+
|
49
|
+
struct CovarSampFun {
|
50
|
+
static constexpr const char *Name = "covar_samp";
|
51
|
+
static constexpr const char *Parameters = "y,x";
|
52
|
+
static constexpr const char *Description = "Returns the sample covariance for non-null pairs in a group.";
|
53
|
+
static constexpr const char *Example = "(SUM(x*y) - SUM(x) * SUM(y) / COUNT(*)) / (COUNT(*) - 1)";
|
54
|
+
|
55
|
+
static AggregateFunction GetFunction();
|
56
|
+
};
|
57
|
+
|
58
|
+
struct FAvgFun {
|
59
|
+
static constexpr const char *Name = "favg";
|
60
|
+
static constexpr const char *Parameters = "x";
|
61
|
+
static constexpr const char *Description = "Calculates the average using a more accurate floating point summation (Kahan Sum)";
|
62
|
+
static constexpr const char *Example = "favg(A)";
|
63
|
+
|
64
|
+
static AggregateFunction GetFunction();
|
65
|
+
};
|
66
|
+
|
67
|
+
struct StandardErrorOfTheMeanFun {
|
68
|
+
static constexpr const char *Name = "sem";
|
69
|
+
static constexpr const char *Parameters = "x";
|
70
|
+
static constexpr const char *Description = "Returns the standard error of the mean";
|
71
|
+
static constexpr const char *Example = "";
|
72
|
+
|
73
|
+
static AggregateFunction GetFunction();
|
74
|
+
};
|
75
|
+
|
76
|
+
struct StdDevPopFun {
|
77
|
+
static constexpr const char *Name = "stddev_pop";
|
78
|
+
static constexpr const char *Parameters = "x";
|
79
|
+
static constexpr const char *Description = "Returns the population standard deviation.";
|
80
|
+
static constexpr const char *Example = "sqrt(var_pop(x))";
|
81
|
+
|
82
|
+
static AggregateFunction GetFunction();
|
83
|
+
};
|
84
|
+
|
85
|
+
struct StdDevSampFun {
|
86
|
+
static constexpr const char *Name = "stddev_samp";
|
87
|
+
static constexpr const char *Parameters = "x";
|
88
|
+
static constexpr const char *Description = "Returns the sample standard deviation";
|
89
|
+
static constexpr const char *Example = "sqrt(var_samp(x))";
|
90
|
+
|
91
|
+
static AggregateFunction GetFunction();
|
92
|
+
};
|
93
|
+
|
94
|
+
struct StddevFun {
|
95
|
+
using ALIAS = StdDevSampFun;
|
96
|
+
|
97
|
+
static constexpr const char *Name = "stddev";
|
98
|
+
};
|
99
|
+
|
100
|
+
struct VarPopFun {
|
101
|
+
static constexpr const char *Name = "var_pop";
|
102
|
+
static constexpr const char *Parameters = "x";
|
103
|
+
static constexpr const char *Description = "Returns the population variance.";
|
104
|
+
static constexpr const char *Example = "";
|
105
|
+
|
106
|
+
static AggregateFunction GetFunction();
|
107
|
+
};
|
108
|
+
|
109
|
+
struct VarSampFun {
|
110
|
+
static constexpr const char *Name = "var_samp";
|
111
|
+
static constexpr const char *Parameters = "x";
|
112
|
+
static constexpr const char *Description = "Returns the sample variance of all input values.";
|
113
|
+
static constexpr const char *Example = "(SUM(x^2) - SUM(x)^2 / COUNT(x)) / (COUNT(x) - 1)";
|
114
|
+
|
115
|
+
static AggregateFunction GetFunction();
|
116
|
+
};
|
117
|
+
|
118
|
+
struct VarianceFun {
|
119
|
+
using ALIAS = VarSampFun;
|
120
|
+
|
121
|
+
static constexpr const char *Name = "variance";
|
122
|
+
};
|
123
|
+
|
124
|
+
} // namespace duckdb
|