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
@@ -16,6 +16,9 @@ namespace duckdb {
|
|
16
16
|
class LogicalPositionalJoin : public LogicalUnconditionalJoin {
|
17
17
|
LogicalPositionalJoin() : LogicalUnconditionalJoin(LogicalOperatorType::LOGICAL_POSITIONAL_JOIN) {};
|
18
18
|
|
19
|
+
public:
|
20
|
+
static constexpr const LogicalOperatorType TYPE = LogicalOperatorType::LOGICAL_POSITIONAL_JOIN;
|
21
|
+
|
19
22
|
public:
|
20
23
|
LogicalPositionalJoin(unique_ptr<LogicalOperator> left, unique_ptr<LogicalOperator> right);
|
21
24
|
|
@@ -16,6 +16,9 @@ namespace duckdb {
|
|
16
16
|
|
17
17
|
//! LogicalSimple represents a simple logical operator that only passes on the parse info
|
18
18
|
class LogicalPragma : public LogicalOperator {
|
19
|
+
public:
|
20
|
+
static constexpr const LogicalOperatorType TYPE = LogicalOperatorType::LOGICAL_PRAGMA;
|
21
|
+
|
19
22
|
public:
|
20
23
|
LogicalPragma(PragmaFunction function_p, PragmaInfo info_p)
|
21
24
|
: LogicalOperator(LogicalOperatorType::LOGICAL_PRAGMA), function(std::move(function_p)),
|
@@ -18,6 +18,9 @@ namespace duckdb {
|
|
18
18
|
class TableCatalogEntry;
|
19
19
|
|
20
20
|
class LogicalPrepare : public LogicalOperator {
|
21
|
+
public:
|
22
|
+
static constexpr const LogicalOperatorType TYPE = LogicalOperatorType::LOGICAL_PREPARE;
|
23
|
+
|
21
24
|
public:
|
22
25
|
LogicalPrepare(string name, shared_ptr<PreparedStatementData> prepared, unique_ptr<LogicalOperator> logical_plan)
|
23
26
|
: LogicalOperator(LogicalOperatorType::LOGICAL_PREPARE), name(name), prepared(std::move(prepared)) {
|
@@ -14,6 +14,9 @@ namespace duckdb {
|
|
14
14
|
|
15
15
|
//! LogicalProjection represents the projection list in a SELECT clause
|
16
16
|
class LogicalProjection : public LogicalOperator {
|
17
|
+
public:
|
18
|
+
static constexpr const LogicalOperatorType TYPE = LogicalOperatorType::LOGICAL_PROJECTION;
|
19
|
+
|
17
20
|
public:
|
18
21
|
LogicalProjection(idx_t table_index, vector<unique_ptr<Expression>> select_list);
|
19
22
|
|
@@ -13,15 +13,19 @@
|
|
13
13
|
namespace duckdb {
|
14
14
|
|
15
15
|
class LogicalRecursiveCTE : public LogicalOperator {
|
16
|
-
LogicalRecursiveCTE(idx_t table_index, idx_t column_count, bool union_all
|
17
|
-
: LogicalOperator(
|
16
|
+
LogicalRecursiveCTE(idx_t table_index, idx_t column_count, bool union_all)
|
17
|
+
: LogicalOperator(LogicalOperatorType::LOGICAL_RECURSIVE_CTE), union_all(union_all), table_index(table_index),
|
18
|
+
column_count(column_count) {
|
18
19
|
}
|
19
20
|
|
21
|
+
public:
|
22
|
+
static constexpr const LogicalOperatorType TYPE = LogicalOperatorType::LOGICAL_RECURSIVE_CTE;
|
23
|
+
|
20
24
|
public:
|
21
25
|
LogicalRecursiveCTE(idx_t table_index, idx_t column_count, bool union_all, unique_ptr<LogicalOperator> top,
|
22
|
-
unique_ptr<LogicalOperator> bottom
|
23
|
-
: LogicalOperator(
|
24
|
-
|
26
|
+
unique_ptr<LogicalOperator> bottom)
|
27
|
+
: LogicalOperator(LogicalOperatorType::LOGICAL_RECURSIVE_CTE), union_all(union_all), table_index(table_index),
|
28
|
+
column_count(column_count) {
|
25
29
|
children.push_back(std::move(top));
|
26
30
|
children.push_back(std::move(bottom));
|
27
31
|
}
|
@@ -16,6 +16,9 @@
|
|
16
16
|
namespace duckdb {
|
17
17
|
|
18
18
|
class LogicalReset : public LogicalOperator {
|
19
|
+
public:
|
20
|
+
static constexpr const LogicalOperatorType TYPE = LogicalOperatorType::LOGICAL_RESET;
|
21
|
+
|
19
22
|
public:
|
20
23
|
LogicalReset(std::string name_p, SetScope scope_p)
|
21
24
|
: LogicalOperator(LogicalOperatorType::LOGICAL_RESET), name(name_p), scope(scope_p) {
|
@@ -15,6 +15,9 @@ namespace duckdb {
|
|
15
15
|
|
16
16
|
//! LogicalSample represents a SAMPLE clause
|
17
17
|
class LogicalSample : public LogicalOperator {
|
18
|
+
public:
|
19
|
+
static constexpr const LogicalOperatorType TYPE = LogicalOperatorType::LOGICAL_SAMPLE;
|
20
|
+
|
18
21
|
public:
|
19
22
|
LogicalSample(unique_ptr<SampleOptions> sample_options_p, unique_ptr<LogicalOperator> child);
|
20
23
|
|
@@ -16,6 +16,9 @@
|
|
16
16
|
namespace duckdb {
|
17
17
|
|
18
18
|
class LogicalSet : public LogicalOperator {
|
19
|
+
public:
|
20
|
+
static constexpr const LogicalOperatorType TYPE = LogicalOperatorType::LOGICAL_SET;
|
21
|
+
|
19
22
|
public:
|
20
23
|
LogicalSet(std::string name_p, Value value_p, SetScope scope_p)
|
21
24
|
: LogicalOperator(LogicalOperatorType::LOGICAL_SET), name(name_p), value(value_p), scope(scope_p) {
|
@@ -17,6 +17,9 @@ class LogicalSetOperation : public LogicalOperator {
|
|
17
17
|
: LogicalOperator(type), table_index(table_index), column_count(column_count) {
|
18
18
|
}
|
19
19
|
|
20
|
+
public:
|
21
|
+
static constexpr const LogicalOperatorType TYPE = LogicalOperatorType::LOGICAL_INVALID;
|
22
|
+
|
20
23
|
public:
|
21
24
|
LogicalSetOperation(idx_t table_index, idx_t column_count, unique_ptr<LogicalOperator> top,
|
22
25
|
unique_ptr<LogicalOperator> bottom, LogicalOperatorType type)
|
@@ -15,6 +15,9 @@ namespace duckdb {
|
|
15
15
|
class LogicalShow : public LogicalOperator {
|
16
16
|
LogicalShow() : LogicalOperator(LogicalOperatorType::LOGICAL_SHOW) {};
|
17
17
|
|
18
|
+
public:
|
19
|
+
static constexpr const LogicalOperatorType TYPE = LogicalOperatorType::LOGICAL_SHOW;
|
20
|
+
|
18
21
|
public:
|
19
22
|
explicit LogicalShow(unique_ptr<LogicalOperator> plan) : LogicalOperator(LogicalOperatorType::LOGICAL_SHOW) {
|
20
23
|
children.push_back(std::move(plan));
|
@@ -16,6 +16,9 @@ namespace duckdb {
|
|
16
16
|
|
17
17
|
//! LogicalSimple represents a simple logical operator that only passes on the parse info
|
18
18
|
class LogicalSimple : public LogicalOperator {
|
19
|
+
public:
|
20
|
+
static constexpr const LogicalOperatorType TYPE = LogicalOperatorType::LOGICAL_INVALID;
|
21
|
+
|
19
22
|
public:
|
20
23
|
LogicalSimple(LogicalOperatorType type, unique_ptr<ParseInfo> info) : LogicalOperator(type), info(std::move(info)) {
|
21
24
|
}
|
@@ -15,6 +15,9 @@ namespace duckdb {
|
|
15
15
|
|
16
16
|
//! LogicalTopN represents a comibination of ORDER BY and LIMIT clause, using Min/Max Heap
|
17
17
|
class LogicalTopN : public LogicalOperator {
|
18
|
+
public:
|
19
|
+
static constexpr const LogicalOperatorType TYPE = LogicalOperatorType::LOGICAL_TOP_N;
|
20
|
+
|
18
21
|
public:
|
19
22
|
LogicalTopN(vector<BoundOrderByNode> orders, int64_t limit, int64_t offset)
|
20
23
|
: LogicalOperator(LogicalOperatorType::LOGICAL_TOP_N), orders(std::move(orders)), limit(limit), offset(offset) {
|
@@ -15,6 +15,9 @@ namespace duckdb {
|
|
15
15
|
//! LogicalUnconditionalJoin represents a join between two relations
|
16
16
|
//! where the join condition is implicit (cross product, position, etc.)
|
17
17
|
class LogicalUnconditionalJoin : public LogicalOperator {
|
18
|
+
public:
|
19
|
+
static constexpr const LogicalOperatorType TYPE = LogicalOperatorType::LOGICAL_INVALID;
|
20
|
+
|
18
21
|
public:
|
19
22
|
explicit LogicalUnconditionalJoin(LogicalOperatorType logical_type) : LogicalOperator(logical_type) {};
|
20
23
|
|
@@ -14,6 +14,9 @@ namespace duckdb {
|
|
14
14
|
|
15
15
|
//! LogicalUnnest represents the logical UNNEST operator.
|
16
16
|
class LogicalUnnest : public LogicalOperator {
|
17
|
+
public:
|
18
|
+
static constexpr const LogicalOperatorType TYPE = LogicalOperatorType::LOGICAL_UNNEST;
|
19
|
+
|
17
20
|
public:
|
18
21
|
explicit LogicalUnnest(idx_t unnest_index)
|
19
22
|
: LogicalOperator(LogicalOperatorType::LOGICAL_UNNEST), unnest_index(unnest_index) {
|
@@ -14,6 +14,9 @@ namespace duckdb {
|
|
14
14
|
class TableCatalogEntry;
|
15
15
|
|
16
16
|
class LogicalUpdate : public LogicalOperator {
|
17
|
+
public:
|
18
|
+
static constexpr const LogicalOperatorType TYPE = LogicalOperatorType::LOGICAL_UPDATE;
|
19
|
+
|
17
20
|
public:
|
18
21
|
explicit LogicalUpdate(TableCatalogEntry *table);
|
19
22
|
|
@@ -15,6 +15,9 @@ namespace duckdb {
|
|
15
15
|
//! LogicalAggregate represents an aggregate operation with (optional) GROUP BY
|
16
16
|
//! operator.
|
17
17
|
class LogicalWindow : public LogicalOperator {
|
18
|
+
public:
|
19
|
+
static constexpr const LogicalOperatorType TYPE = LogicalOperatorType::LOGICAL_WINDOW;
|
20
|
+
|
18
21
|
public:
|
19
22
|
explicit LogicalWindow(idx_t window_index)
|
20
23
|
: LogicalOperator(LogicalOperatorType::LOGICAL_WINDOW), window_index(window_index) {
|
@@ -15,6 +15,9 @@ namespace duckdb {
|
|
15
15
|
|
16
16
|
//! Bound equivalent of SetOperationNode
|
17
17
|
class BoundRecursiveCTENode : public BoundQueryNode {
|
18
|
+
public:
|
19
|
+
static constexpr const QueryNodeType TYPE = QueryNodeType::RECURSIVE_CTE_NODE;
|
20
|
+
|
18
21
|
public:
|
19
22
|
BoundRecursiveCTENode() : BoundQueryNode(QueryNodeType::RECURSIVE_CTE_NODE) {
|
20
23
|
}
|
@@ -34,6 +34,9 @@ struct BoundUnnestNode {
|
|
34
34
|
|
35
35
|
//! Bound equivalent of SelectNode
|
36
36
|
class BoundSelectNode : public BoundQueryNode {
|
37
|
+
public:
|
38
|
+
static constexpr const QueryNodeType TYPE = QueryNodeType::SELECT_NODE;
|
39
|
+
|
37
40
|
public:
|
38
41
|
BoundSelectNode() : BoundQueryNode(QueryNodeType::SELECT_NODE) {
|
39
42
|
}
|
@@ -16,6 +16,9 @@ namespace duckdb {
|
|
16
16
|
|
17
17
|
//! Bound equivalent of SetOperationNode
|
18
18
|
class BoundSetOperationNode : public BoundQueryNode {
|
19
|
+
public:
|
20
|
+
static constexpr const QueryNodeType TYPE = QueryNodeType::SET_OPERATION_NODE;
|
21
|
+
|
19
22
|
public:
|
20
23
|
BoundSetOperationNode() : BoundQueryNode(QueryNodeType::SET_OPERATION_NODE) {
|
21
24
|
}
|
@@ -16,6 +16,9 @@ class TableCatalogEntry;
|
|
16
16
|
|
17
17
|
//! Represents a TableReference to a base table in the schema
|
18
18
|
class BoundBaseTableRef : public BoundTableRef {
|
19
|
+
public:
|
20
|
+
static constexpr const TableReferenceType TYPE = TableReferenceType::BASE_TABLE;
|
21
|
+
|
19
22
|
public:
|
20
23
|
BoundBaseTableRef(TableCatalogEntry *table, unique_ptr<LogicalOperator> get)
|
21
24
|
: BoundTableRef(TableReferenceType::BASE_TABLE), table(table), get(std::move(get)) {
|
@@ -13,6 +13,9 @@
|
|
13
13
|
namespace duckdb {
|
14
14
|
|
15
15
|
class BoundCTERef : public BoundTableRef {
|
16
|
+
public:
|
17
|
+
static constexpr const TableReferenceType TYPE = TableReferenceType::CTE;
|
18
|
+
|
16
19
|
public:
|
17
20
|
BoundCTERef(idx_t bind_index, idx_t cte_index)
|
18
21
|
: BoundTableRef(TableReferenceType::CTE), bind_index(bind_index), cte_index(cte_index) {
|
@@ -14,6 +14,9 @@ namespace duckdb {
|
|
14
14
|
|
15
15
|
//! Represents a cross product
|
16
16
|
class BoundEmptyTableRef : public BoundTableRef {
|
17
|
+
public:
|
18
|
+
static constexpr const TableReferenceType TYPE = TableReferenceType::EMPTY;
|
19
|
+
|
17
20
|
public:
|
18
21
|
explicit BoundEmptyTableRef(idx_t bind_index) : BoundTableRef(TableReferenceType::EMPTY), bind_index(bind_index) {
|
19
22
|
}
|
@@ -14,6 +14,9 @@
|
|
14
14
|
namespace duckdb {
|
15
15
|
//! Represents a TableReference to a base table in the schema
|
16
16
|
class BoundExpressionListRef : public BoundTableRef {
|
17
|
+
public:
|
18
|
+
static constexpr const TableReferenceType TYPE = TableReferenceType::EXPRESSION_LIST;
|
19
|
+
|
17
20
|
public:
|
18
21
|
BoundExpressionListRef() : BoundTableRef(TableReferenceType::EXPRESSION_LIST) {
|
19
22
|
}
|
@@ -18,6 +18,9 @@ namespace duckdb {
|
|
18
18
|
|
19
19
|
//! Represents a join
|
20
20
|
class BoundJoinRef : public BoundTableRef {
|
21
|
+
public:
|
22
|
+
static constexpr const TableReferenceType TYPE = TableReferenceType::JOIN;
|
23
|
+
|
21
24
|
public:
|
22
25
|
explicit BoundJoinRef(JoinRefType ref_type)
|
23
26
|
: BoundTableRef(TableReferenceType::JOIN), type(JoinType::INNER), ref_type(ref_type), lateral(false) {
|
@@ -0,0 +1,43 @@
|
|
1
|
+
//===----------------------------------------------------------------------===//
|
2
|
+
// DuckDB
|
3
|
+
//
|
4
|
+
// duckdb/planner/tableref/bound_pivotref.hpp
|
5
|
+
//
|
6
|
+
//
|
7
|
+
//===----------------------------------------------------------------------===//
|
8
|
+
|
9
|
+
#pragma once
|
10
|
+
|
11
|
+
#include "duckdb/planner/binder.hpp"
|
12
|
+
#include "duckdb/planner/bound_tableref.hpp"
|
13
|
+
#include "duckdb/planner/expression.hpp"
|
14
|
+
#include "duckdb/parser/tableref/pivotref.hpp"
|
15
|
+
#include "duckdb/function/aggregate_function.hpp"
|
16
|
+
|
17
|
+
namespace duckdb {
|
18
|
+
|
19
|
+
struct BoundPivotInfo {
|
20
|
+
//! The number of group columns
|
21
|
+
idx_t group_count;
|
22
|
+
//! The set of types
|
23
|
+
vector<LogicalType> types;
|
24
|
+
//! The set of values to pivot on
|
25
|
+
vector<string> pivot_values;
|
26
|
+
//! The set of aggregate functions that is being executed
|
27
|
+
vector<unique_ptr<Expression>> aggregates;
|
28
|
+
};
|
29
|
+
|
30
|
+
class BoundPivotRef : public BoundTableRef {
|
31
|
+
public:
|
32
|
+
explicit BoundPivotRef() : BoundTableRef(TableReferenceType::PIVOT) {
|
33
|
+
}
|
34
|
+
|
35
|
+
idx_t bind_index;
|
36
|
+
//! The binder used to bind the child of the pivot
|
37
|
+
shared_ptr<Binder> child_binder;
|
38
|
+
//! The child node of the pivot
|
39
|
+
unique_ptr<BoundTableRef> child;
|
40
|
+
//! The bound pivot info
|
41
|
+
BoundPivotInfo bound_pivot;
|
42
|
+
};
|
43
|
+
} // namespace duckdb
|
@@ -15,6 +15,9 @@ namespace duckdb {
|
|
15
15
|
|
16
16
|
//! Represents a positional join
|
17
17
|
class BoundPositionalJoinRef : public BoundTableRef {
|
18
|
+
public:
|
19
|
+
static constexpr const TableReferenceType TYPE = TableReferenceType::POSITIONAL_JOIN;
|
20
|
+
|
18
21
|
public:
|
19
22
|
BoundPositionalJoinRef() : BoundTableRef(TableReferenceType::POSITIONAL_JOIN), lateral(false) {
|
20
23
|
}
|
@@ -16,6 +16,9 @@ namespace duckdb {
|
|
16
16
|
|
17
17
|
//! Represents a cross product
|
18
18
|
class BoundSubqueryRef : public BoundTableRef {
|
19
|
+
public:
|
20
|
+
static constexpr const TableReferenceType TYPE = TableReferenceType::SUBQUERY;
|
21
|
+
|
19
22
|
public:
|
20
23
|
BoundSubqueryRef(shared_ptr<Binder> binder_p, unique_ptr<BoundQueryNode> subquery)
|
21
24
|
: BoundTableRef(TableReferenceType::SUBQUERY), binder(std::move(binder_p)), subquery(std::move(subquery)) {
|
@@ -15,6 +15,9 @@ namespace duckdb {
|
|
15
15
|
|
16
16
|
//! Represents a reference to a table-producing function call
|
17
17
|
class BoundTableFunction : public BoundTableRef {
|
18
|
+
public:
|
19
|
+
static constexpr const TableReferenceType TYPE = TableReferenceType::TABLE_FUNCTION;
|
20
|
+
|
18
21
|
public:
|
19
22
|
explicit BoundTableFunction(unique_ptr<LogicalOperator> get)
|
20
23
|
: BoundTableRef(TableReferenceType::TABLE_FUNCTION), get(std::move(get)) {
|
@@ -100,9 +100,9 @@ public:
|
|
100
100
|
|
101
101
|
//! Merge another index into this index. The lock obtained from InitializeLock must be held, and the other
|
102
102
|
//! index must also be locked during the merge
|
103
|
-
virtual bool MergeIndexes(IndexLock &state, Index
|
103
|
+
virtual bool MergeIndexes(IndexLock &state, Index &other_index) = 0;
|
104
104
|
//! Obtains a lock and calls MergeIndexes while holding that lock
|
105
|
-
bool MergeIndexes(Index
|
105
|
+
bool MergeIndexes(Index &other_index);
|
106
106
|
|
107
107
|
//! Returns the string representation of an index
|
108
108
|
virtual string ToString() = 0;
|
@@ -163,6 +163,19 @@ private:
|
|
163
163
|
|
164
164
|
//! Bind the unbound expressions of the index
|
165
165
|
unique_ptr<Expression> BindExpression(unique_ptr<Expression> expr);
|
166
|
+
|
167
|
+
public:
|
168
|
+
template <class TARGET>
|
169
|
+
TARGET &Cast() {
|
170
|
+
D_ASSERT(dynamic_cast<TARGET *>(this));
|
171
|
+
return (TARGET &)*this;
|
172
|
+
}
|
173
|
+
|
174
|
+
template <class TARGET>
|
175
|
+
const TARGET &Cast() const {
|
176
|
+
D_ASSERT(dynamic_cast<const TARGET *>(this));
|
177
|
+
return (const TARGET &)*this;
|
178
|
+
}
|
166
179
|
};
|
167
180
|
|
168
181
|
} // namespace duckdb
|
@@ -110,30 +110,30 @@ public:
|
|
110
110
|
//! Gets the total bytes written to the WAL since startup
|
111
111
|
idx_t GetTotalWritten();
|
112
112
|
|
113
|
-
virtual void WriteCreateTable(TableCatalogEntry
|
114
|
-
void WriteDropTable(TableCatalogEntry
|
113
|
+
virtual void WriteCreateTable(const TableCatalogEntry &entry);
|
114
|
+
void WriteDropTable(const TableCatalogEntry &entry);
|
115
115
|
|
116
|
-
void WriteCreateSchema(SchemaCatalogEntry
|
117
|
-
void WriteDropSchema(SchemaCatalogEntry
|
116
|
+
void WriteCreateSchema(const SchemaCatalogEntry &entry);
|
117
|
+
void WriteDropSchema(const SchemaCatalogEntry &entry);
|
118
118
|
|
119
|
-
void WriteCreateView(ViewCatalogEntry
|
120
|
-
void WriteDropView(ViewCatalogEntry
|
119
|
+
void WriteCreateView(const ViewCatalogEntry &entry);
|
120
|
+
void WriteDropView(const ViewCatalogEntry &entry);
|
121
121
|
|
122
|
-
void WriteCreateSequence(SequenceCatalogEntry
|
123
|
-
void WriteDropSequence(SequenceCatalogEntry
|
124
|
-
void WriteSequenceValue(SequenceCatalogEntry
|
122
|
+
void WriteCreateSequence(const SequenceCatalogEntry &entry);
|
123
|
+
void WriteDropSequence(const SequenceCatalogEntry &entry);
|
124
|
+
void WriteSequenceValue(const SequenceCatalogEntry &entry, SequenceValue val);
|
125
125
|
|
126
|
-
void WriteCreateMacro(ScalarMacroCatalogEntry
|
127
|
-
void WriteDropMacro(ScalarMacroCatalogEntry
|
126
|
+
void WriteCreateMacro(const ScalarMacroCatalogEntry &entry);
|
127
|
+
void WriteDropMacro(const ScalarMacroCatalogEntry &entry);
|
128
128
|
|
129
|
-
void WriteCreateTableMacro(TableMacroCatalogEntry
|
130
|
-
void WriteDropTableMacro(TableMacroCatalogEntry
|
129
|
+
void WriteCreateTableMacro(const TableMacroCatalogEntry &entry);
|
130
|
+
void WriteDropTableMacro(const TableMacroCatalogEntry &entry);
|
131
131
|
|
132
|
-
void WriteCreateIndex(IndexCatalogEntry
|
133
|
-
void WriteDropIndex(IndexCatalogEntry
|
132
|
+
void WriteCreateIndex(const IndexCatalogEntry &entry);
|
133
|
+
void WriteDropIndex(const IndexCatalogEntry &entry);
|
134
134
|
|
135
|
-
void WriteCreateType(TypeCatalogEntry
|
136
|
-
void WriteDropType(TypeCatalogEntry
|
135
|
+
void WriteCreateType(const TypeCatalogEntry &entry);
|
136
|
+
void WriteDropType(const TypeCatalogEntry &entry);
|
137
137
|
//! Sets the table used for subsequent insert/delete/update commands
|
138
138
|
void WriteSetTable(string &schema, string &table);
|
139
139
|
|
@@ -46,7 +46,7 @@ public:
|
|
46
46
|
private:
|
47
47
|
void SwitchTable(DataTableInfo *table, UndoFlags new_op);
|
48
48
|
|
49
|
-
void WriteCatalogEntry(CatalogEntry
|
49
|
+
void WriteCatalogEntry(CatalogEntry &entry, data_ptr_t extra_data);
|
50
50
|
void WriteDelete(DeleteInfo *info);
|
51
51
|
void WriteUpdate(UpdateInfo *info);
|
52
52
|
|
@@ -83,12 +83,12 @@ struct CTableLocalInitData : public LocalTableFunctionState {
|
|
83
83
|
};
|
84
84
|
|
85
85
|
struct CTableInternalInitInfo {
|
86
|
-
CTableInternalInitInfo(CTableBindData &bind_data, CTableInitData &init_data,
|
87
|
-
TableFilterSet *filters)
|
86
|
+
CTableInternalInitInfo(const CTableBindData &bind_data, CTableInitData &init_data,
|
87
|
+
const vector<column_t> &column_ids, TableFilterSet *filters)
|
88
88
|
: bind_data(bind_data), init_data(init_data), column_ids(column_ids), filters(filters), success(true) {
|
89
89
|
}
|
90
90
|
|
91
|
-
CTableBindData &bind_data;
|
91
|
+
const CTableBindData &bind_data;
|
92
92
|
CTableInitData &init_data;
|
93
93
|
const vector<column_t> &column_ids;
|
94
94
|
TableFilterSet *filters;
|
@@ -97,11 +97,11 @@ struct CTableInternalInitInfo {
|
|
97
97
|
};
|
98
98
|
|
99
99
|
struct CTableInternalFunctionInfo {
|
100
|
-
CTableInternalFunctionInfo(CTableBindData &bind_data, CTableInitData &init_data, CTableInitData &local_data)
|
100
|
+
CTableInternalFunctionInfo(const CTableBindData &bind_data, CTableInitData &init_data, CTableInitData &local_data)
|
101
101
|
: bind_data(bind_data), init_data(init_data), local_data(local_data), success(true) {
|
102
102
|
}
|
103
103
|
|
104
|
-
CTableBindData &bind_data;
|
104
|
+
const CTableBindData &bind_data;
|
105
105
|
CTableInitData &init_data;
|
106
106
|
CTableInitData &local_data;
|
107
107
|
bool success;
|
@@ -124,7 +124,7 @@ unique_ptr<FunctionData> CTableFunctionBind(ClientContext &context, TableFunctio
|
|
124
124
|
}
|
125
125
|
|
126
126
|
unique_ptr<GlobalTableFunctionState> CTableFunctionInit(ClientContext &context, TableFunctionInitInput &data_p) {
|
127
|
-
auto &bind_data =
|
127
|
+
auto &bind_data = data_p.bind_data->Cast<CTableBindData>();
|
128
128
|
auto result = make_uniq<CTableGlobalInitData>();
|
129
129
|
|
130
130
|
CTableInternalInitInfo init_info(bind_data, result->init_data, data_p.column_ids, data_p.filters);
|
@@ -137,7 +137,7 @@ unique_ptr<GlobalTableFunctionState> CTableFunctionInit(ClientContext &context,
|
|
137
137
|
|
138
138
|
unique_ptr<LocalTableFunctionState> CTableFunctionLocalInit(ExecutionContext &context, TableFunctionInitInput &data_p,
|
139
139
|
GlobalTableFunctionState *gstate) {
|
140
|
-
auto &bind_data =
|
140
|
+
auto &bind_data = data_p.bind_data->Cast<CTableBindData>();
|
141
141
|
auto result = make_uniq<CTableLocalInitData>();
|
142
142
|
if (!bind_data.info->local_init) {
|
143
143
|
return std::move(result);
|
@@ -152,7 +152,7 @@ unique_ptr<LocalTableFunctionState> CTableFunctionLocalInit(ExecutionContext &co
|
|
152
152
|
}
|
153
153
|
|
154
154
|
unique_ptr<NodeStatistics> CTableFunctionCardinality(ClientContext &context, const FunctionData *bind_data_p) {
|
155
|
-
auto &bind_data = (
|
155
|
+
auto &bind_data = bind_data_p->Cast<CTableBindData>();
|
156
156
|
if (!bind_data.stats) {
|
157
157
|
return nullptr;
|
158
158
|
}
|
@@ -160,7 +160,7 @@ unique_ptr<NodeStatistics> CTableFunctionCardinality(ClientContext &context, con
|
|
160
160
|
}
|
161
161
|
|
162
162
|
void CTableFunction(ClientContext &context, TableFunctionInput &data_p, DataChunk &output) {
|
163
|
-
auto &bind_data =
|
163
|
+
auto &bind_data = data_p.bind_data->Cast<CTableBindData>();
|
164
164
|
auto &global_data = (CTableGlobalInitData &)*data_p.global_state;
|
165
165
|
auto &local_data = (CTableLocalInitData &)*data_p.local_state;
|
166
166
|
CTableInternalFunctionInfo function_info(bind_data, global_data.init_data, local_data.init_data);
|
@@ -304,7 +304,7 @@ static bool IsExplainAnalyze(SQLStatement *statement) {
|
|
304
304
|
if (statement->type != StatementType::EXPLAIN_STATEMENT) {
|
305
305
|
return false;
|
306
306
|
}
|
307
|
-
auto &explain = (
|
307
|
+
auto &explain = statement->Cast<ExplainStatement>();
|
308
308
|
return explain.explain_type == ExplainType::EXPLAIN_ANALYZE;
|
309
309
|
}
|
310
310
|
|
@@ -84,6 +84,7 @@ static ConfigurationOption internal_options[] = {DUCKDB_GLOBAL(AccessModeSetting
|
|
84
84
|
DUCKDB_GLOBAL_ALIAS("null_order", DefaultNullOrderSetting),
|
85
85
|
DUCKDB_GLOBAL(PasswordSetting),
|
86
86
|
DUCKDB_LOCAL(PerfectHashThresholdSetting),
|
87
|
+
DUCKDB_LOCAL(PivotLimitSetting),
|
87
88
|
DUCKDB_LOCAL(PreserveIdentifierCase),
|
88
89
|
DUCKDB_GLOBAL(PreserveInsertionOrder),
|
89
90
|
DUCKDB_LOCAL(ProfilerHistorySize),
|
@@ -669,7 +669,7 @@ void ExpressionInfo::ExtractExpressionsRecursive(unique_ptr<ExpressionState> &st
|
|
669
669
|
auto expr_info = make_uniq<ExpressionInfo>();
|
670
670
|
if (child->expr.expression_class == ExpressionClass::BOUND_FUNCTION) {
|
671
671
|
expr_info->hasfunction = true;
|
672
|
-
expr_info->function_name =
|
672
|
+
expr_info->function_name = child->expr.Cast<BoundFunctionExpression>().function.ToString();
|
673
673
|
expr_info->function_time = child->profiler.time;
|
674
674
|
expr_info->sample_tuples_count = child->profiler.sample_tuples_count;
|
675
675
|
expr_info->tuples_count = child->profiler.tuples_count;
|
@@ -697,7 +697,7 @@ ExpressionRootInfo::ExpressionRootInfo(ExpressionExecutorState &state, string na
|
|
697
697
|
// Maybe root has a function
|
698
698
|
if (state.root_state->expr.expression_class == ExpressionClass::BOUND_FUNCTION) {
|
699
699
|
expression_info_p->hasfunction = true;
|
700
|
-
expression_info_p->function_name = (
|
700
|
+
expression_info_p->function_name = (state.root_state->expr.Cast<BoundFunctionExpression>()).function.name;
|
701
701
|
expression_info_p->function_time = state.root_state->profiler.time;
|
702
702
|
expression_info_p->sample_tuples_count = state.root_state->profiler.sample_tuples_count;
|
703
703
|
expression_info_p->tuples_count = state.root_state->profiler.tuples_count;
|
@@ -38,7 +38,7 @@ unique_ptr<QueryNode> AggregateRelation::GetQueryNode() {
|
|
38
38
|
result = std::move(select);
|
39
39
|
}
|
40
40
|
D_ASSERT(result->type == QueryNodeType::SELECT_NODE);
|
41
|
-
auto &select_node = (
|
41
|
+
auto &select_node = result->Cast<SelectNode>();
|
42
42
|
if (!groups.empty()) {
|
43
43
|
// explicit groups provided: use standard handling
|
44
44
|
select_node.aggregate_handling = AggregateHandling::STANDARD_HANDLING;
|
@@ -24,7 +24,7 @@ unique_ptr<QueryNode> FilterRelation::GetQueryNode() {
|
|
24
24
|
// child node is a join: push filter into WHERE clause of select node
|
25
25
|
auto child_node = child->GetQueryNode();
|
26
26
|
D_ASSERT(child_node->type == QueryNodeType::SELECT_NODE);
|
27
|
-
auto &select_node = (
|
27
|
+
auto &select_node = child_node->Cast<SelectNode>();
|
28
28
|
if (!select_node.where_clause) {
|
29
29
|
select_node.where_clause = condition->Copy();
|
30
30
|
} else {
|
@@ -37,7 +37,7 @@ unique_ptr<QueryNode> ProjectionRelation::GetQueryNode() {
|
|
37
37
|
result = std::move(select);
|
38
38
|
}
|
39
39
|
D_ASSERT(result->type == QueryNodeType::SELECT_NODE);
|
40
|
-
auto &select_node = (
|
40
|
+
auto &select_node = result->Cast<SelectNode>();
|
41
41
|
select_node.aggregate_handling = AggregateHandling::NO_AGGREGATES_ALLOWED;
|
42
42
|
select_node.select_list.clear();
|
43
43
|
for (auto &expr : expressions) {
|
@@ -124,7 +124,7 @@ shared_ptr<Relation> Relation::Join(const shared_ptr<Relation> &other, const str
|
|
124
124
|
if (expr->type != ExpressionType::COLUMN_REF) {
|
125
125
|
throw ParserException("Expected a single expression as join condition");
|
126
126
|
}
|
127
|
-
auto &colref = (
|
127
|
+
auto &colref = expr->Cast<ColumnRefExpression>();
|
128
128
|
if (colref.IsQualified()) {
|
129
129
|
throw ParserException("Expected unqualified column for column in USING clause");
|
130
130
|
}
|
@@ -763,7 +763,7 @@ void PerfectHashThresholdSetting::ResetLocal(ClientContext &context) {
|
|
763
763
|
}
|
764
764
|
|
765
765
|
void PerfectHashThresholdSetting::SetLocal(ClientContext &context, const Value &input) {
|
766
|
-
auto bits = input.GetValue<
|
766
|
+
auto bits = input.GetValue<int64_t>();
|
767
767
|
if (bits < 0 || bits > 32) {
|
768
768
|
throw ParserException("Perfect HT threshold out of range: should be within range 0 - 32");
|
769
769
|
}
|
@@ -774,6 +774,22 @@ Value PerfectHashThresholdSetting::GetSetting(ClientContext &context) {
|
|
774
774
|
return Value::BIGINT(ClientConfig::GetConfig(context).perfect_ht_threshold);
|
775
775
|
}
|
776
776
|
|
777
|
+
//===--------------------------------------------------------------------===//
|
778
|
+
// Pivot Limit
|
779
|
+
//===--------------------------------------------------------------------===//
|
780
|
+
|
781
|
+
void PivotLimitSetting::ResetLocal(ClientContext &context) {
|
782
|
+
ClientConfig::GetConfig(context).pivot_limit = ClientConfig().pivot_limit;
|
783
|
+
}
|
784
|
+
|
785
|
+
void PivotLimitSetting::SetLocal(ClientContext &context, const Value &input) {
|
786
|
+
ClientConfig::GetConfig(context).pivot_limit = input.GetValue<uint64_t>();
|
787
|
+
}
|
788
|
+
|
789
|
+
Value PivotLimitSetting::GetSetting(ClientContext &context) {
|
790
|
+
return Value::BIGINT(ClientConfig::GetConfig(context).pivot_limit);
|
791
|
+
}
|
792
|
+
|
777
793
|
//===--------------------------------------------------------------------===//
|
778
794
|
// PreserveIdentifierCase
|
779
795
|
//===--------------------------------------------------------------------===//
|