duckdb 0.7.2-dev1457.0 → 0.7.2-dev1533.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 +8 -8
- package/package.json +1 -1
- package/src/duckdb/extension/icu/icu-dateadd.cpp +2 -2
- package/src/duckdb/extension/icu/icu-datepart.cpp +3 -3
- package/src/duckdb/extension/icu/icu-datesub.cpp +2 -2
- package/src/duckdb/extension/icu/icu-datetrunc.cpp +1 -1
- package/src/duckdb/extension/icu/icu-extension.cpp +3 -3
- package/src/duckdb/extension/icu/icu-list-range.cpp +1 -1
- package/src/duckdb/extension/icu/icu-makedate.cpp +1 -1
- package/src/duckdb/extension/icu/icu-strptime.cpp +7 -7
- package/src/duckdb/extension/icu/icu-timebucket.cpp +6 -6
- package/src/duckdb/extension/icu/icu-timezone.cpp +4 -4
- package/src/duckdb/extension/json/include/json_executors.hpp +2 -2
- package/src/duckdb/extension/json/json_functions/copy_json.cpp +4 -4
- package/src/duckdb/extension/json/json_functions/json_create.cpp +3 -3
- package/src/duckdb/extension/json/json_functions/json_serialize_sql.cpp +3 -3
- package/src/duckdb/extension/json/json_functions.cpp +2 -2
- package/src/duckdb/extension/parquet/parquet-extension.cpp +28 -28
- package/src/duckdb/extension/parquet/parquet_metadata.cpp +3 -3
- package/src/duckdb/src/catalog/catalog_entry/duck_index_entry.cpp +2 -2
- package/src/duckdb/src/catalog/catalog_entry/duck_schema_entry.cpp +9 -9
- package/src/duckdb/src/catalog/catalog_entry/duck_table_entry.cpp +17 -17
- package/src/duckdb/src/catalog/catalog_entry/index_catalog_entry.cpp +3 -3
- package/src/duckdb/src/catalog/catalog_entry/scalar_macro_catalog_entry.cpp +2 -2
- package/src/duckdb/src/catalog/catalog_entry/schema_catalog_entry.cpp +2 -2
- package/src/duckdb/src/catalog/catalog_entry/sequence_catalog_entry.cpp +2 -2
- package/src/duckdb/src/catalog/catalog_entry/table_catalog_entry.cpp +5 -5
- package/src/duckdb/src/catalog/catalog_entry/type_catalog_entry.cpp +2 -2
- package/src/duckdb/src/catalog/catalog_entry/view_catalog_entry.cpp +3 -3
- package/src/duckdb/src/catalog/catalog_entry.cpp +2 -2
- package/src/duckdb/src/catalog/catalog_set.cpp +28 -28
- package/src/duckdb/src/catalog/default/default_functions.cpp +2 -1
- package/src/duckdb/src/catalog/dependency_manager.cpp +4 -4
- package/src/duckdb/src/common/enums/logical_operator_type.cpp +2 -0
- package/src/duckdb/src/common/enums/physical_operator_type.cpp +2 -0
- package/src/duckdb/src/common/hive_partitioning.cpp +1 -1
- package/src/duckdb/src/common/multi_file_reader.cpp +1 -1
- package/src/duckdb/src/common/row_operations/row_aggregate.cpp +3 -0
- package/src/duckdb/src/common/string_util.cpp +24 -2
- package/src/duckdb/src/common/tree_renderer.cpp +2 -4
- package/src/duckdb/src/common/types.cpp +3 -1
- package/src/duckdb/src/execution/column_binding_resolver.cpp +5 -5
- package/src/duckdb/src/execution/expression_executor.cpp +4 -3
- package/src/duckdb/src/execution/expression_executor_state.cpp +1 -1
- package/src/duckdb/src/execution/index/art/art.cpp +6 -8
- package/src/duckdb/src/execution/operator/aggregate/distinct_aggregate_data.cpp +7 -7
- package/src/duckdb/src/execution/operator/aggregate/grouped_aggregate_data.cpp +2 -2
- package/src/duckdb/src/execution/operator/aggregate/physical_hash_aggregate.cpp +33 -33
- package/src/duckdb/src/execution/operator/aggregate/physical_perfecthash_aggregate.cpp +13 -13
- package/src/duckdb/src/execution/operator/aggregate/physical_streaming_window.cpp +3 -3
- package/src/duckdb/src/execution/operator/aggregate/physical_ungrouped_aggregate.cpp +20 -20
- package/src/duckdb/src/execution/operator/aggregate/physical_window.cpp +12 -12
- package/src/duckdb/src/execution/operator/helper/physical_batch_collector.cpp +5 -5
- package/src/duckdb/src/execution/operator/helper/physical_explain_analyze.cpp +2 -2
- package/src/duckdb/src/execution/operator/helper/physical_limit.cpp +5 -5
- package/src/duckdb/src/execution/operator/helper/physical_limit_percent.cpp +4 -4
- package/src/duckdb/src/execution/operator/helper/physical_materialized_collector.cpp +4 -4
- package/src/duckdb/src/execution/operator/helper/physical_reservoir_sample.cpp +2 -2
- package/src/duckdb/src/execution/operator/helper/physical_streaming_limit.cpp +2 -2
- package/src/duckdb/src/execution/operator/helper/physical_streaming_sample.cpp +2 -2
- package/src/duckdb/src/execution/operator/helper/physical_vacuum.cpp +4 -4
- package/src/duckdb/src/execution/operator/join/physical_blockwise_nl_join.cpp +8 -8
- package/src/duckdb/src/execution/operator/join/physical_cross_product.cpp +3 -3
- package/src/duckdb/src/execution/operator/join/physical_delim_join.cpp +3 -3
- package/src/duckdb/src/execution/operator/join/physical_hash_join.cpp +12 -12
- package/src/duckdb/src/execution/operator/join/physical_iejoin.cpp +12 -12
- package/src/duckdb/src/execution/operator/join/physical_index_join.cpp +6 -5
- package/src/duckdb/src/execution/operator/join/physical_join.cpp +2 -2
- package/src/duckdb/src/execution/operator/join/physical_nested_loop_join.cpp +13 -13
- package/src/duckdb/src/execution/operator/join/physical_piecewise_merge_join.cpp +10 -10
- package/src/duckdb/src/execution/operator/join/physical_positional_join.cpp +3 -3
- package/src/duckdb/src/execution/operator/order/physical_order.cpp +11 -11
- package/src/duckdb/src/execution/operator/order/physical_top_n.cpp +6 -6
- package/src/duckdb/src/execution/operator/persistent/physical_batch_insert.cpp +7 -7
- package/src/duckdb/src/execution/operator/persistent/physical_copy_to_file.cpp +8 -8
- package/src/duckdb/src/execution/operator/persistent/physical_delete.cpp +5 -5
- package/src/duckdb/src/execution/operator/persistent/physical_export.cpp +1 -1
- package/src/duckdb/src/execution/operator/persistent/physical_insert.cpp +8 -8
- package/src/duckdb/src/execution/operator/persistent/physical_update.cpp +7 -7
- package/src/duckdb/src/execution/operator/projection/physical_pivot.cpp +81 -0
- package/src/duckdb/src/execution/operator/projection/physical_tableinout_function.cpp +5 -5
- package/src/duckdb/src/execution/operator/projection/physical_unnest.cpp +4 -5
- package/src/duckdb/src/execution/operator/scan/physical_column_data_scan.cpp +1 -1
- package/src/duckdb/src/execution/operator/scan/physical_positional_scan.cpp +4 -4
- package/src/duckdb/src/execution/operator/scan/physical_table_scan.cpp +7 -7
- package/src/duckdb/src/execution/operator/schema/physical_alter.cpp +1 -1
- package/src/duckdb/src/execution/operator/schema/physical_attach.cpp +1 -1
- package/src/duckdb/src/execution/operator/schema/physical_create_function.cpp +1 -1
- package/src/duckdb/src/execution/operator/schema/physical_create_index.cpp +8 -7
- package/src/duckdb/src/execution/operator/schema/physical_create_schema.cpp +1 -1
- package/src/duckdb/src/execution/operator/schema/physical_create_sequence.cpp +1 -1
- package/src/duckdb/src/execution/operator/schema/physical_create_table.cpp +1 -1
- package/src/duckdb/src/execution/operator/schema/physical_create_type.cpp +3 -3
- package/src/duckdb/src/execution/operator/schema/physical_create_view.cpp +1 -1
- package/src/duckdb/src/execution/operator/schema/physical_detach.cpp +1 -1
- package/src/duckdb/src/execution/operator/schema/physical_drop.cpp +1 -1
- package/src/duckdb/src/execution/operator/set/physical_recursive_cte.cpp +2 -2
- package/src/duckdb/src/execution/physical_operator.cpp +2 -2
- package/src/duckdb/src/execution/physical_plan/plan_aggregate.cpp +4 -4
- package/src/duckdb/src/execution/physical_plan/plan_comparison_join.cpp +2 -2
- package/src/duckdb/src/execution/physical_plan/plan_create_index.cpp +1 -1
- package/src/duckdb/src/execution/physical_plan/plan_delete.cpp +1 -1
- package/src/duckdb/src/execution/physical_plan/plan_delim_join.cpp +2 -2
- package/src/duckdb/src/execution/physical_plan/plan_distinct.cpp +4 -1
- package/src/duckdb/src/execution/physical_plan/plan_pivot.cpp +14 -0
- package/src/duckdb/src/execution/physical_plan/plan_projection.cpp +1 -1
- package/src/duckdb/src/execution/physical_plan/plan_window.cpp +8 -8
- package/src/duckdb/src/execution/physical_plan_generator.cpp +49 -42
- package/src/duckdb/src/execution/radix_partitioned_hashtable.cpp +14 -14
- package/src/duckdb/src/function/aggregate/algebraic/avg.cpp +2 -2
- package/src/duckdb/src/function/aggregate/distributive/bitstring_agg.cpp +1 -1
- package/src/duckdb/src/function/aggregate/distributive/string_agg.cpp +2 -2
- package/src/duckdb/src/function/aggregate/holistic/approximate_quantile.cpp +1 -1
- package/src/duckdb/src/function/aggregate/holistic/quantile.cpp +1 -1
- package/src/duckdb/src/function/aggregate/holistic/reservoir_quantile.cpp +1 -1
- package/src/duckdb/src/function/aggregate/nested/list.cpp +3 -3
- package/src/duckdb/src/function/cast/enum_casts.cpp +3 -3
- package/src/duckdb/src/function/cast/list_casts.cpp +2 -2
- package/src/duckdb/src/function/cast/string_cast.cpp +6 -6
- package/src/duckdb/src/function/cast/struct_cast.cpp +4 -4
- package/src/duckdb/src/function/cast/union_casts.cpp +6 -6
- package/src/duckdb/src/function/function.cpp +4 -4
- package/src/duckdb/src/function/function_binder.cpp +2 -1
- package/src/duckdb/src/function/macro_function.cpp +3 -3
- package/src/duckdb/src/function/pragma/pragma_queries.cpp +1 -1
- package/src/duckdb/src/function/pragma_function.cpp +1 -1
- package/src/duckdb/src/function/scalar/date/date_part.cpp +1 -1
- package/src/duckdb/src/function/scalar/date/strftime.cpp +6 -6
- package/src/duckdb/src/function/scalar/generic/alias.cpp +1 -1
- package/src/duckdb/src/function/scalar/generic/constant_or_null.cpp +3 -3
- package/src/duckdb/src/function/scalar/generic/current_setting.cpp +2 -2
- package/src/duckdb/src/function/scalar/generic/stats.cpp +3 -3
- package/src/duckdb/src/function/scalar/list/list_aggregates.cpp +5 -5
- package/src/duckdb/src/function/scalar/list/list_lambdas.cpp +3 -3
- package/src/duckdb/src/function/scalar/list/list_sort.cpp +3 -3
- package/src/duckdb/src/function/scalar/math/numeric.cpp +3 -3
- package/src/duckdb/src/function/scalar/math/random.cpp +2 -2
- package/src/duckdb/src/function/scalar/math/setseed.cpp +2 -2
- package/src/duckdb/src/function/scalar/operators/arithmetic.cpp +2 -2
- package/src/duckdb/src/function/scalar/sequence/nextval.cpp +4 -4
- package/src/duckdb/src/function/scalar/string/like.cpp +1 -1
- package/src/duckdb/src/function/scalar/string/regexp/regexp_extract_all.cpp +5 -5
- package/src/duckdb/src/function/scalar/string/regexp.cpp +11 -11
- package/src/duckdb/src/function/scalar/string/string_split.cpp +3 -3
- package/src/duckdb/src/function/scalar/struct/struct_extract.cpp +3 -3
- package/src/duckdb/src/function/scalar/struct/struct_pack.cpp +2 -2
- package/src/duckdb/src/function/scalar/system/aggregate_export.cpp +2 -2
- package/src/duckdb/src/function/scalar/union/union_extract.cpp +2 -2
- package/src/duckdb/src/function/scalar_macro_function.cpp +3 -3
- package/src/duckdb/src/function/table/arrow.cpp +5 -5
- package/src/duckdb/src/function/table/checkpoint.cpp +1 -1
- package/src/duckdb/src/function/table/glob.cpp +1 -1
- package/src/duckdb/src/function/table/pragma_detailed_profiling_output.cpp +1 -1
- package/src/duckdb/src/function/table/pragma_last_profiling_output.cpp +1 -1
- package/src/duckdb/src/function/table/range.cpp +5 -5
- package/src/duckdb/src/function/table/read_csv.cpp +10 -10
- package/src/duckdb/src/function/table/repeat.cpp +1 -1
- package/src/duckdb/src/function/table/system/duckdb_constraints.cpp +12 -12
- package/src/duckdb/src/function/table/system/duckdb_databases.cpp +1 -1
- package/src/duckdb/src/function/table/system/duckdb_functions.cpp +2 -2
- package/src/duckdb/src/function/table/system/duckdb_indexes.cpp +1 -1
- package/src/duckdb/src/function/table/system/duckdb_sequences.cpp +1 -1
- package/src/duckdb/src/function/table/system/duckdb_tables.cpp +2 -2
- package/src/duckdb/src/function/table/system/duckdb_views.cpp +1 -1
- package/src/duckdb/src/function/table/system/pragma_storage_info.cpp +1 -1
- package/src/duckdb/src/function/table/system/pragma_table_info.cpp +3 -3
- package/src/duckdb/src/function/table/system/test_vector_types.cpp +1 -1
- package/src/duckdb/src/function/table/table_scan.cpp +31 -31
- package/src/duckdb/src/function/table/unnest.cpp +4 -4
- package/src/duckdb/src/function/table/version/pragma_version.cpp +2 -2
- package/src/duckdb/src/function/table_macro_function.cpp +2 -2
- package/src/duckdb/src/include/duckdb/catalog/catalog.hpp +13 -0
- package/src/duckdb/src/include/duckdb/catalog/catalog_entry/duck_index_entry.hpp +2 -2
- package/src/duckdb/src/include/duckdb/catalog/catalog_entry/duck_table_entry.hpp +1 -1
- package/src/duckdb/src/include/duckdb/catalog/catalog_entry/index_catalog_entry.hpp +4 -4
- package/src/duckdb/src/include/duckdb/catalog/catalog_entry/macro_catalog_entry.hpp +3 -2
- package/src/duckdb/src/include/duckdb/catalog/catalog_entry/scalar_macro_catalog_entry.hpp +1 -1
- package/src/duckdb/src/include/duckdb/catalog/catalog_entry/schema_catalog_entry.hpp +2 -2
- package/src/duckdb/src/include/duckdb/catalog/catalog_entry/sequence_catalog_entry.hpp +2 -2
- package/src/duckdb/src/include/duckdb/catalog/catalog_entry/table_catalog_entry.hpp +2 -2
- package/src/duckdb/src/include/duckdb/catalog/catalog_entry/table_macro_catalog_entry.hpp +1 -1
- package/src/duckdb/src/include/duckdb/catalog/catalog_entry/type_catalog_entry.hpp +2 -2
- package/src/duckdb/src/include/duckdb/catalog/catalog_entry/view_catalog_entry.hpp +3 -3
- package/src/duckdb/src/include/duckdb/catalog/catalog_entry.hpp +14 -3
- package/src/duckdb/src/include/duckdb/catalog/catalog_set.hpp +5 -5
- package/src/duckdb/src/include/duckdb/common/case_insensitive_map.hpp +2 -3
- package/src/duckdb/src/include/duckdb/common/enums/logical_operator_type.hpp +1 -0
- package/src/duckdb/src/include/duckdb/common/enums/physical_operator_type.hpp +2 -0
- package/src/duckdb/src/include/duckdb/common/multi_file_reader_options.hpp +1 -1
- package/src/duckdb/src/include/duckdb/common/string_util.hpp +3 -0
- package/src/duckdb/src/include/duckdb/execution/index/art/art.hpp +1 -1
- package/src/duckdb/src/include/duckdb/execution/operator/aggregate/physical_hash_aggregate.hpp +3 -0
- package/src/duckdb/src/include/duckdb/execution/operator/aggregate/physical_perfecthash_aggregate.hpp +3 -0
- package/src/duckdb/src/include/duckdb/execution/operator/aggregate/physical_streaming_window.hpp +3 -0
- package/src/duckdb/src/include/duckdb/execution/operator/aggregate/physical_ungrouped_aggregate.hpp +3 -0
- package/src/duckdb/src/include/duckdb/execution/operator/aggregate/physical_window.hpp +3 -0
- package/src/duckdb/src/include/duckdb/execution/operator/filter/physical_filter.hpp +3 -0
- package/src/duckdb/src/include/duckdb/execution/operator/helper/physical_execute.hpp +3 -0
- package/src/duckdb/src/include/duckdb/execution/operator/helper/physical_explain_analyze.hpp +3 -0
- package/src/duckdb/src/include/duckdb/execution/operator/helper/physical_limit.hpp +3 -0
- package/src/duckdb/src/include/duckdb/execution/operator/helper/physical_limit_percent.hpp +3 -0
- package/src/duckdb/src/include/duckdb/execution/operator/helper/physical_load.hpp +3 -0
- package/src/duckdb/src/include/duckdb/execution/operator/helper/physical_pragma.hpp +3 -0
- package/src/duckdb/src/include/duckdb/execution/operator/helper/physical_prepare.hpp +3 -0
- package/src/duckdb/src/include/duckdb/execution/operator/helper/physical_reset.hpp +3 -0
- package/src/duckdb/src/include/duckdb/execution/operator/helper/physical_set.hpp +3 -0
- package/src/duckdb/src/include/duckdb/execution/operator/helper/physical_streaming_limit.hpp +3 -0
- package/src/duckdb/src/include/duckdb/execution/operator/helper/physical_streaming_sample.hpp +3 -0
- package/src/duckdb/src/include/duckdb/execution/operator/helper/physical_transaction.hpp +3 -0
- package/src/duckdb/src/include/duckdb/execution/operator/helper/physical_vacuum.hpp +3 -0
- package/src/duckdb/src/include/duckdb/execution/operator/join/physical_blockwise_nl_join.hpp +3 -0
- package/src/duckdb/src/include/duckdb/execution/operator/join/physical_cross_product.hpp +3 -0
- package/src/duckdb/src/include/duckdb/execution/operator/join/physical_delim_join.hpp +3 -0
- package/src/duckdb/src/include/duckdb/execution/operator/join/physical_hash_join.hpp +3 -0
- package/src/duckdb/src/include/duckdb/execution/operator/join/physical_iejoin.hpp +3 -0
- package/src/duckdb/src/include/duckdb/execution/operator/join/physical_index_join.hpp +3 -0
- package/src/duckdb/src/include/duckdb/execution/operator/join/physical_join.hpp +3 -0
- package/src/duckdb/src/include/duckdb/execution/operator/join/physical_nested_loop_join.hpp +3 -4
- package/src/duckdb/src/include/duckdb/execution/operator/join/physical_piecewise_merge_join.hpp +3 -0
- package/src/duckdb/src/include/duckdb/execution/operator/join/physical_positional_join.hpp +3 -0
- package/src/duckdb/src/include/duckdb/execution/operator/order/physical_order.hpp +3 -0
- package/src/duckdb/src/include/duckdb/execution/operator/order/physical_top_n.hpp +3 -0
- package/src/duckdb/src/include/duckdb/execution/operator/persistent/physical_batch_insert.hpp +3 -0
- package/src/duckdb/src/include/duckdb/execution/operator/persistent/physical_copy_to_file.hpp +3 -0
- package/src/duckdb/src/include/duckdb/execution/operator/persistent/physical_delete.hpp +3 -0
- package/src/duckdb/src/include/duckdb/execution/operator/persistent/physical_export.hpp +3 -0
- package/src/duckdb/src/include/duckdb/execution/operator/persistent/physical_insert.hpp +3 -0
- package/src/duckdb/src/include/duckdb/execution/operator/persistent/physical_update.hpp +3 -0
- package/src/duckdb/src/include/duckdb/execution/operator/projection/physical_pivot.hpp +38 -0
- package/src/duckdb/src/include/duckdb/execution/operator/projection/physical_projection.hpp +3 -0
- package/src/duckdb/src/include/duckdb/execution/operator/projection/physical_tableinout_function.hpp +4 -2
- package/src/duckdb/src/include/duckdb/execution/operator/projection/physical_unnest.hpp +3 -1
- package/src/duckdb/src/include/duckdb/execution/operator/scan/physical_column_data_scan.hpp +3 -0
- package/src/duckdb/src/include/duckdb/execution/operator/scan/physical_dummy_scan.hpp +3 -0
- package/src/duckdb/src/include/duckdb/execution/operator/scan/physical_empty_result.hpp +3 -0
- package/src/duckdb/src/include/duckdb/execution/operator/scan/physical_expression_scan.hpp +3 -0
- package/src/duckdb/src/include/duckdb/execution/operator/scan/physical_positional_scan.hpp +3 -0
- package/src/duckdb/src/include/duckdb/execution/operator/scan/physical_table_scan.hpp +3 -0
- package/src/duckdb/src/include/duckdb/execution/operator/schema/physical_alter.hpp +3 -0
- package/src/duckdb/src/include/duckdb/execution/operator/schema/physical_attach.hpp +3 -0
- package/src/duckdb/src/include/duckdb/execution/operator/schema/physical_create_function.hpp +3 -0
- package/src/duckdb/src/include/duckdb/execution/operator/schema/physical_create_index.hpp +3 -0
- package/src/duckdb/src/include/duckdb/execution/operator/schema/physical_create_schema.hpp +3 -0
- package/src/duckdb/src/include/duckdb/execution/operator/schema/physical_create_sequence.hpp +3 -0
- package/src/duckdb/src/include/duckdb/execution/operator/schema/physical_create_table.hpp +3 -0
- package/src/duckdb/src/include/duckdb/execution/operator/schema/physical_create_type.hpp +3 -0
- package/src/duckdb/src/include/duckdb/execution/operator/schema/physical_create_view.hpp +3 -0
- package/src/duckdb/src/include/duckdb/execution/operator/schema/physical_detach.hpp +3 -0
- package/src/duckdb/src/include/duckdb/execution/operator/schema/physical_drop.hpp +3 -0
- package/src/duckdb/src/include/duckdb/execution/operator/set/physical_recursive_cte.hpp +3 -0
- package/src/duckdb/src/include/duckdb/execution/operator/set/physical_union.hpp +4 -0
- package/src/duckdb/src/include/duckdb/execution/physical_operator.hpp +18 -57
- package/src/duckdb/src/include/duckdb/execution/physical_operator_states.hpp +150 -0
- package/src/duckdb/src/include/duckdb/execution/physical_plan_generator.hpp +1 -0
- package/src/duckdb/src/include/duckdb/function/cast/default_casts.hpp +11 -0
- package/src/duckdb/src/include/duckdb/function/copy_function.hpp +22 -0
- package/src/duckdb/src/include/duckdb/function/function.hpp +20 -4
- package/src/duckdb/src/include/duckdb/function/macro_function.hpp +3 -3
- package/src/duckdb/src/include/duckdb/function/pragma_function.hpp +1 -1
- package/src/duckdb/src/include/duckdb/function/scalar/nested_functions.hpp +1 -1
- package/src/duckdb/src/include/duckdb/function/scalar_function.hpp +11 -0
- package/src/duckdb/src/include/duckdb/function/scalar_macro_function.hpp +2 -2
- package/src/duckdb/src/include/duckdb/function/table_function.hpp +22 -0
- package/src/duckdb/src/include/duckdb/function/table_macro_function.hpp +3 -3
- package/src/duckdb/src/include/duckdb/main/client_config.hpp +3 -2
- package/src/duckdb/src/include/duckdb/main/settings.hpp +10 -0
- package/src/duckdb/src/include/duckdb/optimizer/rule/like_optimizations.hpp +1 -1
- package/src/duckdb/src/include/duckdb/parser/base_expression.hpp +18 -0
- package/src/duckdb/src/include/duckdb/parser/constraint.hpp +18 -0
- package/src/duckdb/src/include/duckdb/parser/constraints/check_constraint.hpp +3 -0
- package/src/duckdb/src/include/duckdb/parser/constraints/foreign_key_constraint.hpp +3 -0
- package/src/duckdb/src/include/duckdb/parser/constraints/not_null_constraint.hpp +3 -0
- package/src/duckdb/src/include/duckdb/parser/constraints/unique_constraint.hpp +3 -0
- package/src/duckdb/src/include/duckdb/parser/expression/between_expression.hpp +3 -0
- package/src/duckdb/src/include/duckdb/parser/expression/bound_expression.hpp +3 -0
- package/src/duckdb/src/include/duckdb/parser/expression/case_expression.hpp +3 -0
- package/src/duckdb/src/include/duckdb/parser/expression/cast_expression.hpp +3 -0
- package/src/duckdb/src/include/duckdb/parser/expression/collate_expression.hpp +3 -0
- package/src/duckdb/src/include/duckdb/parser/expression/columnref_expression.hpp +3 -0
- package/src/duckdb/src/include/duckdb/parser/expression/comparison_expression.hpp +3 -0
- package/src/duckdb/src/include/duckdb/parser/expression/conjunction_expression.hpp +3 -0
- package/src/duckdb/src/include/duckdb/parser/expression/constant_expression.hpp +3 -0
- package/src/duckdb/src/include/duckdb/parser/expression/default_expression.hpp +3 -0
- package/src/duckdb/src/include/duckdb/parser/expression/function_expression.hpp +3 -0
- package/src/duckdb/src/include/duckdb/parser/expression/lambda_expression.hpp +3 -0
- package/src/duckdb/src/include/duckdb/parser/expression/operator_expression.hpp +3 -0
- package/src/duckdb/src/include/duckdb/parser/expression/parameter_expression.hpp +3 -0
- package/src/duckdb/src/include/duckdb/parser/expression/positional_reference_expression.hpp +3 -0
- package/src/duckdb/src/include/duckdb/parser/expression/star_expression.hpp +3 -0
- package/src/duckdb/src/include/duckdb/parser/expression/subquery_expression.hpp +3 -0
- package/src/duckdb/src/include/duckdb/parser/expression/window_expression.hpp +3 -0
- package/src/duckdb/src/include/duckdb/parser/query_node/list.hpp +3 -0
- package/src/duckdb/src/include/duckdb/parser/query_node/recursive_cte_node.hpp +3 -0
- package/src/duckdb/src/include/duckdb/parser/query_node/select_node.hpp +3 -0
- package/src/duckdb/src/include/duckdb/parser/query_node/set_operation_node.hpp +3 -0
- package/src/duckdb/src/include/duckdb/parser/query_node.hpp +18 -0
- package/src/duckdb/src/include/duckdb/parser/sql_statement.hpp +18 -0
- package/src/duckdb/src/include/duckdb/parser/statement/alter_statement.hpp +3 -0
- package/src/duckdb/src/include/duckdb/parser/statement/attach_statement.hpp +3 -0
- package/src/duckdb/src/include/duckdb/parser/statement/call_statement.hpp +3 -0
- package/src/duckdb/src/include/duckdb/parser/statement/copy_statement.hpp +3 -0
- package/src/duckdb/src/include/duckdb/parser/statement/create_statement.hpp +3 -0
- package/src/duckdb/src/include/duckdb/parser/statement/delete_statement.hpp +3 -0
- package/src/duckdb/src/include/duckdb/parser/statement/detach_statement.hpp +3 -0
- package/src/duckdb/src/include/duckdb/parser/statement/drop_statement.hpp +3 -0
- package/src/duckdb/src/include/duckdb/parser/statement/execute_statement.hpp +3 -0
- package/src/duckdb/src/include/duckdb/parser/statement/explain_statement.hpp +3 -0
- package/src/duckdb/src/include/duckdb/parser/statement/export_statement.hpp +3 -0
- package/src/duckdb/src/include/duckdb/parser/statement/extension_statement.hpp +3 -0
- package/src/duckdb/src/include/duckdb/parser/statement/insert_statement.hpp +3 -0
- package/src/duckdb/src/include/duckdb/parser/statement/list.hpp +1 -0
- package/src/duckdb/src/include/duckdb/parser/statement/load_statement.hpp +3 -0
- package/src/duckdb/src/include/duckdb/parser/statement/logical_plan_statement.hpp +3 -0
- package/src/duckdb/src/include/duckdb/parser/statement/multi_statement.hpp +3 -0
- package/src/duckdb/src/include/duckdb/parser/statement/pragma_statement.hpp +3 -0
- package/src/duckdb/src/include/duckdb/parser/statement/prepare_statement.hpp +3 -0
- package/src/duckdb/src/include/duckdb/parser/statement/relation_statement.hpp +3 -0
- package/src/duckdb/src/include/duckdb/parser/statement/select_statement.hpp +3 -0
- package/src/duckdb/src/include/duckdb/parser/statement/set_statement.hpp +3 -0
- package/src/duckdb/src/include/duckdb/parser/statement/show_statement.hpp +3 -0
- package/src/duckdb/src/include/duckdb/parser/statement/transaction_statement.hpp +3 -0
- package/src/duckdb/src/include/duckdb/parser/statement/update_statement.hpp +3 -0
- package/src/duckdb/src/include/duckdb/parser/statement/vacuum_statement.hpp +3 -0
- package/src/duckdb/src/include/duckdb/parser/tableref/basetableref.hpp +3 -0
- package/src/duckdb/src/include/duckdb/parser/tableref/emptytableref.hpp +3 -0
- package/src/duckdb/src/include/duckdb/parser/tableref/expressionlistref.hpp +3 -0
- package/src/duckdb/src/include/duckdb/parser/tableref/joinref.hpp +3 -0
- package/src/duckdb/src/include/duckdb/parser/tableref/pivotref.hpp +14 -0
- package/src/duckdb/src/include/duckdb/parser/tableref/subqueryref.hpp +3 -0
- package/src/duckdb/src/include/duckdb/parser/tableref/table_function_ref.hpp +3 -0
- package/src/duckdb/src/include/duckdb/parser/tableref.hpp +17 -0
- package/src/duckdb/src/include/duckdb/planner/bind_context.hpp +2 -0
- package/src/duckdb/src/include/duckdb/planner/binder.hpp +2 -0
- package/src/duckdb/src/include/duckdb/planner/bound_constraint.hpp +18 -0
- package/src/duckdb/src/include/duckdb/planner/bound_query_node.hpp +17 -0
- package/src/duckdb/src/include/duckdb/planner/bound_result_modifier.hpp +5 -1
- package/src/duckdb/src/include/duckdb/planner/bound_tableref.hpp +17 -0
- package/src/duckdb/src/include/duckdb/planner/bound_tokens.hpp +1 -0
- package/src/duckdb/src/include/duckdb/planner/constraints/bound_check_constraint.hpp +3 -0
- package/src/duckdb/src/include/duckdb/planner/constraints/bound_foreign_key_constraint.hpp +3 -0
- package/src/duckdb/src/include/duckdb/planner/constraints/bound_not_null_constraint.hpp +3 -0
- package/src/duckdb/src/include/duckdb/planner/constraints/bound_unique_constraint.hpp +3 -0
- package/src/duckdb/src/include/duckdb/planner/expression/bound_aggregate_expression.hpp +4 -0
- package/src/duckdb/src/include/duckdb/planner/expression/bound_between_expression.hpp +3 -0
- package/src/duckdb/src/include/duckdb/planner/expression/bound_case_expression.hpp +3 -0
- package/src/duckdb/src/include/duckdb/planner/expression/bound_cast_expression.hpp +3 -0
- package/src/duckdb/src/include/duckdb/planner/expression/bound_columnref_expression.hpp +3 -0
- package/src/duckdb/src/include/duckdb/planner/expression/bound_comparison_expression.hpp +3 -0
- package/src/duckdb/src/include/duckdb/planner/expression/bound_conjunction_expression.hpp +3 -0
- package/src/duckdb/src/include/duckdb/planner/expression/bound_constant_expression.hpp +3 -0
- package/src/duckdb/src/include/duckdb/planner/expression/bound_default_expression.hpp +3 -0
- package/src/duckdb/src/include/duckdb/planner/expression/bound_function_expression.hpp +3 -0
- package/src/duckdb/src/include/duckdb/planner/expression/bound_lambda_expression.hpp +3 -0
- package/src/duckdb/src/include/duckdb/planner/expression/bound_lambdaref_expression.hpp +3 -0
- package/src/duckdb/src/include/duckdb/planner/expression/bound_operator_expression.hpp +3 -0
- package/src/duckdb/src/include/duckdb/planner/expression/bound_parameter_expression.hpp +3 -0
- package/src/duckdb/src/include/duckdb/planner/expression/bound_reference_expression.hpp +3 -0
- package/src/duckdb/src/include/duckdb/planner/expression/bound_subquery_expression.hpp +3 -0
- package/src/duckdb/src/include/duckdb/planner/expression/bound_unnest_expression.hpp +3 -0
- package/src/duckdb/src/include/duckdb/planner/expression/bound_window_expression.hpp +4 -1
- package/src/duckdb/src/include/duckdb/planner/expression_binder/table_function_binder.hpp +1 -1
- package/src/duckdb/src/include/duckdb/planner/expression_binder.hpp +2 -0
- package/src/duckdb/src/include/duckdb/planner/logical_operator.hpp +17 -0
- package/src/duckdb/src/include/duckdb/planner/logical_tokens.hpp +1 -0
- package/src/duckdb/src/include/duckdb/planner/operator/list.hpp +1 -0
- package/src/duckdb/src/include/duckdb/planner/operator/logical_aggregate.hpp +3 -0
- package/src/duckdb/src/include/duckdb/planner/operator/logical_any_join.hpp +3 -0
- package/src/duckdb/src/include/duckdb/planner/operator/logical_asof_join.hpp +3 -0
- package/src/duckdb/src/include/duckdb/planner/operator/logical_column_data_get.hpp +3 -0
- package/src/duckdb/src/include/duckdb/planner/operator/logical_comparison_join.hpp +3 -0
- package/src/duckdb/src/include/duckdb/planner/operator/logical_copy_to_file.hpp +3 -0
- package/src/duckdb/src/include/duckdb/planner/operator/logical_create.hpp +3 -0
- package/src/duckdb/src/include/duckdb/planner/operator/logical_create_index.hpp +3 -0
- package/src/duckdb/src/include/duckdb/planner/operator/logical_create_table.hpp +3 -0
- package/src/duckdb/src/include/duckdb/planner/operator/logical_cross_product.hpp +3 -0
- package/src/duckdb/src/include/duckdb/planner/operator/logical_cteref.hpp +3 -0
- package/src/duckdb/src/include/duckdb/planner/operator/logical_delete.hpp +3 -0
- package/src/duckdb/src/include/duckdb/planner/operator/logical_delim_get.hpp +3 -0
- package/src/duckdb/src/include/duckdb/planner/operator/logical_delim_join.hpp +3 -0
- package/src/duckdb/src/include/duckdb/planner/operator/logical_distinct.hpp +12 -4
- package/src/duckdb/src/include/duckdb/planner/operator/logical_dummy_scan.hpp +3 -0
- package/src/duckdb/src/include/duckdb/planner/operator/logical_empty_result.hpp +3 -0
- package/src/duckdb/src/include/duckdb/planner/operator/logical_execute.hpp +3 -0
- package/src/duckdb/src/include/duckdb/planner/operator/logical_explain.hpp +3 -0
- package/src/duckdb/src/include/duckdb/planner/operator/logical_export.hpp +3 -0
- package/src/duckdb/src/include/duckdb/planner/operator/logical_expression_get.hpp +3 -0
- package/src/duckdb/src/include/duckdb/planner/operator/logical_extension_operator.hpp +4 -0
- package/src/duckdb/src/include/duckdb/planner/operator/logical_filter.hpp +3 -0
- package/src/duckdb/src/include/duckdb/planner/operator/logical_get.hpp +3 -0
- package/src/duckdb/src/include/duckdb/planner/operator/logical_insert.hpp +3 -0
- package/src/duckdb/src/include/duckdb/planner/operator/logical_join.hpp +3 -0
- package/src/duckdb/src/include/duckdb/planner/operator/logical_limit.hpp +3 -0
- package/src/duckdb/src/include/duckdb/planner/operator/logical_limit_percent.hpp +3 -0
- package/src/duckdb/src/include/duckdb/planner/operator/logical_order.hpp +3 -0
- package/src/duckdb/src/include/duckdb/planner/operator/logical_pivot.hpp +36 -0
- package/src/duckdb/src/include/duckdb/planner/operator/logical_positional_join.hpp +3 -0
- package/src/duckdb/src/include/duckdb/planner/operator/logical_pragma.hpp +3 -0
- package/src/duckdb/src/include/duckdb/planner/operator/logical_prepare.hpp +3 -0
- package/src/duckdb/src/include/duckdb/planner/operator/logical_projection.hpp +3 -0
- package/src/duckdb/src/include/duckdb/planner/operator/logical_recursive_cte.hpp +9 -5
- package/src/duckdb/src/include/duckdb/planner/operator/logical_reset.hpp +3 -0
- package/src/duckdb/src/include/duckdb/planner/operator/logical_sample.hpp +3 -0
- package/src/duckdb/src/include/duckdb/planner/operator/logical_set.hpp +3 -0
- package/src/duckdb/src/include/duckdb/planner/operator/logical_set_operation.hpp +3 -0
- package/src/duckdb/src/include/duckdb/planner/operator/logical_show.hpp +3 -0
- package/src/duckdb/src/include/duckdb/planner/operator/logical_simple.hpp +3 -0
- package/src/duckdb/src/include/duckdb/planner/operator/logical_top_n.hpp +3 -0
- package/src/duckdb/src/include/duckdb/planner/operator/logical_unconditional_join.hpp +3 -0
- package/src/duckdb/src/include/duckdb/planner/operator/logical_unnest.hpp +3 -0
- package/src/duckdb/src/include/duckdb/planner/operator/logical_update.hpp +3 -0
- package/src/duckdb/src/include/duckdb/planner/operator/logical_window.hpp +3 -0
- package/src/duckdb/src/include/duckdb/planner/query_node/bound_recursive_cte_node.hpp +3 -0
- package/src/duckdb/src/include/duckdb/planner/query_node/bound_select_node.hpp +3 -0
- package/src/duckdb/src/include/duckdb/planner/query_node/bound_set_operation_node.hpp +3 -0
- package/src/duckdb/src/include/duckdb/planner/query_node/list.hpp +3 -0
- package/src/duckdb/src/include/duckdb/planner/tableref/bound_basetableref.hpp +3 -0
- package/src/duckdb/src/include/duckdb/planner/tableref/bound_cteref.hpp +3 -0
- package/src/duckdb/src/include/duckdb/planner/tableref/bound_dummytableref.hpp +3 -0
- package/src/duckdb/src/include/duckdb/planner/tableref/bound_expressionlistref.hpp +3 -0
- package/src/duckdb/src/include/duckdb/planner/tableref/bound_joinref.hpp +3 -0
- package/src/duckdb/src/include/duckdb/planner/tableref/bound_pivotref.hpp +43 -0
- package/src/duckdb/src/include/duckdb/planner/tableref/bound_pos_join_ref.hpp +3 -0
- package/src/duckdb/src/include/duckdb/planner/tableref/bound_subqueryref.hpp +3 -0
- package/src/duckdb/src/include/duckdb/planner/tableref/bound_table_function.hpp +3 -0
- package/src/duckdb/src/include/duckdb/planner/tableref/list.hpp +1 -0
- package/src/duckdb/src/include/duckdb/storage/index.hpp +15 -2
- package/src/duckdb/src/include/duckdb/storage/write_ahead_log.hpp +17 -17
- package/src/duckdb/src/include/duckdb/transaction/commit_state.hpp +1 -1
- package/src/duckdb/src/main/capi/table_function-c.cpp +9 -9
- package/src/duckdb/src/main/client_context.cpp +1 -1
- package/src/duckdb/src/main/config.cpp +1 -0
- package/src/duckdb/src/main/query_profiler.cpp +2 -2
- package/src/duckdb/src/main/relation/aggregate_relation.cpp +1 -1
- package/src/duckdb/src/main/relation/filter_relation.cpp +1 -1
- package/src/duckdb/src/main/relation/projection_relation.cpp +1 -1
- package/src/duckdb/src/main/relation.cpp +1 -1
- package/src/duckdb/src/main/settings/settings.cpp +17 -1
- package/src/duckdb/src/optimizer/column_lifetime_analyzer.cpp +3 -3
- package/src/duckdb/src/optimizer/common_aggregate_optimizer.cpp +1 -1
- package/src/duckdb/src/optimizer/cse_optimizer.cpp +1 -1
- package/src/duckdb/src/optimizer/deliminator.cpp +11 -11
- package/src/duckdb/src/optimizer/expression_heuristics.cpp +11 -11
- package/src/duckdb/src/optimizer/expression_rewriter.cpp +1 -1
- package/src/duckdb/src/optimizer/filter_combiner.cpp +40 -38
- package/src/duckdb/src/optimizer/filter_pullup.cpp +2 -2
- package/src/duckdb/src/optimizer/filter_pushdown.cpp +1 -1
- package/src/duckdb/src/optimizer/join_order/cardinality_estimator.cpp +8 -8
- package/src/duckdb/src/optimizer/join_order/join_order_optimizer.cpp +24 -24
- package/src/duckdb/src/optimizer/matcher/expression_matcher.cpp +12 -12
- package/src/duckdb/src/optimizer/pullup/pullup_filter.cpp +1 -1
- package/src/duckdb/src/optimizer/pullup/pullup_projection.cpp +2 -2
- package/src/duckdb/src/optimizer/pullup/pullup_set_operation.cpp +3 -3
- package/src/duckdb/src/optimizer/pushdown/pushdown_aggregate.cpp +3 -3
- package/src/duckdb/src/optimizer/pushdown/pushdown_filter.cpp +1 -1
- package/src/duckdb/src/optimizer/pushdown/pushdown_get.cpp +1 -1
- package/src/duckdb/src/optimizer/pushdown/pushdown_inner_join.cpp +3 -3
- package/src/duckdb/src/optimizer/pushdown/pushdown_left_join.cpp +3 -3
- package/src/duckdb/src/optimizer/pushdown/pushdown_limit.cpp +1 -1
- package/src/duckdb/src/optimizer/pushdown/pushdown_mark_join.cpp +3 -3
- package/src/duckdb/src/optimizer/pushdown/pushdown_projection.cpp +2 -2
- package/src/duckdb/src/optimizer/pushdown/pushdown_set_operation.cpp +4 -4
- package/src/duckdb/src/optimizer/pushdown/pushdown_single_join.cpp +1 -1
- package/src/duckdb/src/optimizer/regex_range_filter.cpp +2 -2
- package/src/duckdb/src/optimizer/remove_unused_columns.cpp +13 -9
- package/src/duckdb/src/optimizer/rule/arithmetic_simplification.cpp +20 -20
- package/src/duckdb/src/optimizer/rule/case_simplification.cpp +8 -8
- package/src/duckdb/src/optimizer/rule/comparison_simplification.cpp +14 -14
- package/src/duckdb/src/optimizer/rule/conjunction_simplification.cpp +5 -5
- package/src/duckdb/src/optimizer/rule/date_part_simplification.cpp +2 -2
- package/src/duckdb/src/optimizer/rule/distributivity.cpp +16 -16
- package/src/duckdb/src/optimizer/rule/empty_needle_removal.cpp +4 -5
- package/src/duckdb/src/optimizer/rule/enum_comparison.cpp +8 -9
- package/src/duckdb/src/optimizer/rule/in_clause_simplification_rule.cpp +13 -13
- package/src/duckdb/src/optimizer/rule/like_optimizations.cpp +12 -12
- package/src/duckdb/src/optimizer/rule/move_constants.cpp +31 -31
- package/src/duckdb/src/optimizer/rule/ordered_aggregate_optimizer.cpp +4 -4
- package/src/duckdb/src/optimizer/rule/regex_optimizations.cpp +10 -10
- package/src/duckdb/src/optimizer/statistics/operator/propagate_filter.cpp +9 -8
- package/src/duckdb/src/optimizer/statistics/operator/propagate_join.cpp +2 -2
- package/src/duckdb/src/optimizer/statistics_propagator.cpp +31 -20
- package/src/duckdb/src/optimizer/topn_optimizer.cpp +2 -2
- package/src/duckdb/src/optimizer/unnest_rewriter.cpp +13 -13
- package/src/duckdb/src/parser/column_definition.cpp +3 -3
- package/src/duckdb/src/parser/expression/columnref_expression.cpp +2 -5
- package/src/duckdb/src/parser/expression/conjunction_expression.cpp +1 -1
- package/src/duckdb/src/parser/expression/constant_expression.cpp +1 -1
- package/src/duckdb/src/parser/parsed_data/create_view_info.cpp +1 -1
- package/src/duckdb/src/parser/parsed_expression_iterator.cpp +20 -20
- package/src/duckdb/src/parser/parser.cpp +10 -10
- package/src/duckdb/src/parser/query_node/recursive_cte_node.cpp +4 -4
- package/src/duckdb/src/parser/query_node/select_node.cpp +10 -10
- package/src/duckdb/src/parser/query_node/set_operation_node.cpp +4 -4
- package/src/duckdb/src/parser/statement/insert_statement.cpp +1 -1
- package/src/duckdb/src/parser/statement/select_statement.cpp +2 -2
- package/src/duckdb/src/parser/transform/expression/transform_array_access.cpp +1 -1
- package/src/duckdb/src/parser/transform/expression/transform_columnref.cpp +3 -3
- package/src/duckdb/src/parser/transform/expression/transform_function.cpp +2 -42
- package/src/duckdb/src/parser/transform/expression/transform_operator.cpp +1 -1
- package/src/duckdb/src/parser/transform/helpers/transform_groupby.cpp +1 -1
- package/src/duckdb/src/parser/transform/statement/transform_create_type.cpp +0 -1
- package/src/duckdb/src/parser/transform/statement/transform_pivot_stmt.cpp +5 -2
- package/src/duckdb/src/parser/transform/statement/transform_pragma.cpp +5 -5
- package/src/duckdb/src/parser/transform/statement/transform_select_node.cpp +20 -20
- package/src/duckdb/src/parser/transform/tableref/transform_pivot.cpp +3 -3
- package/src/duckdb/src/planner/bind_context.cpp +11 -0
- package/src/duckdb/src/planner/binder/expression/bind_columnref_expression.cpp +47 -4
- package/src/duckdb/src/planner/binder/expression/bind_function_expression.cpp +5 -6
- package/src/duckdb/src/planner/binder/expression/bind_lambda.cpp +2 -2
- package/src/duckdb/src/planner/binder/expression/bind_macro_expression.cpp +3 -3
- package/src/duckdb/src/planner/binder/expression/bind_star_expression.cpp +8 -8
- package/src/duckdb/src/planner/binder/query_node/bind_select_node.cpp +23 -29
- package/src/duckdb/src/planner/binder/query_node/bind_setop_node.cpp +2 -2
- package/src/duckdb/src/planner/binder/query_node/bind_table_macro_node.cpp +1 -1
- package/src/duckdb/src/planner/binder/query_node/plan_query_node.cpp +3 -3
- package/src/duckdb/src/planner/binder/query_node/plan_recursive_cte_node.cpp +2 -3
- package/src/duckdb/src/planner/binder/query_node/plan_select_node.cpp +0 -2
- package/src/duckdb/src/planner/binder/query_node/plan_subquery.cpp +1 -1
- package/src/duckdb/src/planner/binder/statement/bind_call.cpp +3 -2
- package/src/duckdb/src/planner/binder/statement/bind_copy.cpp +1 -1
- package/src/duckdb/src/planner/binder/statement/bind_create.cpp +17 -16
- package/src/duckdb/src/planner/binder/statement/bind_create_table.cpp +7 -6
- package/src/duckdb/src/planner/binder/statement/bind_delete.cpp +3 -2
- package/src/duckdb/src/planner/binder/statement/bind_export.cpp +1 -1
- package/src/duckdb/src/planner/binder/statement/bind_extension.cpp +1 -1
- package/src/duckdb/src/planner/binder/statement/bind_insert.cpp +4 -4
- package/src/duckdb/src/planner/binder/statement/bind_set.cpp +2 -2
- package/src/duckdb/src/planner/binder/statement/bind_update.cpp +2 -1
- package/src/duckdb/src/planner/binder/statement/bind_vacuum.cpp +2 -2
- package/src/duckdb/src/planner/binder/tableref/bind_basetableref.cpp +4 -3
- package/src/duckdb/src/planner/binder/tableref/bind_pivot.cpp +303 -78
- package/src/duckdb/src/planner/binder/tableref/bind_subqueryref.cpp +4 -4
- package/src/duckdb/src/planner/binder/tableref/bind_table_function.cpp +10 -10
- package/src/duckdb/src/planner/binder/tableref/plan_joinref.cpp +6 -6
- package/src/duckdb/src/planner/binder/tableref/plan_pivotref.cpp +13 -0
- package/src/duckdb/src/planner/binder.cpp +52 -48
- package/src/duckdb/src/planner/expression/bound_aggregate_expression.cpp +8 -8
- package/src/duckdb/src/planner/expression/bound_between_expression.cpp +5 -5
- package/src/duckdb/src/planner/expression/bound_case_expression.cpp +1 -1
- package/src/duckdb/src/planner/expression/bound_cast_expression.cpp +5 -5
- package/src/duckdb/src/planner/expression/bound_columnref_expression.cpp +2 -2
- package/src/duckdb/src/planner/expression/bound_comparison_expression.cpp +3 -4
- package/src/duckdb/src/planner/expression/bound_conjunction_expression.cpp +2 -2
- package/src/duckdb/src/planner/expression/bound_constant_expression.cpp +2 -2
- package/src/duckdb/src/planner/expression/bound_function_expression.cpp +4 -4
- package/src/duckdb/src/planner/expression/bound_lambda_expression.cpp +4 -4
- package/src/duckdb/src/planner/expression/bound_lambdaref_expression.cpp +2 -2
- package/src/duckdb/src/planner/expression/bound_operator_expression.cpp +2 -2
- package/src/duckdb/src/planner/expression/bound_parameter_expression.cpp +3 -3
- package/src/duckdb/src/planner/expression/bound_reference_expression.cpp +2 -2
- package/src/duckdb/src/planner/expression/bound_unnest_expression.cpp +2 -2
- package/src/duckdb/src/planner/expression/bound_window_expression.cpp +16 -16
- package/src/duckdb/src/planner/expression_binder/alter_binder.cpp +1 -1
- package/src/duckdb/src/planner/expression_binder/base_select_binder.cpp +3 -3
- package/src/duckdb/src/planner/expression_binder/check_binder.cpp +1 -1
- package/src/duckdb/src/planner/expression_binder/constant_binder.cpp +11 -1
- package/src/duckdb/src/planner/expression_binder/group_binder.cpp +2 -2
- package/src/duckdb/src/planner/expression_binder/index_binder.cpp +1 -1
- package/src/duckdb/src/planner/expression_binder/lateral_binder.cpp +3 -3
- package/src/duckdb/src/planner/expression_binder/order_binder.cpp +3 -3
- package/src/duckdb/src/planner/expression_binder/qualify_binder.cpp +2 -1
- package/src/duckdb/src/planner/expression_binder/table_function_binder.cpp +7 -3
- package/src/duckdb/src/planner/expression_binder.cpp +24 -32
- package/src/duckdb/src/planner/expression_iterator.cpp +17 -17
- package/src/duckdb/src/planner/joinside.cpp +2 -2
- package/src/duckdb/src/planner/logical_operator.cpp +3 -0
- package/src/duckdb/src/planner/logical_operator_visitor.cpp +26 -26
- package/src/duckdb/src/planner/operator/logical_distinct.cpp +3 -1
- package/src/duckdb/src/planner/operator/logical_filter.cpp +1 -1
- package/src/duckdb/src/planner/operator/logical_join.cpp +1 -1
- package/src/duckdb/src/planner/operator/logical_pivot.cpp +35 -0
- package/src/duckdb/src/planner/operator/logical_recursive_cte.cpp +1 -1
- package/src/duckdb/src/planner/pragma_handler.cpp +2 -2
- package/src/duckdb/src/planner/subquery/flatten_dependent_join.cpp +25 -23
- package/src/duckdb/src/planner/subquery/rewrite_correlated_expressions.cpp +2 -2
- package/src/duckdb/src/planner/table_binding.cpp +8 -8
- package/src/duckdb/src/storage/checkpoint/table_data_writer.cpp +1 -1
- package/src/duckdb/src/storage/data_table.cpp +2 -1
- package/src/duckdb/src/storage/index.cpp +4 -5
- package/src/duckdb/src/storage/local_storage.cpp +2 -1
- package/src/duckdb/src/storage/table/row_group_collection.cpp +1 -1
- package/src/duckdb/src/storage/write_ahead_log.cpp +42 -42
- package/src/duckdb/src/transaction/commit_state.cpp +35 -35
- package/src/duckdb/src/transaction/duck_transaction.cpp +1 -1
- package/src/duckdb/src/transaction/rollback_state.cpp +1 -1
- package/src/duckdb/src/verification/deserialized_statement_verifier.cpp +1 -1
- package/src/duckdb/third_party/libpg_query/include/parser/gram.hpp +773 -793
- package/src/duckdb/third_party/libpg_query/include/parser/kwlist.hpp +1 -11
- package/src/duckdb/third_party/libpg_query/src_backend_parser_gram.cpp +17408 -17751
- package/src/duckdb/ub_extension_icu_third_party_icu_i18n.cpp +5 -5
- package/src/duckdb/ub_src_execution_operator_projection.cpp +2 -0
- package/src/duckdb/ub_src_execution_physical_plan.cpp +2 -0
- package/src/duckdb/ub_src_planner_binder_tableref.cpp +2 -0
- package/src/duckdb/ub_src_planner_operator.cpp +2 -0
@@ -46,7 +46,7 @@ SimpleFunction::SimpleFunction(string name_p, vector<LogicalType> arguments_p, L
|
|
46
46
|
SimpleFunction::~SimpleFunction() {
|
47
47
|
}
|
48
48
|
|
49
|
-
string SimpleFunction::ToString() {
|
49
|
+
string SimpleFunction::ToString() const {
|
50
50
|
return Function::CallToString(name, arguments);
|
51
51
|
}
|
52
52
|
|
@@ -62,11 +62,11 @@ SimpleNamedParameterFunction::SimpleNamedParameterFunction(string name_p, vector
|
|
62
62
|
SimpleNamedParameterFunction::~SimpleNamedParameterFunction() {
|
63
63
|
}
|
64
64
|
|
65
|
-
string SimpleNamedParameterFunction::ToString() {
|
65
|
+
string SimpleNamedParameterFunction::ToString() const {
|
66
66
|
return Function::CallToString(name, arguments, named_parameters);
|
67
67
|
}
|
68
68
|
|
69
|
-
bool SimpleNamedParameterFunction::HasNamedParameters() {
|
69
|
+
bool SimpleNamedParameterFunction::HasNamedParameters() const {
|
70
70
|
return !named_parameters.empty();
|
71
71
|
}
|
72
72
|
|
@@ -80,7 +80,7 @@ BaseScalarFunction::BaseScalarFunction(string name_p, vector<LogicalType> argume
|
|
80
80
|
BaseScalarFunction::~BaseScalarFunction() {
|
81
81
|
}
|
82
82
|
|
83
|
-
string BaseScalarFunction::ToString() {
|
83
|
+
string BaseScalarFunction::ToString() const {
|
84
84
|
return Function::CallToString(name, arguments, return_type);
|
85
85
|
}
|
86
86
|
|
@@ -250,7 +250,8 @@ unique_ptr<Expression> FunctionBinder::BindScalarFunction(const string &schema,
|
|
250
250
|
auto function =
|
251
251
|
Catalog::GetSystemCatalog(context).GetEntry(context, CatalogType::SCALAR_FUNCTION_ENTRY, schema, name);
|
252
252
|
D_ASSERT(function && function->type == CatalogType::SCALAR_FUNCTION_ENTRY);
|
253
|
-
return BindScalarFunction((
|
253
|
+
return BindScalarFunction(function->Cast<ScalarFunctionCatalogEntry>(), std::move(children), error, is_operator,
|
254
|
+
binder);
|
254
255
|
}
|
255
256
|
|
256
257
|
unique_ptr<Expression> FunctionBinder::BindScalarFunction(ScalarFunctionCatalogEntry &func,
|
@@ -45,7 +45,7 @@ string MacroFunction::ValidateArguments(MacroFunction ¯o_def, const string &
|
|
45
45
|
error = StringUtil::Format(
|
46
46
|
"Macro function '%s(%s)' requires ", name,
|
47
47
|
StringUtil::Join(parameters, parameters.size(), ", ", [](const unique_ptr<ParsedExpression> &p) {
|
48
|
-
return ((
|
48
|
+
return (p->Cast<ColumnRefExpression>()).column_names[0];
|
49
49
|
}));
|
50
50
|
error += parameters.size() == 1 ? "a single positional argument"
|
51
51
|
: StringUtil::Format("%i positional arguments", parameters.size());
|
@@ -69,7 +69,7 @@ string MacroFunction::ValidateArguments(MacroFunction ¯o_def, const string &
|
|
69
69
|
return error;
|
70
70
|
}
|
71
71
|
|
72
|
-
void MacroFunction::CopyProperties(MacroFunction &other) {
|
72
|
+
void MacroFunction::CopyProperties(MacroFunction &other) const {
|
73
73
|
other.type = type;
|
74
74
|
for (auto ¶m : parameters) {
|
75
75
|
other.parameters.push_back(param->Copy());
|
@@ -79,7 +79,7 @@ void MacroFunction::CopyProperties(MacroFunction &other) {
|
|
79
79
|
}
|
80
80
|
}
|
81
81
|
|
82
|
-
string MacroFunction::ToSQL(const string &schema, const string &name) {
|
82
|
+
string MacroFunction::ToSQL(const string &schema, const string &name) const {
|
83
83
|
vector<string> param_strings;
|
84
84
|
for (auto ¶m : parameters) {
|
85
85
|
param_strings.push_back(param->ToString());
|
@@ -145,7 +145,7 @@ string PragmaImportDatabase(ClientContext &context, const FunctionParameters &pa
|
|
145
145
|
query.clear();
|
146
146
|
for (auto &statement_p : copy_statements) {
|
147
147
|
D_ASSERT(statement_p->type == StatementType::COPY_STATEMENT);
|
148
|
-
auto &statement = (
|
148
|
+
auto &statement = statement_p->Cast<CopyStatement>();
|
149
149
|
auto &info = *statement.info;
|
150
150
|
auto file_name = fs.ExtractName(info.file_path);
|
151
151
|
info.file_path = fs.JoinPath(parameters.values[0].ToString(), file_name);
|
@@ -30,7 +30,7 @@ PragmaFunction PragmaFunction::PragmaStatement(const string &name, pragma_functi
|
|
30
30
|
LogicalType::INVALID);
|
31
31
|
}
|
32
32
|
|
33
|
-
string PragmaFunction::ToString() {
|
33
|
+
string PragmaFunction::ToString() const {
|
34
34
|
switch (type) {
|
35
35
|
case PragmaType::PRAGMA_STATEMENT:
|
36
36
|
return StringUtil::Format("PRAGMA %s", name);
|
@@ -1338,7 +1338,7 @@ struct StructDatePart {
|
|
1338
1338
|
|
1339
1339
|
template <typename INPUT_TYPE>
|
1340
1340
|
static void Function(DataChunk &args, ExpressionState &state, Vector &result) {
|
1341
|
-
auto &func_expr =
|
1341
|
+
auto &func_expr = state.expr.Cast<BoundFunctionExpression>();
|
1342
1342
|
auto &info = (BindData &)*func_expr.bind_info;
|
1343
1343
|
D_ASSERT(args.ColumnCount() == 1);
|
1344
1344
|
|
@@ -657,8 +657,8 @@ void StrfTimeFormat::ConvertDateVector(Vector &input, Vector &result, idx_t coun
|
|
657
657
|
|
658
658
|
template <bool REVERSED>
|
659
659
|
static void StrfTimeFunctionDate(DataChunk &args, ExpressionState &state, Vector &result) {
|
660
|
-
auto &func_expr =
|
661
|
-
auto &info =
|
660
|
+
auto &func_expr = state.expr.Cast<BoundFunctionExpression>();
|
661
|
+
auto &info = func_expr.bind_info->Cast<StrfTimeBindData>();
|
662
662
|
|
663
663
|
if (info.is_null) {
|
664
664
|
result.SetVectorType(VectorType::CONSTANT_VECTOR);
|
@@ -691,8 +691,8 @@ void StrfTimeFormat::ConvertTimestampVector(Vector &input, Vector &result, idx_t
|
|
691
691
|
|
692
692
|
template <bool REVERSED>
|
693
693
|
static void StrfTimeFunctionTimestamp(DataChunk &args, ExpressionState &state, Vector &result) {
|
694
|
-
auto &func_expr =
|
695
|
-
auto &info =
|
694
|
+
auto &func_expr = state.expr.Cast<BoundFunctionExpression>();
|
695
|
+
auto &info = func_expr.bind_info->Cast<StrfTimeBindData>();
|
696
696
|
|
697
697
|
if (info.is_null) {
|
698
698
|
result.SetVectorType(VectorType::CONSTANT_VECTOR);
|
@@ -1307,8 +1307,8 @@ timestamp_t StrpTimeFormat::ParseTimestamp(string_t input) {
|
|
1307
1307
|
}
|
1308
1308
|
|
1309
1309
|
static void StrpTimeFunction(DataChunk &args, ExpressionState &state, Vector &result) {
|
1310
|
-
auto &func_expr =
|
1311
|
-
auto &info =
|
1310
|
+
auto &func_expr = state.expr.Cast<BoundFunctionExpression>();
|
1311
|
+
auto &info = func_expr.bind_info->Cast<StrpTimeBindData>();
|
1312
1312
|
|
1313
1313
|
if (ConstantVector::IsNull(args.data[1])) {
|
1314
1314
|
result.SetVectorType(VectorType::CONSTANT_VECTOR);
|
@@ -4,7 +4,7 @@
|
|
4
4
|
namespace duckdb {
|
5
5
|
|
6
6
|
static void AliasFunction(DataChunk &args, ExpressionState &state, Vector &result) {
|
7
|
-
auto &func_expr =
|
7
|
+
auto &func_expr = state.expr.Cast<BoundFunctionExpression>();
|
8
8
|
Value v(state.expr.alias.empty() ? func_expr.children[0]->GetName() : state.expr.alias);
|
9
9
|
result.Reference(v);
|
10
10
|
}
|
@@ -23,8 +23,8 @@ public:
|
|
23
23
|
};
|
24
24
|
|
25
25
|
static void ConstantOrNullFunction(DataChunk &args, ExpressionState &state, Vector &result) {
|
26
|
-
auto &func_expr =
|
27
|
-
auto &info =
|
26
|
+
auto &func_expr = state.expr.Cast<BoundFunctionExpression>();
|
27
|
+
auto &info = func_expr.bind_info->Cast<ConstantOrNullBindData>();
|
28
28
|
result.Reference(info.value);
|
29
29
|
for (idx_t idx = 1; idx < args.ColumnCount(); idx++) {
|
30
30
|
switch (args.data[idx].GetVectorType()) {
|
@@ -78,7 +78,7 @@ bool ConstantOrNull::IsConstantOrNull(BoundFunctionExpression &expr, const Value
|
|
78
78
|
return false;
|
79
79
|
}
|
80
80
|
D_ASSERT(expr.bind_info);
|
81
|
-
auto &bind_data =
|
81
|
+
auto &bind_data = expr.bind_info->Cast<ConstantOrNullBindData>();
|
82
82
|
D_ASSERT(bind_data.value.type() == val.type());
|
83
83
|
return bind_data.value == val;
|
84
84
|
}
|
@@ -25,8 +25,8 @@ public:
|
|
25
25
|
};
|
26
26
|
|
27
27
|
static void CurrentSettingFunction(DataChunk &args, ExpressionState &state, Vector &result) {
|
28
|
-
auto &func_expr =
|
29
|
-
auto &info =
|
28
|
+
auto &func_expr = state.expr.Cast<BoundFunctionExpression>();
|
29
|
+
auto &info = func_expr.bind_info->Cast<CurrentSettingBindData>();
|
30
30
|
result.Reference(info.value);
|
31
31
|
}
|
32
32
|
|
@@ -21,8 +21,8 @@ public:
|
|
21
21
|
};
|
22
22
|
|
23
23
|
static void StatsFunction(DataChunk &args, ExpressionState &state, Vector &result) {
|
24
|
-
auto &func_expr =
|
25
|
-
auto &info =
|
24
|
+
auto &func_expr = state.expr.Cast<BoundFunctionExpression>();
|
25
|
+
auto &info = func_expr.bind_info->Cast<StatsBindData>();
|
26
26
|
if (info.stats.empty()) {
|
27
27
|
info.stats = "No statistics";
|
28
28
|
}
|
@@ -38,7 +38,7 @@ unique_ptr<FunctionData> StatsBind(ClientContext &context, ScalarFunction &bound
|
|
38
38
|
static unique_ptr<BaseStatistics> StatsPropagateStats(ClientContext &context, FunctionStatisticsInput &input) {
|
39
39
|
auto &child_stats = input.child_stats;
|
40
40
|
auto &bind_data = input.bind_data;
|
41
|
-
auto &info = (
|
41
|
+
auto &info = bind_data->Cast<StatsBindData>();
|
42
42
|
info.stats = child_stats[0].ToString();
|
43
43
|
return nullptr;
|
44
44
|
}
|
@@ -50,9 +50,9 @@ struct StateVector {
|
|
50
50
|
: count(count_p), aggr_expr(std::move(aggr_expr_p)), state_vector(Vector(LogicalType::POINTER, count_p)) {
|
51
51
|
}
|
52
52
|
|
53
|
-
~StateVector() {
|
53
|
+
~StateVector() { // NOLINT
|
54
54
|
// destroy objects within the aggregate states
|
55
|
-
auto &aggr = (
|
55
|
+
auto &aggr = aggr_expr->Cast<BoundAggregateExpression>();
|
56
56
|
if (aggr.function.destructor) {
|
57
57
|
aggr.function.destructor(state_vector, count);
|
58
58
|
}
|
@@ -157,9 +157,9 @@ static void ListAggregatesFunction(DataChunk &args, ExpressionState &state, Vect
|
|
157
157
|
}
|
158
158
|
|
159
159
|
// get the aggregate function
|
160
|
-
auto &func_expr =
|
161
|
-
auto &info =
|
162
|
-
auto &aggr =
|
160
|
+
auto &func_expr = state.expr.Cast<BoundFunctionExpression>();
|
161
|
+
auto &info = func_expr.bind_info->Cast<ListAggregatesBindData>();
|
162
|
+
auto &aggr = info.aggr_expr->Cast<BoundAggregateExpression>();
|
163
163
|
AggregateInputData aggr_input_data(aggr.bind_info.get(), Allocator::DefaultAllocator());
|
164
164
|
|
165
165
|
D_ASSERT(aggr.function.update);
|
@@ -38,7 +38,7 @@ unique_ptr<FunctionData> ListLambdaBindData::Copy() const {
|
|
38
38
|
}
|
39
39
|
|
40
40
|
bool ListLambdaBindData::Equals(const FunctionData &other_p) const {
|
41
|
-
auto &other = (
|
41
|
+
auto &other = other_p.Cast<ListLambdaBindData>();
|
42
42
|
return lambda_expr->Equals(other.lambda_expr.get()) && stype == other.stype;
|
43
43
|
}
|
44
44
|
|
@@ -166,8 +166,8 @@ static void ListLambdaFunction(DataChunk &args, ExpressionState &state, Vector &
|
|
166
166
|
auto list_entries = (list_entry_t *)lists_data.data;
|
167
167
|
|
168
168
|
// get the lambda expression
|
169
|
-
auto &func_expr =
|
170
|
-
auto &info =
|
169
|
+
auto &func_expr = state.expr.Cast<BoundFunctionExpression>();
|
170
|
+
auto &info = func_expr.bind_info->Cast<ListLambdaBindData>();
|
171
171
|
auto &lambda_expr = info.lambda_expr;
|
172
172
|
|
173
173
|
// get the child vector and child data
|
@@ -62,7 +62,7 @@ unique_ptr<FunctionData> ListSortBindData::Copy() const {
|
|
62
62
|
}
|
63
63
|
|
64
64
|
bool ListSortBindData::Equals(const FunctionData &other_p) const {
|
65
|
-
auto &other = (
|
65
|
+
auto &other = other_p.Cast<ListSortBindData>();
|
66
66
|
return order_type == other.order_type && null_order == other.null_order;
|
67
67
|
}
|
68
68
|
|
@@ -112,8 +112,8 @@ static void ListSortFunction(DataChunk &args, ExpressionState &state, Vector &re
|
|
112
112
|
return;
|
113
113
|
}
|
114
114
|
|
115
|
-
auto &func_expr =
|
116
|
-
auto &info =
|
115
|
+
auto &func_expr = state.expr.Cast<BoundFunctionExpression>();
|
116
|
+
auto &info = func_expr.bind_info->Cast<ListSortBindData>();
|
117
117
|
|
118
118
|
// initialize the global and local sorting state
|
119
119
|
auto &buffer_manager = BufferManager::GetBufferManager(info.context);
|
@@ -310,7 +310,7 @@ struct CeilOperator {
|
|
310
310
|
|
311
311
|
template <class T, class POWERS_OF_TEN, class OP>
|
312
312
|
static void GenericRoundFunctionDecimal(DataChunk &input, ExpressionState &state, Vector &result) {
|
313
|
-
auto &func_expr =
|
313
|
+
auto &func_expr = state.expr.Cast<BoundFunctionExpression>();
|
314
314
|
OP::template Operation<T, POWERS_OF_TEN>(input, DecimalType::GetScale(func_expr.children[0]->return_type), result);
|
315
315
|
}
|
316
316
|
|
@@ -519,7 +519,7 @@ struct RoundPrecisionFunctionData : public FunctionData {
|
|
519
519
|
|
520
520
|
template <class T, class POWERS_OF_TEN_CLASS>
|
521
521
|
static void DecimalRoundNegativePrecisionFunction(DataChunk &input, ExpressionState &state, Vector &result) {
|
522
|
-
auto &func_expr =
|
522
|
+
auto &func_expr = state.expr.Cast<BoundFunctionExpression>();
|
523
523
|
auto &info = (RoundPrecisionFunctionData &)*func_expr.bind_info;
|
524
524
|
auto source_scale = DecimalType::GetScale(func_expr.children[0]->return_type);
|
525
525
|
auto width = DecimalType::GetWidth(func_expr.children[0]->return_type);
|
@@ -545,7 +545,7 @@ static void DecimalRoundNegativePrecisionFunction(DataChunk &input, ExpressionSt
|
|
545
545
|
|
546
546
|
template <class T, class POWERS_OF_TEN_CLASS>
|
547
547
|
static void DecimalRoundPositivePrecisionFunction(DataChunk &input, ExpressionState &state, Vector &result) {
|
548
|
-
auto &func_expr =
|
548
|
+
auto &func_expr = state.expr.Cast<BoundFunctionExpression>();
|
549
549
|
auto &info = (RoundPrecisionFunctionData &)*func_expr.bind_info;
|
550
550
|
auto source_scale = DecimalType::GetScale(func_expr.children[0]->return_type);
|
551
551
|
T power_of_ten = POWERS_OF_TEN_CLASS::POWERS_OF_TEN[source_scale - info.target_scale];
|
@@ -18,7 +18,7 @@ struct RandomLocalState : public FunctionLocalState {
|
|
18
18
|
|
19
19
|
static void RandomFunction(DataChunk &args, ExpressionState &state, Vector &result) {
|
20
20
|
D_ASSERT(args.ColumnCount() == 0);
|
21
|
-
auto &lstate =
|
21
|
+
auto &lstate = ExecuteFunctionState::GetFunctionState(state)->Cast<RandomLocalState>();
|
22
22
|
|
23
23
|
result.SetVectorType(VectorType::FLAT_VECTOR);
|
24
24
|
auto result_data = FlatVector::GetData<double>(result);
|
@@ -43,7 +43,7 @@ void RandomFun::RegisterFunction(BuiltinFunctions &set) {
|
|
43
43
|
|
44
44
|
static void GenerateUUIDFunction(DataChunk &args, ExpressionState &state, Vector &result) {
|
45
45
|
D_ASSERT(args.ColumnCount() == 0);
|
46
|
-
auto &lstate =
|
46
|
+
auto &lstate = ExecuteFunctionState::GetFunctionState(state)->Cast<RandomLocalState>();
|
47
47
|
|
48
48
|
result.SetVectorType(VectorType::FLAT_VECTOR);
|
49
49
|
auto result_data = FlatVector::GetData<hugeint_t>(result);
|
@@ -26,8 +26,8 @@ struct SetseedBindData : public FunctionData {
|
|
26
26
|
};
|
27
27
|
|
28
28
|
static void SetSeedFunction(DataChunk &args, ExpressionState &state, Vector &result) {
|
29
|
-
auto &func_expr =
|
30
|
-
auto &info =
|
29
|
+
auto &func_expr = state.expr.Cast<BoundFunctionExpression>();
|
30
|
+
auto &info = func_expr.bind_info->Cast<SetseedBindData>();
|
31
31
|
auto &input = args.data[0];
|
32
32
|
input.Flatten(args.size());
|
33
33
|
|
@@ -122,7 +122,7 @@ struct DecimalArithmeticBindData : public FunctionData {
|
|
122
122
|
}
|
123
123
|
|
124
124
|
bool Equals(const FunctionData &other_p) const override {
|
125
|
-
auto other = (
|
125
|
+
auto other = other_p.Cast<DecimalArithmeticBindData>();
|
126
126
|
return other.check_overflow == check_overflow;
|
127
127
|
}
|
128
128
|
|
@@ -456,7 +456,7 @@ struct DecimalNegateBindData : public FunctionData {
|
|
456
456
|
}
|
457
457
|
|
458
458
|
bool Equals(const FunctionData &other_p) const override {
|
459
|
-
auto other = (
|
459
|
+
auto other = other_p.Cast<DecimalNegateBindData>();
|
460
460
|
return other.bound_type == bound_type;
|
461
461
|
}
|
462
462
|
|
@@ -26,7 +26,7 @@ struct NextvalBindData : public FunctionData {
|
|
26
26
|
}
|
27
27
|
|
28
28
|
bool Equals(const FunctionData &other_p) const override {
|
29
|
-
auto &other = (
|
29
|
+
auto &other = other_p.Cast<NextvalBindData>();
|
30
30
|
return sequence == other.sequence;
|
31
31
|
}
|
32
32
|
};
|
@@ -85,8 +85,8 @@ SequenceCatalogEntry *BindSequence(ClientContext &context, const string &name) {
|
|
85
85
|
|
86
86
|
template <class OP>
|
87
87
|
static void NextValFunction(DataChunk &args, ExpressionState &state, Vector &result) {
|
88
|
-
auto &func_expr =
|
89
|
-
auto &info =
|
88
|
+
auto &func_expr = state.expr.Cast<BoundFunctionExpression>();
|
89
|
+
auto &info = func_expr.bind_info->Cast<NextvalBindData>();
|
90
90
|
auto &input = args.data[0];
|
91
91
|
|
92
92
|
auto &context = state.GetContext();
|
@@ -127,7 +127,7 @@ static unique_ptr<FunctionData> NextValBind(ClientContext &context, ScalarFuncti
|
|
127
127
|
}
|
128
128
|
|
129
129
|
static void NextValDependency(BoundFunctionExpression &expr, DependencyList &dependencies) {
|
130
|
-
auto &info =
|
130
|
+
auto &info = expr.bind_info->Cast<NextvalBindData>();
|
131
131
|
if (info.sequence) {
|
132
132
|
dependencies.AddDependency(info.sequence);
|
133
133
|
}
|
@@ -490,7 +490,7 @@ static unique_ptr<BaseStatistics> ILikePropagateStats(ClientContext &context, Fu
|
|
490
490
|
|
491
491
|
template <class OP, bool INVERT>
|
492
492
|
static void RegularLikeFunction(DataChunk &input, ExpressionState &state, Vector &result) {
|
493
|
-
auto &func_expr =
|
493
|
+
auto &func_expr = state.expr.Cast<BoundFunctionExpression>();
|
494
494
|
if (func_expr.bind_info) {
|
495
495
|
auto &matcher = (LikeMatcher &)*func_expr.bind_info;
|
496
496
|
// use fast like matcher
|
@@ -13,7 +13,7 @@ using regexp_util::TryParseConstantPattern;
|
|
13
13
|
|
14
14
|
unique_ptr<FunctionLocalState>
|
15
15
|
RegexpExtractAll::InitLocalState(ExpressionState &state, const BoundFunctionExpression &expr, FunctionData *bind_data) {
|
16
|
-
auto &info = (
|
16
|
+
auto &info = bind_data->Cast<RegexpBaseBindData>();
|
17
17
|
if (info.constant_pattern) {
|
18
18
|
return make_uniq<RegexLocalState>(info, true);
|
19
19
|
}
|
@@ -126,7 +126,7 @@ int32_t GetGroupIndex(DataChunk &args, idx_t row, int32_t &result) {
|
|
126
126
|
duckdb_re2::RE2 &GetPattern(const RegexpBaseBindData &info, ExpressionState &state,
|
127
127
|
unique_ptr<duckdb_re2::RE2> &pattern_p) {
|
128
128
|
if (info.constant_pattern) {
|
129
|
-
auto &lstate =
|
129
|
+
auto &lstate = ExecuteFunctionState::GetFunctionState(state)->Cast<RegexLocalState>();
|
130
130
|
return lstate.constant_pattern;
|
131
131
|
}
|
132
132
|
D_ASSERT(pattern_p);
|
@@ -136,7 +136,7 @@ duckdb_re2::RE2 &GetPattern(const RegexpBaseBindData &info, ExpressionState &sta
|
|
136
136
|
RegexStringPieceArgs &GetGroupsBuffer(const RegexpBaseBindData &info, ExpressionState &state,
|
137
137
|
unique_ptr<RegexStringPieceArgs> &groups_p) {
|
138
138
|
if (info.constant_pattern) {
|
139
|
-
auto &lstate =
|
139
|
+
auto &lstate = ExecuteFunctionState::GetFunctionState(state)->Cast<RegexLocalState>();
|
140
140
|
return lstate.group_buffer;
|
141
141
|
}
|
142
142
|
D_ASSERT(groups_p);
|
@@ -144,8 +144,8 @@ RegexStringPieceArgs &GetGroupsBuffer(const RegexpBaseBindData &info, Expression
|
|
144
144
|
}
|
145
145
|
|
146
146
|
void RegexpExtractAll::Execute(DataChunk &args, ExpressionState &state, Vector &result) {
|
147
|
-
auto &func_expr =
|
148
|
-
const auto &info =
|
147
|
+
auto &func_expr = state.expr.Cast<BoundFunctionExpression>();
|
148
|
+
const auto &info = func_expr.bind_info->Cast<RegexpBaseBindData>();
|
149
149
|
|
150
150
|
auto &strings = args.data[0];
|
151
151
|
auto &patterns = args.data[1];
|
@@ -32,14 +32,14 @@ RegexpBaseBindData::~RegexpBaseBindData() {
|
|
32
32
|
}
|
33
33
|
|
34
34
|
bool RegexpBaseBindData::Equals(const FunctionData &other_p) const {
|
35
|
-
auto &other = (
|
35
|
+
auto &other = other_p.Cast<RegexpBaseBindData>();
|
36
36
|
return constant_pattern == other.constant_pattern && constant_string == other.constant_string &&
|
37
37
|
RegexOptionsEquals(options, other.options);
|
38
38
|
}
|
39
39
|
|
40
40
|
unique_ptr<FunctionLocalState> RegexInitLocalState(ExpressionState &state, const BoundFunctionExpression &expr,
|
41
41
|
FunctionData *bind_data) {
|
42
|
-
auto &info = (
|
42
|
+
auto &info = bind_data->Cast<RegexpBaseBindData>();
|
43
43
|
if (info.constant_pattern) {
|
44
44
|
return make_uniq<RegexLocalState>(info);
|
45
45
|
}
|
@@ -109,11 +109,11 @@ static void RegexpMatchesFunction(DataChunk &args, ExpressionState &state, Vecto
|
|
109
109
|
auto &strings = args.data[0];
|
110
110
|
auto &patterns = args.data[1];
|
111
111
|
|
112
|
-
auto &func_expr =
|
113
|
-
auto &info =
|
112
|
+
auto &func_expr = state.expr.Cast<BoundFunctionExpression>();
|
113
|
+
auto &info = func_expr.bind_info->Cast<RegexpMatchesBindData>();
|
114
114
|
|
115
115
|
if (info.constant_pattern) {
|
116
|
-
auto &lstate =
|
116
|
+
auto &lstate = ExecuteFunctionState::GetFunctionState(state)->Cast<RegexLocalState>();
|
117
117
|
UnaryExecutor::Execute<string_t, bool>(strings, result, args.size(), [&](string_t input) {
|
118
118
|
return OP::Operation(CreateStringPiece(input), lstate.constant_pattern);
|
119
119
|
});
|
@@ -163,15 +163,15 @@ static unique_ptr<FunctionData> RegexReplaceBind(ClientContext &context, ScalarF
|
|
163
163
|
}
|
164
164
|
|
165
165
|
static void RegexReplaceFunction(DataChunk &args, ExpressionState &state, Vector &result) {
|
166
|
-
auto &func_expr =
|
167
|
-
auto &info =
|
166
|
+
auto &func_expr = state.expr.Cast<BoundFunctionExpression>();
|
167
|
+
auto &info = func_expr.bind_info->Cast<RegexpReplaceBindData>();
|
168
168
|
|
169
169
|
auto &strings = args.data[0];
|
170
170
|
auto &patterns = args.data[1];
|
171
171
|
auto &replaces = args.data[2];
|
172
172
|
|
173
173
|
if (info.constant_pattern) {
|
174
|
-
auto &lstate =
|
174
|
+
auto &lstate = ExecuteFunctionState::GetFunctionState(state)->Cast<RegexLocalState>();
|
175
175
|
BinaryExecutor::Execute<string_t, string_t, string_t>(
|
176
176
|
strings, replaces, result, args.size(), [&](string_t input, string_t replace) {
|
177
177
|
std::string sstring = input.GetString();
|
@@ -254,13 +254,13 @@ static unique_ptr<FunctionData> RegexExtractBind(ClientContext &context, ScalarF
|
|
254
254
|
}
|
255
255
|
|
256
256
|
static void RegexExtractFunction(DataChunk &args, ExpressionState &state, Vector &result) {
|
257
|
-
auto &func_expr =
|
258
|
-
const auto &info =
|
257
|
+
auto &func_expr = state.expr.Cast<BoundFunctionExpression>();
|
258
|
+
const auto &info = func_expr.bind_info->Cast<RegexpExtractBindData>();
|
259
259
|
|
260
260
|
auto &strings = args.data[0];
|
261
261
|
auto &patterns = args.data[1];
|
262
262
|
if (info.constant_pattern) {
|
263
|
-
auto &lstate =
|
263
|
+
auto &lstate = ExecuteFunctionState::GetFunctionState(state)->Cast<RegexLocalState>();
|
264
264
|
UnaryExecutor::Execute<string_t, string_t>(strings, result, args.size(), [&](string_t input) {
|
265
265
|
return Extract(input, result, lstate.constant_pattern, info.rewrite);
|
266
266
|
});
|
@@ -159,11 +159,11 @@ static void StringSplitFunction(DataChunk &args, ExpressionState &state, Vector
|
|
159
159
|
}
|
160
160
|
|
161
161
|
static void StringSplitRegexFunction(DataChunk &args, ExpressionState &state, Vector &result) {
|
162
|
-
auto &func_expr =
|
163
|
-
auto &info =
|
162
|
+
auto &func_expr = state.expr.Cast<BoundFunctionExpression>();
|
163
|
+
auto &info = func_expr.bind_info->Cast<RegexpMatchesBindData>();
|
164
164
|
if (info.constant_pattern) {
|
165
165
|
// fast path: pre-compiled regex
|
166
|
-
auto &lstate =
|
166
|
+
auto &lstate = ExecuteFunctionState::GetFunctionState(state)->Cast<RegexLocalState>();
|
167
167
|
StringSplitExecutor<ConstantRegexpStringSplit>(args, state, result, &lstate.constant_pattern);
|
168
168
|
} else {
|
169
169
|
// slow path: have to re-compile regex for every row
|
@@ -27,8 +27,8 @@ public:
|
|
27
27
|
};
|
28
28
|
|
29
29
|
static void StructExtractFunction(DataChunk &args, ExpressionState &state, Vector &result) {
|
30
|
-
auto &func_expr =
|
31
|
-
auto &info =
|
30
|
+
auto &func_expr = state.expr.Cast<BoundFunctionExpression>();
|
31
|
+
auto &info = func_expr.bind_info->Cast<StructExtractBindData>();
|
32
32
|
|
33
33
|
// this should be guaranteed by the binder
|
34
34
|
auto &vec = args.data[0];
|
@@ -103,7 +103,7 @@ static unique_ptr<BaseStatistics> PropagateStructExtractStats(ClientContext &con
|
|
103
103
|
auto &child_stats = input.child_stats;
|
104
104
|
auto &bind_data = input.bind_data;
|
105
105
|
|
106
|
-
auto &info = (
|
106
|
+
auto &info = bind_data->Cast<StructExtractBindData>();
|
107
107
|
auto struct_child_stats = StructStats::GetChildStats(child_stats[0]);
|
108
108
|
return struct_child_stats[info.index].ToUnique();
|
109
109
|
}
|
@@ -10,8 +10,8 @@ namespace duckdb {
|
|
10
10
|
|
11
11
|
static void StructPackFunction(DataChunk &args, ExpressionState &state, Vector &result) {
|
12
12
|
#ifdef DEBUG
|
13
|
-
auto &func_expr =
|
14
|
-
auto &info =
|
13
|
+
auto &func_expr = state.expr.Cast<BoundFunctionExpression>();
|
14
|
+
auto &info = func_expr.bind_info->Cast<VariableReturnBindData>();
|
15
15
|
// this should never happen if the binder below is sane
|
16
16
|
D_ASSERT(args.ColumnCount() == StructType::GetChildTypes(info.stype).size());
|
17
17
|
#endif
|
@@ -28,8 +28,8 @@ struct ExportAggregateBindData : public FunctionData {
|
|
28
28
|
}
|
29
29
|
|
30
30
|
static ExportAggregateBindData &GetFrom(ExpressionState &state) {
|
31
|
-
auto &func_expr =
|
32
|
-
return
|
31
|
+
auto &func_expr = state.expr.Cast<BoundFunctionExpression>();
|
32
|
+
return func_expr.bind_info->Cast<ExportAggregateBindData>();
|
33
33
|
}
|
34
34
|
};
|
35
35
|
|
@@ -26,8 +26,8 @@ public:
|
|
26
26
|
};
|
27
27
|
|
28
28
|
static void UnionExtractFunction(DataChunk &args, ExpressionState &state, Vector &result) {
|
29
|
-
auto &func_expr =
|
30
|
-
auto &info =
|
29
|
+
auto &func_expr = state.expr.Cast<BoundFunctionExpression>();
|
30
|
+
auto &info = func_expr.bind_info->Cast<UnionExtractBindData>();
|
31
31
|
|
32
32
|
// this should be guaranteed by the binder
|
33
33
|
auto &vec = args.data[0];
|
@@ -21,7 +21,7 @@ ScalarMacroFunction::ScalarMacroFunction(unique_ptr<ParsedExpression> expression
|
|
21
21
|
ScalarMacroFunction::ScalarMacroFunction(void) : MacroFunction(MacroType::SCALAR_MACRO) {
|
22
22
|
}
|
23
23
|
|
24
|
-
unique_ptr<MacroFunction> ScalarMacroFunction::Copy() {
|
24
|
+
unique_ptr<MacroFunction> ScalarMacroFunction::Copy() const {
|
25
25
|
auto result = make_uniq<ScalarMacroFunction>();
|
26
26
|
result->expression = expression->Copy();
|
27
27
|
CopyProperties(*result);
|
@@ -31,7 +31,7 @@ unique_ptr<MacroFunction> ScalarMacroFunction::Copy() {
|
|
31
31
|
|
32
32
|
void RemoveQualificationRecursive(unique_ptr<ParsedExpression> &expr) {
|
33
33
|
if (expr->GetExpressionType() == ExpressionType::COLUMN_REF) {
|
34
|
-
auto &col_ref = (
|
34
|
+
auto &col_ref = expr->Cast<ColumnRefExpression>();
|
35
35
|
auto &col_names = col_ref.column_names;
|
36
36
|
if (col_names.size() == 2 && col_names[0].find(DummyBinding::DUMMY_NAME) != string::npos) {
|
37
37
|
col_names.erase(col_names.begin());
|
@@ -42,7 +42,7 @@ void RemoveQualificationRecursive(unique_ptr<ParsedExpression> &expr) {
|
|
42
42
|
}
|
43
43
|
}
|
44
44
|
|
45
|
-
string ScalarMacroFunction::ToSQL(const string &schema, const string &name) {
|
45
|
+
string ScalarMacroFunction::ToSQL(const string &schema, const string &name) const {
|
46
46
|
// In case of nested macro's we need to fix it a bit
|
47
47
|
auto expression_copy = expression->Copy();
|
48
48
|
RemoveQualificationRecursive(expression_copy);
|
@@ -288,13 +288,13 @@ unique_ptr<GlobalTableFunctionState> ArrowTableFunction::ArrowScanInitGlobal(Cli
|
|
288
288
|
unique_ptr<LocalTableFunctionState> ArrowTableFunction::ArrowScanInitLocal(ExecutionContext &context,
|
289
289
|
TableFunctionInitInput &input,
|
290
290
|
GlobalTableFunctionState *global_state_p) {
|
291
|
-
auto &global_state = (
|
291
|
+
auto &global_state = global_state_p->Cast<ArrowScanGlobalState>();
|
292
292
|
auto current_chunk = make_uniq<ArrowArrayWrapper>();
|
293
293
|
auto result = make_uniq<ArrowScanLocalState>(std::move(current_chunk));
|
294
294
|
result->column_ids = input.column_ids;
|
295
295
|
result->filters = input.filters;
|
296
296
|
if (input.CanRemoveFilterColumns()) {
|
297
|
-
auto &asgs = (
|
297
|
+
auto &asgs = global_state_p->Cast<ArrowScanGlobalState>();
|
298
298
|
result->all_columns.Initialize(context.client, asgs.scanned_types);
|
299
299
|
}
|
300
300
|
if (!ArrowScanParallelStateNext(context.client, input.bind_data, *result, global_state)) {
|
@@ -308,8 +308,8 @@ void ArrowTableFunction::ArrowScanFunction(ClientContext &context, TableFunction
|
|
308
308
|
return;
|
309
309
|
}
|
310
310
|
auto &data = (ArrowScanFunctionData &)*data_p.bind_data;
|
311
|
-
auto &state =
|
312
|
-
auto &global_state =
|
311
|
+
auto &state = data_p.local_state->Cast<ArrowScanLocalState>();
|
312
|
+
auto &global_state = data_p.global_state->Cast<ArrowScanGlobalState>();
|
313
313
|
|
314
314
|
//! Out of tuples in this chunk
|
315
315
|
if (state.chunk_offset >= (idx_t)state.chunk->arrow_array.length) {
|
@@ -340,7 +340,7 @@ unique_ptr<NodeStatistics> ArrowTableFunction::ArrowScanCardinality(ClientContex
|
|
340
340
|
idx_t ArrowTableFunction::ArrowGetBatchIndex(ClientContext &context, const FunctionData *bind_data_p,
|
341
341
|
LocalTableFunctionState *local_state,
|
342
342
|
GlobalTableFunctionState *global_state) {
|
343
|
-
auto &state = (
|
343
|
+
auto &state = local_state->Cast<ArrowScanLocalState>();
|
344
344
|
return state.batch_index;
|
345
345
|
}
|
346
346
|
|
@@ -45,7 +45,7 @@ static unique_ptr<FunctionData> CheckpointBind(ClientContext &context, TableFunc
|
|
45
45
|
|
46
46
|
template <bool FORCE>
|
47
47
|
static void TemplatedCheckpointFunction(ClientContext &context, TableFunctionInput &data_p, DataChunk &output) {
|
48
|
-
auto &bind_data =
|
48
|
+
auto &bind_data = data_p.bind_data->Cast<CheckpointBindData>();
|
49
49
|
auto &transaction_manager = TransactionManager::Get(*bind_data.db);
|
50
50
|
transaction_manager.Checkpoint(context, FORCE);
|
51
51
|
}
|