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
@@ -58,8 +58,8 @@ unique_ptr<LogicalOperator> FlattenDependentJoins::PushDownDependentJoin(unique_
|
|
58
58
|
bool SubqueryDependentFilter(Expression *expr) {
|
59
59
|
if (expr->expression_class == ExpressionClass::BOUND_CONJUNCTION &&
|
60
60
|
expr->GetExpressionType() == ExpressionType::CONJUNCTION_AND) {
|
61
|
-
auto bound_conjuction = (
|
62
|
-
for (auto &child : bound_conjuction
|
61
|
+
auto &bound_conjuction = expr->Cast<BoundConjunctionExpression>();
|
62
|
+
for (auto &child : bound_conjuction.children) {
|
63
63
|
if (SubqueryDependentFilter(child.get())) {
|
64
64
|
return true;
|
65
65
|
}
|
@@ -114,7 +114,7 @@ unique_ptr<LogicalOperator> FlattenDependentJoins::PushDownDependentJoinInternal
|
|
114
114
|
RewriteCorrelatedExpressions rewriter(base_binding, correlated_map);
|
115
115
|
rewriter.VisitOperator(*plan);
|
116
116
|
// now we add all the columns of the delim_scan to the projection list
|
117
|
-
auto proj =
|
117
|
+
auto &proj = plan->Cast<LogicalProjection>();
|
118
118
|
for (idx_t i = 0; i < correlated_columns.size(); i++) {
|
119
119
|
auto &col = correlated_columns[i];
|
120
120
|
auto colref = make_uniq<BoundColumnRefExpression>(
|
@@ -122,13 +122,13 @@ unique_ptr<LogicalOperator> FlattenDependentJoins::PushDownDependentJoinInternal
|
|
122
122
|
plan->expressions.push_back(std::move(colref));
|
123
123
|
}
|
124
124
|
|
125
|
-
base_binding.table_index = proj
|
125
|
+
base_binding.table_index = proj.table_index;
|
126
126
|
this->delim_offset = base_binding.column_index = plan->expressions.size() - correlated_columns.size();
|
127
127
|
this->data_offset = 0;
|
128
128
|
return plan;
|
129
129
|
}
|
130
130
|
case LogicalOperatorType::LOGICAL_AGGREGATE_AND_GROUP_BY: {
|
131
|
-
auto &aggr = (
|
131
|
+
auto &aggr = plan->Cast<LogicalAggregate>();
|
132
132
|
// aggregate and group by
|
133
133
|
// first we flatten the dependent join in the child of the projection
|
134
134
|
for (auto &expr : plan->expressions) {
|
@@ -181,8 +181,8 @@ unique_ptr<LogicalOperator> FlattenDependentJoins::PushDownDependentJoinInternal
|
|
181
181
|
// NULL or a value
|
182
182
|
unique_ptr<LogicalComparisonJoin> join = make_uniq<LogicalComparisonJoin>(JoinType::INNER);
|
183
183
|
for (auto &aggr_exp : aggr.expressions) {
|
184
|
-
auto b_aggr_exp =
|
185
|
-
if (!b_aggr_exp
|
184
|
+
auto &b_aggr_exp = aggr_exp->Cast<BoundAggregateExpression>();
|
185
|
+
if (!b_aggr_exp.PropagatesNullValues() || any_join || !parent_propagate_null_values) {
|
186
186
|
join = make_uniq<LogicalComparisonJoin>(JoinType::LEFT);
|
187
187
|
break;
|
188
188
|
}
|
@@ -204,9 +204,9 @@ unique_ptr<LogicalOperator> FlattenDependentJoins::PushDownDependentJoinInternal
|
|
204
204
|
// ELSE COUNT(*) END
|
205
205
|
for (idx_t i = 0; i < aggr.expressions.size(); i++) {
|
206
206
|
D_ASSERT(aggr.expressions[i]->GetExpressionClass() == ExpressionClass::BOUND_AGGREGATE);
|
207
|
-
auto bound =
|
207
|
+
auto &bound = aggr.expressions[i]->Cast<BoundAggregateExpression>();
|
208
208
|
vector<LogicalType> arguments;
|
209
|
-
if (bound
|
209
|
+
if (bound.function == CountFun::GetFunction() || bound.function == CountStarFun::GetFunction()) {
|
210
210
|
// have to replace this ColumnBinding with the CASE expression
|
211
211
|
replacement_map[ColumnBinding(aggr.aggregate_index, i)] = i;
|
212
212
|
}
|
@@ -264,7 +264,7 @@ unique_ptr<LogicalOperator> FlattenDependentJoins::PushDownDependentJoinInternal
|
|
264
264
|
case LogicalOperatorType::LOGICAL_ANY_JOIN:
|
265
265
|
case LogicalOperatorType::LOGICAL_ASOF_JOIN:
|
266
266
|
case LogicalOperatorType::LOGICAL_COMPARISON_JOIN: {
|
267
|
-
auto &join = (
|
267
|
+
auto &join = plan->Cast<LogicalJoin>();
|
268
268
|
D_ASSERT(plan->children.size() == 2);
|
269
269
|
// check the correlated expressions in the children of the join
|
270
270
|
bool left_has_correlation = has_correlated_expressions.find(plan->children[0].get())->second;
|
@@ -342,10 +342,10 @@ unique_ptr<LogicalOperator> FlattenDependentJoins::PushDownDependentJoinInternal
|
|
342
342
|
cond.right = std::move(right);
|
343
343
|
cond.comparison = ExpressionType::COMPARE_NOT_DISTINCT_FROM;
|
344
344
|
|
345
|
-
auto &comparison_join = (
|
345
|
+
auto &comparison_join = join.Cast<LogicalComparisonJoin>();
|
346
346
|
comparison_join.conditions.push_back(std::move(cond));
|
347
347
|
} else {
|
348
|
-
auto &any_join = (
|
348
|
+
auto &any_join = join.Cast<LogicalAnyJoin>();
|
349
349
|
auto comparison = make_uniq<BoundComparisonExpression>(ExpressionType::COMPARE_NOT_DISTINCT_FROM,
|
350
350
|
std::move(left), std::move(right));
|
351
351
|
auto conjunction = make_uniq<BoundConjunctionExpression>(
|
@@ -359,7 +359,7 @@ unique_ptr<LogicalOperator> FlattenDependentJoins::PushDownDependentJoinInternal
|
|
359
359
|
return plan;
|
360
360
|
}
|
361
361
|
case LogicalOperatorType::LOGICAL_LIMIT: {
|
362
|
-
auto &limit = (
|
362
|
+
auto &limit = plan->Cast<LogicalLimit>();
|
363
363
|
if (limit.limit || limit.offset) {
|
364
364
|
throw ParserException("Non-constant limit or offset not supported in correlated subquery");
|
365
365
|
}
|
@@ -435,13 +435,13 @@ unique_ptr<LogicalOperator> FlattenDependentJoins::PushDownDependentJoinInternal
|
|
435
435
|
throw ParserException("Limit percent operator not supported in correlated subquery");
|
436
436
|
}
|
437
437
|
case LogicalOperatorType::LOGICAL_WINDOW: {
|
438
|
-
auto &window = (
|
438
|
+
auto &window = plan->Cast<LogicalWindow>();
|
439
439
|
// push into children
|
440
440
|
plan->children[0] = PushDownDependentJoinInternal(std::move(plan->children[0]), parent_propagate_null_values);
|
441
441
|
// add the correlated columns to the PARTITION BY clauses in the Window
|
442
442
|
for (auto &expr : window.expressions) {
|
443
443
|
D_ASSERT(expr->GetExpressionClass() == ExpressionClass::BOUND_WINDOW);
|
444
|
-
auto &w = (
|
444
|
+
auto &w = expr->Cast<BoundWindowExpression>();
|
445
445
|
for (idx_t i = 0; i < correlated_columns.size(); i++) {
|
446
446
|
w.partitions.push_back(make_uniq<BoundColumnRefExpression>(
|
447
447
|
correlated_columns[i].type,
|
@@ -453,7 +453,7 @@ unique_ptr<LogicalOperator> FlattenDependentJoins::PushDownDependentJoinInternal
|
|
453
453
|
case LogicalOperatorType::LOGICAL_EXCEPT:
|
454
454
|
case LogicalOperatorType::LOGICAL_INTERSECT:
|
455
455
|
case LogicalOperatorType::LOGICAL_UNION: {
|
456
|
-
auto &setop = (
|
456
|
+
auto &setop = plan->Cast<LogicalSetOperation>();
|
457
457
|
// set operator, push into both children
|
458
458
|
#ifdef DEBUG
|
459
459
|
plan->children[0]->ResolveOperatorTypes();
|
@@ -475,7 +475,7 @@ unique_ptr<LogicalOperator> FlattenDependentJoins::PushDownDependentJoinInternal
|
|
475
475
|
return plan;
|
476
476
|
}
|
477
477
|
case LogicalOperatorType::LOGICAL_DISTINCT: {
|
478
|
-
auto &distinct = (
|
478
|
+
auto &distinct = plan->Cast<LogicalDistinct>();
|
479
479
|
// push down into child
|
480
480
|
distinct.children[0] = PushDownDependentJoin(std::move(distinct.children[0]));
|
481
481
|
// add all correlated columns to the distinct targets
|
@@ -493,26 +493,28 @@ unique_ptr<LogicalOperator> FlattenDependentJoins::PushDownDependentJoinInternal
|
|
493
493
|
RewriteCorrelatedExpressions rewriter(base_binding, correlated_map);
|
494
494
|
rewriter.VisitOperator(*plan);
|
495
495
|
// now we add all the correlated columns to each of the expressions of the expression scan
|
496
|
-
auto expr_get =
|
496
|
+
auto &expr_get = plan->Cast<LogicalExpressionGet>();
|
497
497
|
for (idx_t i = 0; i < correlated_columns.size(); i++) {
|
498
|
-
for (auto &expr_list : expr_get
|
498
|
+
for (auto &expr_list : expr_get.expressions) {
|
499
499
|
auto colref = make_uniq<BoundColumnRefExpression>(
|
500
500
|
correlated_columns[i].type, ColumnBinding(base_binding.table_index, base_binding.column_index + i));
|
501
501
|
expr_list.push_back(std::move(colref));
|
502
502
|
}
|
503
|
-
expr_get
|
503
|
+
expr_get.expr_types.push_back(correlated_columns[i].type);
|
504
504
|
}
|
505
505
|
|
506
|
-
base_binding.table_index = expr_get
|
507
|
-
this->delim_offset = base_binding.column_index = expr_get
|
506
|
+
base_binding.table_index = expr_get.table_index;
|
507
|
+
this->delim_offset = base_binding.column_index = expr_get.expr_types.size() - correlated_columns.size();
|
508
508
|
this->data_offset = 0;
|
509
509
|
return plan;
|
510
510
|
}
|
511
|
+
case LogicalOperatorType::LOGICAL_PIVOT:
|
512
|
+
throw BinderException("PIVOT is not supported in correlated subqueries yet");
|
511
513
|
case LogicalOperatorType::LOGICAL_ORDER_BY:
|
512
514
|
plan->children[0] = PushDownDependentJoin(std::move(plan->children[0]));
|
513
515
|
return plan;
|
514
516
|
case LogicalOperatorType::LOGICAL_GET: {
|
515
|
-
auto &get = (
|
517
|
+
auto &get = plan->Cast<LogicalGet>();
|
516
518
|
if (get.children.size() != 1) {
|
517
519
|
throw InternalException("Flatten dependent joins - logical get encountered without children");
|
518
520
|
}
|
@@ -70,7 +70,7 @@ void RewriteCorrelatedExpressions::RewriteCorrelatedRecursive::RewriteCorrelated
|
|
70
70
|
void RewriteCorrelatedExpressions::RewriteCorrelatedRecursive::RewriteCorrelatedExpressions(Expression &child) {
|
71
71
|
if (child.type == ExpressionType::BOUND_COLUMN_REF) {
|
72
72
|
// bound column reference
|
73
|
-
auto &bound_colref = (
|
73
|
+
auto &bound_colref = child.Cast<BoundColumnRefExpression>();
|
74
74
|
if (bound_colref.depth == 0) {
|
75
75
|
// not a correlated column, ignore
|
76
76
|
return;
|
@@ -87,7 +87,7 @@ void RewriteCorrelatedExpressions::RewriteCorrelatedRecursive::RewriteCorrelated
|
|
87
87
|
} else if (child.type == ExpressionType::SUBQUERY) {
|
88
88
|
// we encountered another subquery: rewrite recursively
|
89
89
|
D_ASSERT(child.GetExpressionClass() == ExpressionClass::BOUND_SUBQUERY);
|
90
|
-
auto &bound_subquery = (
|
90
|
+
auto &bound_subquery = child.Cast<BoundSubqueryExpression>();
|
91
91
|
RewriteCorrelatedRecursive rewrite(bound_subquery, base_binding, correlated_map);
|
92
92
|
rewrite.RewriteCorrelatedSubquery(bound_subquery);
|
93
93
|
}
|
@@ -100,7 +100,7 @@ TableBinding::TableBinding(const string &alias, vector<LogicalType> types_p, vec
|
|
100
100
|
static void ReplaceAliases(ParsedExpression &expr, const ColumnList &list,
|
101
101
|
const unordered_map<idx_t, string> &alias_map) {
|
102
102
|
if (expr.type == ExpressionType::COLUMN_REF) {
|
103
|
-
auto &colref = (
|
103
|
+
auto &colref = expr.Cast<ColumnRefExpression>();
|
104
104
|
D_ASSERT(!colref.IsQualified());
|
105
105
|
auto &col_names = colref.column_names;
|
106
106
|
D_ASSERT(col_names.size() == 1);
|
@@ -114,7 +114,7 @@ static void ReplaceAliases(ParsedExpression &expr, const ColumnList &list,
|
|
114
114
|
|
115
115
|
static void BakeTableName(ParsedExpression &expr, const string &table_name) {
|
116
116
|
if (expr.type == ExpressionType::COLUMN_REF) {
|
117
|
-
auto &colref = (
|
117
|
+
auto &colref = expr.Cast<ColumnRefExpression>();
|
118
118
|
D_ASSERT(!colref.IsQualified());
|
119
119
|
auto &col_names = colref.column_names;
|
120
120
|
col_names.insert(col_names.begin(), table_name);
|
@@ -128,18 +128,18 @@ unique_ptr<ParsedExpression> TableBinding::ExpandGeneratedColumn(const string &c
|
|
128
128
|
D_ASSERT(catalog_entry); // Should only be called on a TableBinding
|
129
129
|
|
130
130
|
D_ASSERT(catalog_entry->type == CatalogType::TABLE_ENTRY);
|
131
|
-
auto table_entry = (
|
131
|
+
auto &table_entry = catalog_entry->Cast<TableCatalogEntry>();
|
132
132
|
|
133
133
|
// Get the index of the generated column
|
134
134
|
auto column_index = GetBindingIndex(column_name);
|
135
|
-
D_ASSERT(table_entry
|
135
|
+
D_ASSERT(table_entry.GetColumn(LogicalIndex(column_index)).Generated());
|
136
136
|
// Get a copy of the generated column
|
137
|
-
auto expression = table_entry
|
137
|
+
auto expression = table_entry.GetColumn(LogicalIndex(column_index)).GeneratedExpression().Copy();
|
138
138
|
unordered_map<idx_t, string> alias_map;
|
139
139
|
for (auto &entry : name_map) {
|
140
140
|
alias_map[entry.second] = entry.first;
|
141
141
|
}
|
142
|
-
ReplaceAliases(*expression, table_entry
|
142
|
+
ReplaceAliases(*expression, table_entry.GetColumns(), alias_map);
|
143
143
|
BakeTableName(*expression, alias);
|
144
144
|
return (expression);
|
145
145
|
}
|
@@ -191,8 +191,8 @@ BindResult TableBinding::Bind(ColumnRefExpression &colref, idx_t depth) {
|
|
191
191
|
if (entry && column_index != COLUMN_IDENTIFIER_ROW_ID) {
|
192
192
|
D_ASSERT(entry->type == CatalogType::TABLE_ENTRY);
|
193
193
|
// Either there is no table, or the columns category has to be standard
|
194
|
-
auto table_entry = (
|
195
|
-
auto &column_entry = table_entry
|
194
|
+
auto &table_entry = entry->Cast<TableCatalogEntry>();
|
195
|
+
auto &column_entry = table_entry.GetColumn(LogicalIndex(column_index));
|
196
196
|
(void)table_entry;
|
197
197
|
(void)column_entry;
|
198
198
|
D_ASSERT(column_entry.Category() == TableColumnType::STANDARD);
|
@@ -9,7 +9,7 @@
|
|
9
9
|
|
10
10
|
namespace duckdb {
|
11
11
|
|
12
|
-
TableDataWriter::TableDataWriter(TableCatalogEntry &table_p) : table((
|
12
|
+
TableDataWriter::TableDataWriter(TableCatalogEntry &table_p) : table(table_p.Cast<DuckTableEntry>()) {
|
13
13
|
D_ASSERT(table_p.IsDuckTable());
|
14
14
|
}
|
15
15
|
|
@@ -366,7 +366,8 @@ idx_t LocateErrorIndex(bool is_append, const ManagedSelection &matches) {
|
|
366
366
|
|
367
367
|
D_ASSERT(failed_index != DConstants::INVALID_INDEX);
|
368
368
|
D_ASSERT(index->type == IndexType::ART);
|
369
|
-
auto &art_index = (
|
369
|
+
auto &art_index = index->Cast<ART>();
|
370
|
+
;
|
370
371
|
auto key_name = art_index.GenerateErrorKeyName(input, failed_index);
|
371
372
|
auto exception_msg = art_index.GenerateConstraintErrorMessage(verify_type, key_name);
|
372
373
|
throw ConstraintException(exception_msg);
|
@@ -48,15 +48,14 @@ void Index::Delete(DataChunk &entries, Vector &row_identifiers) {
|
|
48
48
|
Delete(state, entries, row_identifiers);
|
49
49
|
}
|
50
50
|
|
51
|
-
bool Index::MergeIndexes(Index
|
52
|
-
|
51
|
+
bool Index::MergeIndexes(Index &other_index) {
|
53
52
|
IndexLock state;
|
54
53
|
InitializeLock(state);
|
55
54
|
|
56
55
|
switch (this->type) {
|
57
56
|
case IndexType::ART: {
|
58
|
-
auto art = (
|
59
|
-
return art
|
57
|
+
auto &art = Cast<ART>();
|
58
|
+
return art.MergeIndexes(state, other_index);
|
60
59
|
}
|
61
60
|
default:
|
62
61
|
throw InternalException("Unimplemented index type for merge");
|
@@ -69,7 +68,7 @@ void Index::ExecuteExpressions(DataChunk &input, DataChunk &result) {
|
|
69
68
|
|
70
69
|
unique_ptr<Expression> Index::BindExpression(unique_ptr<Expression> expr) {
|
71
70
|
if (expr->type == ExpressionType::BOUND_COLUMN_REF) {
|
72
|
-
auto &bound_colref = (
|
71
|
+
auto &bound_colref = expr->Cast<BoundColumnRefExpression>();
|
73
72
|
return make_uniq<BoundReferenceExpression>(expr->return_type, column_ids[bound_colref.binding.column_index]);
|
74
73
|
}
|
75
74
|
ExpressionIterator::EnumerateChildren(
|
@@ -120,7 +120,8 @@ LocalTableStorage::LocalTableStorage(DataTable &table)
|
|
120
120
|
row_groups->InitializeEmpty();
|
121
121
|
table.info->indexes.Scan([&](Index &index) {
|
122
122
|
D_ASSERT(index.type == IndexType::ART);
|
123
|
-
auto &art = (
|
123
|
+
auto &art = index.Cast<ART>();
|
124
|
+
;
|
124
125
|
if (art.constraint_type != IndexConstraintType::NONE) {
|
125
126
|
// unique index: create a local ART index that maintains the same unique constraint
|
126
127
|
vector<unique_ptr<Expression>> unbound_expressions;
|
@@ -705,7 +705,7 @@ void RowGroupCollection::VerifyNewConstraint(DataTable &parent, const BoundConst
|
|
705
705
|
return;
|
706
706
|
}
|
707
707
|
// scan the original table, check if there's any null value
|
708
|
-
auto ¬_null_constraint = (
|
708
|
+
auto ¬_null_constraint = constraint.Cast<BoundNotNullConstraint>();
|
709
709
|
vector<LogicalType> scan_types;
|
710
710
|
auto physical_index = not_null_constraint.index.index;
|
711
711
|
D_ASSERT(physical_index < types.size());
|
@@ -56,64 +56,64 @@ void WriteAheadLog::WriteCheckpoint(block_id_t meta_block) {
|
|
56
56
|
//===--------------------------------------------------------------------===//
|
57
57
|
// CREATE TABLE
|
58
58
|
//===--------------------------------------------------------------------===//
|
59
|
-
void WriteAheadLog::WriteCreateTable(TableCatalogEntry
|
59
|
+
void WriteAheadLog::WriteCreateTable(const TableCatalogEntry &entry) {
|
60
60
|
if (skip_writing) {
|
61
61
|
return;
|
62
62
|
}
|
63
63
|
writer->Write<WALType>(WALType::CREATE_TABLE);
|
64
|
-
entry
|
64
|
+
entry.Serialize(*writer);
|
65
65
|
}
|
66
66
|
|
67
67
|
//===--------------------------------------------------------------------===//
|
68
68
|
// DROP TABLE
|
69
69
|
//===--------------------------------------------------------------------===//
|
70
|
-
void WriteAheadLog::WriteDropTable(TableCatalogEntry
|
70
|
+
void WriteAheadLog::WriteDropTable(const TableCatalogEntry &entry) {
|
71
71
|
if (skip_writing) {
|
72
72
|
return;
|
73
73
|
}
|
74
74
|
writer->Write<WALType>(WALType::DROP_TABLE);
|
75
|
-
writer->WriteString(entry
|
76
|
-
writer->WriteString(entry
|
75
|
+
writer->WriteString(entry.schema->name);
|
76
|
+
writer->WriteString(entry.name);
|
77
77
|
}
|
78
78
|
|
79
79
|
//===--------------------------------------------------------------------===//
|
80
80
|
// CREATE SCHEMA
|
81
81
|
//===--------------------------------------------------------------------===//
|
82
|
-
void WriteAheadLog::WriteCreateSchema(SchemaCatalogEntry
|
82
|
+
void WriteAheadLog::WriteCreateSchema(const SchemaCatalogEntry &entry) {
|
83
83
|
if (skip_writing) {
|
84
84
|
return;
|
85
85
|
}
|
86
86
|
writer->Write<WALType>(WALType::CREATE_SCHEMA);
|
87
|
-
writer->WriteString(entry
|
87
|
+
writer->WriteString(entry.name);
|
88
88
|
}
|
89
89
|
|
90
90
|
//===--------------------------------------------------------------------===//
|
91
91
|
// SEQUENCES
|
92
92
|
//===--------------------------------------------------------------------===//
|
93
|
-
void WriteAheadLog::WriteCreateSequence(SequenceCatalogEntry
|
93
|
+
void WriteAheadLog::WriteCreateSequence(const SequenceCatalogEntry &entry) {
|
94
94
|
if (skip_writing) {
|
95
95
|
return;
|
96
96
|
}
|
97
97
|
writer->Write<WALType>(WALType::CREATE_SEQUENCE);
|
98
|
-
entry
|
98
|
+
entry.Serialize(*writer);
|
99
99
|
}
|
100
100
|
|
101
|
-
void WriteAheadLog::WriteDropSequence(SequenceCatalogEntry
|
101
|
+
void WriteAheadLog::WriteDropSequence(const SequenceCatalogEntry &entry) {
|
102
102
|
if (skip_writing) {
|
103
103
|
return;
|
104
104
|
}
|
105
105
|
writer->Write<WALType>(WALType::DROP_SEQUENCE);
|
106
|
-
writer->WriteString(entry
|
107
|
-
writer->WriteString(entry
|
106
|
+
writer->WriteString(entry.schema->name);
|
107
|
+
writer->WriteString(entry.name);
|
108
108
|
}
|
109
109
|
|
110
|
-
void WriteAheadLog::WriteSequenceValue(SequenceCatalogEntry
|
110
|
+
void WriteAheadLog::WriteSequenceValue(const SequenceCatalogEntry &entry, SequenceValue val) {
|
111
111
|
if (skip_writing) {
|
112
112
|
return;
|
113
113
|
}
|
114
114
|
writer->Write<WALType>(WALType::SEQUENCE_VALUE);
|
115
|
-
writer->WriteString(entry
|
116
|
-
writer->WriteString(entry
|
115
|
+
writer->WriteString(entry.schema->name);
|
116
|
+
writer->WriteString(entry.name);
|
117
117
|
writer->Write<uint64_t>(val.usage_count);
|
118
118
|
writer->Write<int64_t>(val.counter);
|
119
119
|
}
|
@@ -121,109 +121,109 @@ void WriteAheadLog::WriteSequenceValue(SequenceCatalogEntry *entry, SequenceValu
|
|
121
121
|
//===--------------------------------------------------------------------===//
|
122
122
|
// MACROS
|
123
123
|
//===--------------------------------------------------------------------===//
|
124
|
-
void WriteAheadLog::WriteCreateMacro(ScalarMacroCatalogEntry
|
124
|
+
void WriteAheadLog::WriteCreateMacro(const ScalarMacroCatalogEntry &entry) {
|
125
125
|
if (skip_writing) {
|
126
126
|
return;
|
127
127
|
}
|
128
128
|
writer->Write<WALType>(WALType::CREATE_MACRO);
|
129
|
-
entry
|
129
|
+
entry.Serialize(*writer);
|
130
130
|
}
|
131
131
|
|
132
|
-
void WriteAheadLog::WriteDropMacro(ScalarMacroCatalogEntry
|
132
|
+
void WriteAheadLog::WriteDropMacro(const ScalarMacroCatalogEntry &entry) {
|
133
133
|
if (skip_writing) {
|
134
134
|
return;
|
135
135
|
}
|
136
136
|
writer->Write<WALType>(WALType::DROP_MACRO);
|
137
|
-
writer->WriteString(entry
|
138
|
-
writer->WriteString(entry
|
137
|
+
writer->WriteString(entry.schema->name);
|
138
|
+
writer->WriteString(entry.name);
|
139
139
|
}
|
140
140
|
|
141
|
-
void WriteAheadLog::WriteCreateTableMacro(TableMacroCatalogEntry
|
141
|
+
void WriteAheadLog::WriteCreateTableMacro(const TableMacroCatalogEntry &entry) {
|
142
142
|
if (skip_writing) {
|
143
143
|
return;
|
144
144
|
}
|
145
145
|
writer->Write<WALType>(WALType::CREATE_TABLE_MACRO);
|
146
|
-
entry
|
146
|
+
entry.Serialize(*writer);
|
147
147
|
}
|
148
148
|
|
149
|
-
void WriteAheadLog::WriteDropTableMacro(TableMacroCatalogEntry
|
149
|
+
void WriteAheadLog::WriteDropTableMacro(const TableMacroCatalogEntry &entry) {
|
150
150
|
if (skip_writing) {
|
151
151
|
return;
|
152
152
|
}
|
153
153
|
writer->Write<WALType>(WALType::DROP_TABLE_MACRO);
|
154
|
-
writer->WriteString(entry
|
155
|
-
writer->WriteString(entry
|
154
|
+
writer->WriteString(entry.schema->name);
|
155
|
+
writer->WriteString(entry.name);
|
156
156
|
}
|
157
157
|
|
158
158
|
//===--------------------------------------------------------------------===//
|
159
159
|
// Indexes
|
160
160
|
//===--------------------------------------------------------------------===//
|
161
|
-
void WriteAheadLog::WriteCreateIndex(IndexCatalogEntry
|
161
|
+
void WriteAheadLog::WriteCreateIndex(const IndexCatalogEntry &entry) {
|
162
162
|
if (skip_writing) {
|
163
163
|
return;
|
164
164
|
}
|
165
165
|
writer->Write<WALType>(WALType::CREATE_INDEX);
|
166
|
-
entry
|
166
|
+
entry.Serialize(*writer);
|
167
167
|
}
|
168
168
|
|
169
|
-
void WriteAheadLog::WriteDropIndex(IndexCatalogEntry
|
169
|
+
void WriteAheadLog::WriteDropIndex(const IndexCatalogEntry &entry) {
|
170
170
|
if (skip_writing) {
|
171
171
|
return;
|
172
172
|
}
|
173
173
|
writer->Write<WALType>(WALType::DROP_INDEX);
|
174
|
-
writer->WriteString(entry
|
175
|
-
writer->WriteString(entry
|
174
|
+
writer->WriteString(entry.schema->name);
|
175
|
+
writer->WriteString(entry.name);
|
176
176
|
}
|
177
177
|
|
178
178
|
//===--------------------------------------------------------------------===//
|
179
179
|
// Custom Types
|
180
180
|
//===--------------------------------------------------------------------===//
|
181
|
-
void WriteAheadLog::WriteCreateType(TypeCatalogEntry
|
181
|
+
void WriteAheadLog::WriteCreateType(const TypeCatalogEntry &entry) {
|
182
182
|
if (skip_writing) {
|
183
183
|
return;
|
184
184
|
}
|
185
185
|
writer->Write<WALType>(WALType::CREATE_TYPE);
|
186
|
-
entry
|
186
|
+
entry.Serialize(*writer);
|
187
187
|
}
|
188
188
|
|
189
|
-
void WriteAheadLog::WriteDropType(TypeCatalogEntry
|
189
|
+
void WriteAheadLog::WriteDropType(const TypeCatalogEntry &entry) {
|
190
190
|
if (skip_writing) {
|
191
191
|
return;
|
192
192
|
}
|
193
193
|
writer->Write<WALType>(WALType::DROP_TYPE);
|
194
|
-
writer->WriteString(entry
|
195
|
-
writer->WriteString(entry
|
194
|
+
writer->WriteString(entry.schema->name);
|
195
|
+
writer->WriteString(entry.name);
|
196
196
|
}
|
197
197
|
|
198
198
|
//===--------------------------------------------------------------------===//
|
199
199
|
// VIEWS
|
200
200
|
//===--------------------------------------------------------------------===//
|
201
|
-
void WriteAheadLog::WriteCreateView(ViewCatalogEntry
|
201
|
+
void WriteAheadLog::WriteCreateView(const ViewCatalogEntry &entry) {
|
202
202
|
if (skip_writing) {
|
203
203
|
return;
|
204
204
|
}
|
205
205
|
writer->Write<WALType>(WALType::CREATE_VIEW);
|
206
|
-
entry
|
206
|
+
entry.Serialize(*writer);
|
207
207
|
}
|
208
208
|
|
209
|
-
void WriteAheadLog::WriteDropView(ViewCatalogEntry
|
209
|
+
void WriteAheadLog::WriteDropView(const ViewCatalogEntry &entry) {
|
210
210
|
if (skip_writing) {
|
211
211
|
return;
|
212
212
|
}
|
213
213
|
writer->Write<WALType>(WALType::DROP_VIEW);
|
214
|
-
writer->WriteString(entry
|
215
|
-
writer->WriteString(entry
|
214
|
+
writer->WriteString(entry.schema->name);
|
215
|
+
writer->WriteString(entry.name);
|
216
216
|
}
|
217
217
|
|
218
218
|
//===--------------------------------------------------------------------===//
|
219
219
|
// DROP SCHEMA
|
220
220
|
//===--------------------------------------------------------------------===//
|
221
|
-
void WriteAheadLog::WriteDropSchema(SchemaCatalogEntry
|
221
|
+
void WriteAheadLog::WriteDropSchema(const SchemaCatalogEntry &entry) {
|
222
222
|
if (skip_writing) {
|
223
223
|
return;
|
224
224
|
}
|
225
225
|
writer->Write<WALType>(WALType::DROP_SCHEMA);
|
226
|
-
writer->WriteString(entry
|
226
|
+
writer->WriteString(entry.name);
|
227
227
|
}
|
228
228
|
|
229
229
|
//===--------------------------------------------------------------------===//
|