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
@@ -187,8 +187,8 @@ unique_ptr<LocalSinkState> PhysicalHashJoin::GetLocalSinkState(ExecutionContext
|
|
187
187
|
|
188
188
|
SinkResultType PhysicalHashJoin::Sink(ExecutionContext &context, GlobalSinkState &gstate_p, LocalSinkState &lstate_p,
|
189
189
|
DataChunk &input) const {
|
190
|
-
auto &gstate = (
|
191
|
-
auto &lstate = (
|
190
|
+
auto &gstate = gstate_p.Cast<HashJoinGlobalSinkState>();
|
191
|
+
auto &lstate = lstate_p.Cast<HashJoinLocalSinkState>();
|
192
192
|
|
193
193
|
// resolve the join keys for the right chunk
|
194
194
|
lstate.join_keys.Reset();
|
@@ -223,8 +223,8 @@ SinkResultType PhysicalHashJoin::Sink(ExecutionContext &context, GlobalSinkState
|
|
223
223
|
}
|
224
224
|
|
225
225
|
void PhysicalHashJoin::Combine(ExecutionContext &context, GlobalSinkState &gstate_p, LocalSinkState &lstate_p) const {
|
226
|
-
auto &gstate = (
|
227
|
-
auto &lstate = (
|
226
|
+
auto &gstate = gstate_p.Cast<HashJoinGlobalSinkState>();
|
227
|
+
auto &lstate = lstate_p.Cast<HashJoinLocalSinkState>();
|
228
228
|
if (lstate.hash_table) {
|
229
229
|
lock_guard<mutex> local_ht_lock(gstate.lock);
|
230
230
|
gstate.local_hash_tables.push_back(std::move(lstate.hash_table));
|
@@ -375,7 +375,7 @@ public:
|
|
375
375
|
|
376
376
|
SinkFinalizeType PhysicalHashJoin::Finalize(Pipeline &pipeline, Event &event, ClientContext &context,
|
377
377
|
GlobalSinkState &gstate) const {
|
378
|
-
auto &sink = (
|
378
|
+
auto &sink = gstate.Cast<HashJoinGlobalSinkState>();
|
379
379
|
|
380
380
|
if (sink.external) {
|
381
381
|
D_ASSERT(can_go_external);
|
@@ -438,7 +438,7 @@ public:
|
|
438
438
|
|
439
439
|
unique_ptr<OperatorState> PhysicalHashJoin::GetOperatorState(ExecutionContext &context) const {
|
440
440
|
auto &allocator = Allocator::Get(context.client);
|
441
|
-
auto &sink = (
|
441
|
+
auto &sink = sink_state->Cast<HashJoinGlobalSinkState>();
|
442
442
|
auto state = make_uniq<HashJoinOperatorState>(context.client);
|
443
443
|
if (sink.perfect_join_executor) {
|
444
444
|
state->perfect_hash_join_state = sink.perfect_join_executor->GetOperatorState(context);
|
@@ -458,8 +458,8 @@ unique_ptr<OperatorState> PhysicalHashJoin::GetOperatorState(ExecutionContext &c
|
|
458
458
|
|
459
459
|
OperatorResultType PhysicalHashJoin::ExecuteInternal(ExecutionContext &context, DataChunk &input, DataChunk &chunk,
|
460
460
|
GlobalOperatorState &gstate, OperatorState &state_p) const {
|
461
|
-
auto &state = (
|
462
|
-
auto &sink = (
|
461
|
+
auto &state = state_p.Cast<HashJoinOperatorState>();
|
462
|
+
auto &sink = sink_state->Cast<HashJoinGlobalSinkState>();
|
463
463
|
D_ASSERT(sink.finalized);
|
464
464
|
D_ASSERT(!sink.scanned_data);
|
465
465
|
|
@@ -741,7 +741,7 @@ HashJoinLocalSourceState::HashJoinLocalSourceState(const PhysicalHashJoin &op, A
|
|
741
741
|
auto &chunk_state = probe_local_scan.current_chunk_state;
|
742
742
|
chunk_state.properties = ColumnDataScanProperties::ALLOW_ZERO_COPY;
|
743
743
|
|
744
|
-
auto &sink =
|
744
|
+
auto &sink = op.sink_state->Cast<HashJoinGlobalSinkState>();
|
745
745
|
probe_chunk.Initialize(allocator, sink.probe_types);
|
746
746
|
join_keys.Initialize(allocator, op.condition_types);
|
747
747
|
payload.Initialize(allocator, op.children[0]->types);
|
@@ -853,9 +853,9 @@ void HashJoinLocalSourceState::ScanFullOuter(HashJoinGlobalSinkState &sink, Hash
|
|
853
853
|
|
854
854
|
void PhysicalHashJoin::GetData(ExecutionContext &context, DataChunk &chunk, GlobalSourceState &gstate_p,
|
855
855
|
LocalSourceState &lstate_p) const {
|
856
|
-
auto &sink = (
|
857
|
-
auto &gstate = (
|
858
|
-
auto &lstate = (
|
856
|
+
auto &sink = sink_state->Cast<HashJoinGlobalSinkState>();
|
857
|
+
auto &gstate = gstate_p.Cast<HashJoinGlobalSourceState>();
|
858
|
+
auto &lstate = lstate_p.Cast<HashJoinLocalSourceState>();
|
859
859
|
sink.scanned_data = true;
|
860
860
|
|
861
861
|
if (!sink.external) {
|
@@ -128,7 +128,7 @@ unique_ptr<GlobalSinkState> PhysicalIEJoin::GetGlobalSinkState(ClientContext &co
|
|
128
128
|
unique_ptr<LocalSinkState> PhysicalIEJoin::GetLocalSinkState(ExecutionContext &context) const {
|
129
129
|
idx_t sink_child = 0;
|
130
130
|
if (sink_state) {
|
131
|
-
const auto &ie_sink = (
|
131
|
+
const auto &ie_sink = sink_state->Cast<IEJoinGlobalState>();
|
132
132
|
sink_child = ie_sink.child;
|
133
133
|
}
|
134
134
|
return make_uniq<IEJoinLocalState>(context.client, *this, sink_child);
|
@@ -136,8 +136,8 @@ unique_ptr<LocalSinkState> PhysicalIEJoin::GetLocalSinkState(ExecutionContext &c
|
|
136
136
|
|
137
137
|
SinkResultType PhysicalIEJoin::Sink(ExecutionContext &context, GlobalSinkState &gstate_p, LocalSinkState &lstate_p,
|
138
138
|
DataChunk &input) const {
|
139
|
-
auto &gstate = (
|
140
|
-
auto &lstate = (
|
139
|
+
auto &gstate = gstate_p.Cast<IEJoinGlobalState>();
|
140
|
+
auto &lstate = lstate_p.Cast<IEJoinLocalState>();
|
141
141
|
|
142
142
|
gstate.Sink(input, lstate);
|
143
143
|
|
@@ -145,8 +145,8 @@ SinkResultType PhysicalIEJoin::Sink(ExecutionContext &context, GlobalSinkState &
|
|
145
145
|
}
|
146
146
|
|
147
147
|
void PhysicalIEJoin::Combine(ExecutionContext &context, GlobalSinkState &gstate_p, LocalSinkState &lstate_p) const {
|
148
|
-
auto &gstate = (
|
149
|
-
auto &lstate = (
|
148
|
+
auto &gstate = gstate_p.Cast<IEJoinGlobalState>();
|
149
|
+
auto &lstate = lstate_p.Cast<IEJoinLocalState>();
|
150
150
|
gstate.tables[gstate.child]->Combine(lstate.table);
|
151
151
|
auto &client_profiler = QueryProfiler::Get(context.client);
|
152
152
|
|
@@ -159,7 +159,7 @@ void PhysicalIEJoin::Combine(ExecutionContext &context, GlobalSinkState &gstate_
|
|
159
159
|
//===--------------------------------------------------------------------===//
|
160
160
|
SinkFinalizeType PhysicalIEJoin::Finalize(Pipeline &pipeline, Event &event, ClientContext &context,
|
161
161
|
GlobalSinkState &gstate_p) const {
|
162
|
-
auto &gstate = (
|
162
|
+
auto &gstate = gstate_p.Cast<IEJoinGlobalState>();
|
163
163
|
auto &table = *gstate.tables[gstate.child];
|
164
164
|
auto &global_sort_state = table.global_sort_state;
|
165
165
|
|
@@ -701,8 +701,8 @@ public:
|
|
701
701
|
};
|
702
702
|
|
703
703
|
void PhysicalIEJoin::ResolveComplexJoin(ExecutionContext &context, DataChunk &chunk, LocalSourceState &state_p) const {
|
704
|
-
auto &state = (
|
705
|
-
auto &ie_sink = (
|
704
|
+
auto &state = state_p.Cast<IEJoinLocalSourceState>();
|
705
|
+
auto &ie_sink = sink_state->Cast<IEJoinGlobalState>();
|
706
706
|
auto &left_table = *ie_sink.tables[0];
|
707
707
|
auto &right_table = *ie_sink.tables[1];
|
708
708
|
|
@@ -822,7 +822,7 @@ public:
|
|
822
822
|
public:
|
823
823
|
idx_t MaxThreads() override {
|
824
824
|
// We can't leverage any more threads than block pairs.
|
825
|
-
const auto &sink_state = (
|
825
|
+
const auto &sink_state = (op.sink_state->Cast<IEJoinGlobalState>());
|
826
826
|
return sink_state.tables[0]->BlockCount() * sink_state.tables[1]->BlockCount();
|
827
827
|
}
|
828
828
|
|
@@ -929,9 +929,9 @@ unique_ptr<LocalSourceState> PhysicalIEJoin::GetLocalSourceState(ExecutionContex
|
|
929
929
|
|
930
930
|
void PhysicalIEJoin::GetData(ExecutionContext &context, DataChunk &result, GlobalSourceState &gstate,
|
931
931
|
LocalSourceState &lstate) const {
|
932
|
-
auto &ie_sink = (
|
933
|
-
auto &ie_gstate = (
|
934
|
-
auto &ie_lstate = (
|
932
|
+
auto &ie_sink = sink_state->Cast<IEJoinGlobalState>();
|
933
|
+
auto &ie_gstate = gstate.Cast<IEJoinGlobalSourceState>();
|
934
|
+
auto &ie_lstate = lstate.Cast<IEJoinLocalSourceState>();
|
935
935
|
|
936
936
|
ie_gstate.Initialize(ie_sink);
|
937
937
|
|
@@ -109,9 +109,9 @@ unique_ptr<OperatorState> PhysicalIndexJoin::GetOperatorState(ExecutionContext &
|
|
109
109
|
void PhysicalIndexJoin::Output(ExecutionContext &context, DataChunk &input, DataChunk &chunk,
|
110
110
|
OperatorState &state_p) const {
|
111
111
|
auto &phy_tbl_scan = (PhysicalTableScan &)*children[1];
|
112
|
-
auto &bind_tbl =
|
112
|
+
auto &bind_tbl = phy_tbl_scan.bind_data->Cast<TableScanBindData>();
|
113
113
|
auto &transaction = DuckTransaction::Get(context.client, *bind_tbl.table->catalog);
|
114
|
-
auto &state = (
|
114
|
+
auto &state = state_p.Cast<IndexJoinOperatorState>();
|
115
115
|
|
116
116
|
auto &tbl = bind_tbl.table->GetStorage();
|
117
117
|
idx_t output_sel_idx = 0;
|
@@ -164,8 +164,9 @@ void PhysicalIndexJoin::Output(ExecutionContext &context, DataChunk &input, Data
|
|
164
164
|
|
165
165
|
void PhysicalIndexJoin::GetRHSMatches(ExecutionContext &context, DataChunk &input, OperatorState &state_p) const {
|
166
166
|
|
167
|
-
auto &state = (
|
168
|
-
auto &art = (
|
167
|
+
auto &state = state_p.Cast<IndexJoinOperatorState>();
|
168
|
+
auto &art = index->Cast<ART>();
|
169
|
+
;
|
169
170
|
|
170
171
|
// generate the keys for this chunk
|
171
172
|
state.arena_allocator.Reset();
|
@@ -197,7 +198,7 @@ void PhysicalIndexJoin::GetRHSMatches(ExecutionContext &context, DataChunk &inpu
|
|
197
198
|
|
198
199
|
OperatorResultType PhysicalIndexJoin::ExecuteInternal(ExecutionContext &context, DataChunk &input, DataChunk &chunk,
|
199
200
|
GlobalOperatorState &gstate, OperatorState &state_p) const {
|
200
|
-
auto &state = (
|
201
|
+
auto &state = state_p.Cast<IndexJoinOperatorState>();
|
201
202
|
|
202
203
|
state.result_size = 0;
|
203
204
|
if (state.first_fetch) {
|
@@ -59,13 +59,13 @@ void PhysicalJoin::BuildJoinPipelines(Pipeline ¤t, MetaPipeline &meta_pipe
|
|
59
59
|
|
60
60
|
// Join can become a source operator if it's RIGHT/OUTER, or if the hash join goes out-of-core
|
61
61
|
bool add_child_pipeline = false;
|
62
|
-
auto &join_op = (
|
62
|
+
auto &join_op = op.Cast<PhysicalJoin>();
|
63
63
|
if (IsRightOuterJoin(join_op.join_type)) {
|
64
64
|
add_child_pipeline = true;
|
65
65
|
}
|
66
66
|
|
67
67
|
if (join_op.type == PhysicalOperatorType::HASH_JOIN) {
|
68
|
-
auto &hash_join_op = (
|
68
|
+
auto &hash_join_op = join_op.Cast<PhysicalHashJoin>();
|
69
69
|
hash_join_op.can_go_external = !meta_pipeline.HasRecursiveCTE();
|
70
70
|
if (hash_join_op.can_go_external) {
|
71
71
|
add_child_pipeline = true;
|
@@ -169,8 +169,8 @@ vector<LogicalType> PhysicalNestedLoopJoin::GetJoinTypes() const {
|
|
169
169
|
|
170
170
|
SinkResultType PhysicalNestedLoopJoin::Sink(ExecutionContext &context, GlobalSinkState &state, LocalSinkState &lstate,
|
171
171
|
DataChunk &input) const {
|
172
|
-
auto &gstate = (
|
173
|
-
auto &nlj_state = (
|
172
|
+
auto &gstate = state.Cast<NestedLoopJoinGlobalState>();
|
173
|
+
auto &nlj_state = lstate.Cast<NestedLoopJoinLocalState>();
|
174
174
|
|
175
175
|
// resolve the join expression of the right side
|
176
176
|
nlj_state.right_condition.Reset();
|
@@ -192,7 +192,7 @@ SinkResultType PhysicalNestedLoopJoin::Sink(ExecutionContext &context, GlobalSin
|
|
192
192
|
}
|
193
193
|
|
194
194
|
void PhysicalNestedLoopJoin::Combine(ExecutionContext &context, GlobalSinkState &gstate, LocalSinkState &lstate) const {
|
195
|
-
auto &state = (
|
195
|
+
auto &state = lstate.Cast<NestedLoopJoinLocalState>();
|
196
196
|
auto &client_profiler = QueryProfiler::Get(context.client);
|
197
197
|
|
198
198
|
context.thread.profiler.Flush(this, &state.rhs_executor, "rhs_executor", 1);
|
@@ -201,7 +201,7 @@ void PhysicalNestedLoopJoin::Combine(ExecutionContext &context, GlobalSinkState
|
|
201
201
|
|
202
202
|
SinkFinalizeType PhysicalNestedLoopJoin::Finalize(Pipeline &pipeline, Event &event, ClientContext &context,
|
203
203
|
GlobalSinkState &gstate_p) const {
|
204
|
-
auto &gstate = (
|
204
|
+
auto &gstate = gstate_p.Cast<NestedLoopJoinGlobalState>();
|
205
205
|
gstate.right_outer.Initialize(gstate.right_payload_data.Count());
|
206
206
|
if (gstate.right_payload_data.Count() == 0 && EmptyResultIfRHSIsEmpty()) {
|
207
207
|
return SinkFinalizeType::NO_OUTPUT_POSSIBLE;
|
@@ -267,7 +267,7 @@ unique_ptr<OperatorState> PhysicalNestedLoopJoin::GetOperatorState(ExecutionCont
|
|
267
267
|
OperatorResultType PhysicalNestedLoopJoin::ExecuteInternal(ExecutionContext &context, DataChunk &input,
|
268
268
|
DataChunk &chunk, GlobalOperatorState &gstate_p,
|
269
269
|
OperatorState &state_p) const {
|
270
|
-
auto &gstate = (
|
270
|
+
auto &gstate = sink_state->Cast<NestedLoopJoinGlobalState>();
|
271
271
|
|
272
272
|
if (gstate.right_payload_data.Count() == 0) {
|
273
273
|
// empty RHS
|
@@ -298,8 +298,8 @@ OperatorResultType PhysicalNestedLoopJoin::ExecuteInternal(ExecutionContext &con
|
|
298
298
|
|
299
299
|
void PhysicalNestedLoopJoin::ResolveSimpleJoin(ExecutionContext &context, DataChunk &input, DataChunk &chunk,
|
300
300
|
OperatorState &state_p) const {
|
301
|
-
auto &state = (
|
302
|
-
auto &gstate = (
|
301
|
+
auto &state = state_p.Cast<PhysicalNestedLoopJoinState>();
|
302
|
+
auto &gstate = sink_state->Cast<NestedLoopJoinGlobalState>();
|
303
303
|
|
304
304
|
// resolve the left join condition for the current chunk
|
305
305
|
state.left_condition.Reset();
|
@@ -327,8 +327,8 @@ void PhysicalNestedLoopJoin::ResolveSimpleJoin(ExecutionContext &context, DataCh
|
|
327
327
|
|
328
328
|
OperatorResultType PhysicalNestedLoopJoin::ResolveComplexJoin(ExecutionContext &context, DataChunk &input,
|
329
329
|
DataChunk &chunk, OperatorState &state_p) const {
|
330
|
-
auto &state = (
|
331
|
-
auto &gstate = (
|
330
|
+
auto &state = state_p.Cast<PhysicalNestedLoopJoinState>();
|
331
|
+
auto &gstate = sink_state->Cast<NestedLoopJoinGlobalState>();
|
332
332
|
|
333
333
|
idx_t match_count;
|
334
334
|
do {
|
@@ -412,7 +412,7 @@ class NestedLoopJoinGlobalScanState : public GlobalSourceState {
|
|
412
412
|
public:
|
413
413
|
explicit NestedLoopJoinGlobalScanState(const PhysicalNestedLoopJoin &op) : op(op) {
|
414
414
|
D_ASSERT(op.sink_state);
|
415
|
-
auto &sink =
|
415
|
+
auto &sink = op.sink_state->Cast<NestedLoopJoinGlobalState>();
|
416
416
|
sink.right_outer.InitializeScan(sink.right_payload_data, scan_state);
|
417
417
|
}
|
418
418
|
|
@@ -421,7 +421,7 @@ public:
|
|
421
421
|
|
422
422
|
public:
|
423
423
|
idx_t MaxThreads() override {
|
424
|
-
auto &sink =
|
424
|
+
auto &sink = op.sink_state->Cast<NestedLoopJoinGlobalState>();
|
425
425
|
return sink.right_outer.MaxThreads();
|
426
426
|
}
|
427
427
|
};
|
@@ -430,7 +430,7 @@ class NestedLoopJoinLocalScanState : public LocalSourceState {
|
|
430
430
|
public:
|
431
431
|
explicit NestedLoopJoinLocalScanState(const PhysicalNestedLoopJoin &op, NestedLoopJoinGlobalScanState &gstate) {
|
432
432
|
D_ASSERT(op.sink_state);
|
433
|
-
auto &sink =
|
433
|
+
auto &sink = op.sink_state->Cast<NestedLoopJoinGlobalState>();
|
434
434
|
sink.right_outer.InitializeScan(gstate.scan_state, scan_state);
|
435
435
|
}
|
436
436
|
|
@@ -450,7 +450,7 @@ void PhysicalNestedLoopJoin::GetData(ExecutionContext &context, DataChunk &chunk
|
|
450
450
|
LocalSourceState &lstate_p) const {
|
451
451
|
D_ASSERT(IsRightOuterJoin(join_type));
|
452
452
|
// check if we need to scan any unmatched tuples from the RHS for the full/right outer join
|
453
|
-
auto &sink = (
|
453
|
+
auto &sink = sink_state->Cast<NestedLoopJoinGlobalState>();
|
454
454
|
auto &gstate = (NestedLoopJoinGlobalScanState &)gstate_p;
|
455
455
|
auto &lstate = (NestedLoopJoinLocalScanState &)lstate_p;
|
456
456
|
|
@@ -110,8 +110,8 @@ unique_ptr<LocalSinkState> PhysicalPiecewiseMergeJoin::GetLocalSinkState(Executi
|
|
110
110
|
|
111
111
|
SinkResultType PhysicalPiecewiseMergeJoin::Sink(ExecutionContext &context, GlobalSinkState &gstate_p,
|
112
112
|
LocalSinkState &lstate_p, DataChunk &input) const {
|
113
|
-
auto &gstate = (
|
114
|
-
auto &lstate = (
|
113
|
+
auto &gstate = gstate_p.Cast<MergeJoinGlobalState>();
|
114
|
+
auto &lstate = lstate_p.Cast<MergeJoinLocalState>();
|
115
115
|
|
116
116
|
gstate.Sink(input, lstate);
|
117
117
|
|
@@ -120,8 +120,8 @@ SinkResultType PhysicalPiecewiseMergeJoin::Sink(ExecutionContext &context, Globa
|
|
120
120
|
|
121
121
|
void PhysicalPiecewiseMergeJoin::Combine(ExecutionContext &context, GlobalSinkState &gstate_p,
|
122
122
|
LocalSinkState &lstate_p) const {
|
123
|
-
auto &gstate = (
|
124
|
-
auto &lstate = (
|
123
|
+
auto &gstate = gstate_p.Cast<MergeJoinGlobalState>();
|
124
|
+
auto &lstate = lstate_p.Cast<MergeJoinLocalState>();
|
125
125
|
gstate.table->Combine(lstate.table);
|
126
126
|
auto &client_profiler = QueryProfiler::Get(context.client);
|
127
127
|
|
@@ -134,7 +134,7 @@ void PhysicalPiecewiseMergeJoin::Combine(ExecutionContext &context, GlobalSinkSt
|
|
134
134
|
//===--------------------------------------------------------------------===//
|
135
135
|
SinkFinalizeType PhysicalPiecewiseMergeJoin::Finalize(Pipeline &pipeline, Event &event, ClientContext &context,
|
136
136
|
GlobalSinkState &gstate_p) const {
|
137
|
-
auto &gstate = (
|
137
|
+
auto &gstate = gstate_p.Cast<MergeJoinGlobalState>();
|
138
138
|
auto &global_sort_state = gstate.table->global_sort_state;
|
139
139
|
|
140
140
|
if (IsRightOuterJoin(join_type)) {
|
@@ -386,7 +386,7 @@ static idx_t MergeJoinSimpleBlocks(PiecewiseMergeJoinState &lstate, MergeJoinGlo
|
|
386
386
|
void PhysicalPiecewiseMergeJoin::ResolveSimpleJoin(ExecutionContext &context, DataChunk &input, DataChunk &chunk,
|
387
387
|
OperatorState &state_p) const {
|
388
388
|
auto &state = (PiecewiseMergeJoinState &)state_p;
|
389
|
-
auto &gstate = (
|
389
|
+
auto &gstate = sink_state->Cast<MergeJoinGlobalState>();
|
390
390
|
|
391
391
|
state.ResolveJoinKeys(input);
|
392
392
|
auto &lhs_table = *state.lhs_local_table;
|
@@ -508,7 +508,7 @@ static idx_t MergeJoinComplexBlocks(BlockMergeInfo &l, BlockMergeInfo &r, const
|
|
508
508
|
OperatorResultType PhysicalPiecewiseMergeJoin::ResolveComplexJoin(ExecutionContext &context, DataChunk &input,
|
509
509
|
DataChunk &chunk, OperatorState &state_p) const {
|
510
510
|
auto &state = (PiecewiseMergeJoinState &)state_p;
|
511
|
-
auto &gstate = (
|
511
|
+
auto &gstate = sink_state->Cast<MergeJoinGlobalState>();
|
512
512
|
auto &rsorted = *gstate.table->global_sort_state.sorted_blocks[0];
|
513
513
|
const auto left_cols = input.ColumnCount();
|
514
514
|
const auto tail_cols = conditions.size() - 1;
|
@@ -623,7 +623,7 @@ OperatorResultType PhysicalPiecewiseMergeJoin::ResolveComplexJoin(ExecutionConte
|
|
623
623
|
OperatorResultType PhysicalPiecewiseMergeJoin::ExecuteInternal(ExecutionContext &context, DataChunk &input,
|
624
624
|
DataChunk &chunk, GlobalOperatorState &gstate_p,
|
625
625
|
OperatorState &state) const {
|
626
|
-
auto &gstate = (
|
626
|
+
auto &gstate = sink_state->Cast<MergeJoinGlobalState>();
|
627
627
|
|
628
628
|
if (gstate.Count() == 0) {
|
629
629
|
// empty RHS
|
@@ -668,7 +668,7 @@ public:
|
|
668
668
|
|
669
669
|
public:
|
670
670
|
idx_t MaxThreads() override {
|
671
|
-
auto &sink =
|
671
|
+
auto &sink = op.sink_state->Cast<MergeJoinGlobalState>();
|
672
672
|
return sink.Count() / (STANDARD_VECTOR_SIZE * idx_t(10));
|
673
673
|
}
|
674
674
|
};
|
@@ -681,7 +681,7 @@ void PhysicalPiecewiseMergeJoin::GetData(ExecutionContext &context, DataChunk &r
|
|
681
681
|
LocalSourceState &lstate) const {
|
682
682
|
D_ASSERT(IsRightOuterJoin(join_type));
|
683
683
|
// check if we need to scan any unmatched tuples from the RHS for the full/right outer join
|
684
|
-
auto &sink = (
|
684
|
+
auto &sink = sink_state->Cast<MergeJoinGlobalState>();
|
685
685
|
auto &state = (PiecewiseJoinScanState &)gstate;
|
686
686
|
|
687
687
|
lock_guard<mutex> l(state.lock);
|
@@ -46,7 +46,7 @@ unique_ptr<GlobalSinkState> PhysicalPositionalJoin::GetGlobalSinkState(ClientCon
|
|
46
46
|
|
47
47
|
SinkResultType PhysicalPositionalJoin::Sink(ExecutionContext &context, GlobalSinkState &state, LocalSinkState &lstate_p,
|
48
48
|
DataChunk &input) const {
|
49
|
-
auto &sink = (
|
49
|
+
auto &sink = state.Cast<PositionalJoinGlobalState>();
|
50
50
|
lock_guard<mutex> client_guard(sink.rhs_lock);
|
51
51
|
sink.rhs.Append(sink.append_state, input);
|
52
52
|
return SinkResultType::NEED_MORE_INPUT;
|
@@ -136,7 +136,7 @@ void PositionalJoinGlobalState::Execute(DataChunk &input, DataChunk &output) {
|
|
136
136
|
|
137
137
|
OperatorResultType PhysicalPositionalJoin::Execute(ExecutionContext &context, DataChunk &input, DataChunk &chunk,
|
138
138
|
GlobalOperatorState &gstate, OperatorState &state_p) const {
|
139
|
-
auto &sink = (
|
139
|
+
auto &sink = sink_state->Cast<PositionalJoinGlobalState>();
|
140
140
|
sink.Execute(input, chunk);
|
141
141
|
return OperatorResultType::NEED_MORE_INPUT;
|
142
142
|
}
|
@@ -173,7 +173,7 @@ void PositionalJoinGlobalState::GetData(DataChunk &output) {
|
|
173
173
|
|
174
174
|
void PhysicalPositionalJoin::GetData(ExecutionContext &context, DataChunk &result, GlobalSourceState &gstate,
|
175
175
|
LocalSourceState &lstate) const {
|
176
|
-
auto &sink = (
|
176
|
+
auto &sink = sink_state->Cast<PositionalJoinGlobalState>();
|
177
177
|
sink.GetData(result);
|
178
178
|
}
|
179
179
|
|
@@ -71,8 +71,8 @@ unique_ptr<LocalSinkState> PhysicalOrder::GetLocalSinkState(ExecutionContext &co
|
|
71
71
|
|
72
72
|
SinkResultType PhysicalOrder::Sink(ExecutionContext &context, GlobalSinkState &gstate_p, LocalSinkState &lstate_p,
|
73
73
|
DataChunk &input) const {
|
74
|
-
auto &gstate = (
|
75
|
-
auto &lstate = (
|
74
|
+
auto &gstate = gstate_p.Cast<OrderGlobalSinkState>();
|
75
|
+
auto &lstate = lstate_p.Cast<OrderLocalSinkState>();
|
76
76
|
|
77
77
|
auto &global_sort_state = gstate.global_sort_state;
|
78
78
|
auto &local_sort_state = lstate.local_sort_state;
|
@@ -103,8 +103,8 @@ SinkResultType PhysicalOrder::Sink(ExecutionContext &context, GlobalSinkState &g
|
|
103
103
|
}
|
104
104
|
|
105
105
|
void PhysicalOrder::Combine(ExecutionContext &context, GlobalSinkState &gstate_p, LocalSinkState &lstate_p) const {
|
106
|
-
auto &gstate = (
|
107
|
-
auto &lstate = (
|
106
|
+
auto &gstate = gstate_p.Cast<OrderGlobalSinkState>();
|
107
|
+
auto &lstate = lstate_p.Cast<OrderLocalSinkState>();
|
108
108
|
gstate.global_sort_state.AddLocalState(lstate.local_sort_state);
|
109
109
|
}
|
110
110
|
|
@@ -165,7 +165,7 @@ public:
|
|
165
165
|
|
166
166
|
SinkFinalizeType PhysicalOrder::Finalize(Pipeline &pipeline, Event &event, ClientContext &context,
|
167
167
|
GlobalSinkState &gstate_p) const {
|
168
|
-
auto &state = (
|
168
|
+
auto &state = gstate_p.Cast<OrderGlobalSinkState>();
|
169
169
|
auto &global_sort_state = state.global_sort_state;
|
170
170
|
|
171
171
|
if (global_sort_state.sorted_blocks.empty()) {
|
@@ -215,7 +215,7 @@ public:
|
|
215
215
|
};
|
216
216
|
|
217
217
|
unique_ptr<GlobalSourceState> PhysicalOrder::GetGlobalSourceState(ClientContext &context) const {
|
218
|
-
auto &sink =
|
218
|
+
auto &sink = this->sink_state->Cast<OrderGlobalSinkState>();
|
219
219
|
return make_uniq<PhysicalOrderGlobalSourceState>(sink);
|
220
220
|
}
|
221
221
|
|
@@ -232,14 +232,14 @@ public:
|
|
232
232
|
|
233
233
|
unique_ptr<LocalSourceState> PhysicalOrder::GetLocalSourceState(ExecutionContext &context,
|
234
234
|
GlobalSourceState &gstate_p) const {
|
235
|
-
auto &gstate = (
|
235
|
+
auto &gstate = gstate_p.Cast<PhysicalOrderGlobalSourceState>();
|
236
236
|
return make_uniq<PhysicalOrderLocalSourceState>(gstate);
|
237
237
|
}
|
238
238
|
|
239
239
|
void PhysicalOrder::GetData(ExecutionContext &context, DataChunk &chunk, GlobalSourceState &gstate_p,
|
240
240
|
LocalSourceState &lstate_p) const {
|
241
|
-
auto &gstate = (
|
242
|
-
auto &lstate = (
|
241
|
+
auto &gstate = gstate_p.Cast<PhysicalOrderGlobalSourceState>();
|
242
|
+
auto &lstate = lstate_p.Cast<PhysicalOrderLocalSourceState>();
|
243
243
|
|
244
244
|
if (lstate.scanner && lstate.scanner->Remaining() == 0) {
|
245
245
|
lstate.batch_index = gstate.next_batch_index++;
|
@@ -251,7 +251,7 @@ void PhysicalOrder::GetData(ExecutionContext &context, DataChunk &chunk, GlobalS
|
|
251
251
|
}
|
252
252
|
|
253
253
|
if (!lstate.scanner) {
|
254
|
-
auto &sink =
|
254
|
+
auto &sink = this->sink_state->Cast<OrderGlobalSinkState>();
|
255
255
|
auto &global_sort_state = sink.global_sort_state;
|
256
256
|
lstate.scanner = make_uniq<PayloadScanner>(global_sort_state, lstate.batch_index, true);
|
257
257
|
}
|
@@ -261,7 +261,7 @@ void PhysicalOrder::GetData(ExecutionContext &context, DataChunk &chunk, GlobalS
|
|
261
261
|
|
262
262
|
idx_t PhysicalOrder::GetBatchIndex(ExecutionContext &context, DataChunk &chunk, GlobalSourceState &gstate_p,
|
263
263
|
LocalSourceState &lstate_p) const {
|
264
|
-
auto &lstate = (
|
264
|
+
auto &lstate = lstate_p.Cast<PhysicalOrderLocalSourceState>();
|
265
265
|
return lstate.batch_index;
|
266
266
|
}
|
267
267
|
|
@@ -438,7 +438,7 @@ unique_ptr<GlobalSinkState> PhysicalTopN::GetGlobalSinkState(ClientContext &cont
|
|
438
438
|
SinkResultType PhysicalTopN::Sink(ExecutionContext &context, GlobalSinkState &state, LocalSinkState &lstate,
|
439
439
|
DataChunk &input) const {
|
440
440
|
// append to the local sink state
|
441
|
-
auto &sink = (
|
441
|
+
auto &sink = lstate.Cast<TopNLocalState>();
|
442
442
|
sink.heap.Sink(input);
|
443
443
|
sink.heap.Reduce();
|
444
444
|
return SinkResultType::NEED_MORE_INPUT;
|
@@ -448,8 +448,8 @@ SinkResultType PhysicalTopN::Sink(ExecutionContext &context, GlobalSinkState &st
|
|
448
448
|
// Combine
|
449
449
|
//===--------------------------------------------------------------------===//
|
450
450
|
void PhysicalTopN::Combine(ExecutionContext &context, GlobalSinkState &state, LocalSinkState &lstate_p) const {
|
451
|
-
auto &gstate = (
|
452
|
-
auto &lstate = (
|
451
|
+
auto &gstate = state.Cast<TopNGlobalState>();
|
452
|
+
auto &lstate = lstate_p.Cast<TopNLocalState>();
|
453
453
|
|
454
454
|
// scan the local top N and append it to the global heap
|
455
455
|
lock_guard<mutex> glock(gstate.lock);
|
@@ -461,7 +461,7 @@ void PhysicalTopN::Combine(ExecutionContext &context, GlobalSinkState &state, Lo
|
|
461
461
|
//===--------------------------------------------------------------------===//
|
462
462
|
SinkFinalizeType PhysicalTopN::Finalize(Pipeline &pipeline, Event &event, ClientContext &context,
|
463
463
|
GlobalSinkState &gstate_p) const {
|
464
|
-
auto &gstate = (
|
464
|
+
auto &gstate = gstate_p.Cast<TopNGlobalState>();
|
465
465
|
// global finalize: compute the final top N
|
466
466
|
gstate.heap.Finalize();
|
467
467
|
return SinkFinalizeType::READY;
|
@@ -485,8 +485,8 @@ void PhysicalTopN::GetData(ExecutionContext &context, DataChunk &chunk, GlobalSo
|
|
485
485
|
if (limit == 0) {
|
486
486
|
return;
|
487
487
|
}
|
488
|
-
auto &state = (
|
489
|
-
auto &gstate = (
|
488
|
+
auto &state = gstate_p.Cast<TopNOperatorState>();
|
489
|
+
auto &gstate = sink_state->Cast<TopNGlobalState>();
|
490
490
|
|
491
491
|
if (!state.initialized) {
|
492
492
|
gstate.heap.InitializeScan(state.state, true);
|
@@ -285,8 +285,8 @@ unique_ptr<LocalSinkState> PhysicalBatchInsert::GetLocalSinkState(ExecutionConte
|
|
285
285
|
|
286
286
|
SinkResultType PhysicalBatchInsert::Sink(ExecutionContext &context, GlobalSinkState &state, LocalSinkState &lstate_p,
|
287
287
|
DataChunk &chunk) const {
|
288
|
-
auto &gstate = (
|
289
|
-
auto &lstate = (
|
288
|
+
auto &gstate = state.Cast<BatchInsertGlobalState>();
|
289
|
+
auto &lstate = lstate_p.Cast<BatchInsertLocalState>();
|
290
290
|
|
291
291
|
auto table = gstate.table;
|
292
292
|
PhysicalInsert::ResolveDefaults(table, chunk, column_index_map, lstate.default_executor, lstate.insert_chunk);
|
@@ -319,8 +319,8 @@ SinkResultType PhysicalBatchInsert::Sink(ExecutionContext &context, GlobalSinkSt
|
|
319
319
|
|
320
320
|
void PhysicalBatchInsert::Combine(ExecutionContext &context, GlobalSinkState &gstate_p,
|
321
321
|
LocalSinkState &lstate_p) const {
|
322
|
-
auto &gstate = (
|
323
|
-
auto &lstate = (
|
322
|
+
auto &gstate = gstate_p.Cast<BatchInsertGlobalState>();
|
323
|
+
auto &lstate = lstate_p.Cast<BatchInsertLocalState>();
|
324
324
|
auto &client_profiler = QueryProfiler::Get(context.client);
|
325
325
|
context.thread.profiler.Flush(this, &lstate.default_executor, "default_executor", 1);
|
326
326
|
client_profiler.Flush(context.thread.profiler);
|
@@ -338,7 +338,7 @@ void PhysicalBatchInsert::Combine(ExecutionContext &context, GlobalSinkState &gs
|
|
338
338
|
|
339
339
|
SinkFinalizeType PhysicalBatchInsert::Finalize(Pipeline &pipeline, Event &event, ClientContext &context,
|
340
340
|
GlobalSinkState &gstate_p) const {
|
341
|
-
auto &gstate = (
|
341
|
+
auto &gstate = gstate_p.Cast<BatchInsertGlobalState>();
|
342
342
|
|
343
343
|
// in the finalize, do a final pass over all of the collections we created and try to merge smaller collections
|
344
344
|
// together
|
@@ -403,8 +403,8 @@ unique_ptr<GlobalSourceState> PhysicalBatchInsert::GetGlobalSourceState(ClientCo
|
|
403
403
|
|
404
404
|
void PhysicalBatchInsert::GetData(ExecutionContext &context, DataChunk &chunk, GlobalSourceState &gstate,
|
405
405
|
LocalSourceState &lstate) const {
|
406
|
-
auto &state = (
|
407
|
-
auto &insert_gstate = (
|
406
|
+
auto &state = gstate.Cast<BatchInsertSourceState>();
|
407
|
+
auto &insert_gstate = sink_state->Cast<BatchInsertGlobalState>();
|
408
408
|
if (state.finished) {
|
409
409
|
return;
|
410
410
|
}
|
@@ -57,8 +57,8 @@ PhysicalCopyToFile::PhysicalCopyToFile(vector<LogicalType> types, CopyFunction f
|
|
57
57
|
|
58
58
|
SinkResultType PhysicalCopyToFile::Sink(ExecutionContext &context, GlobalSinkState &gstate, LocalSinkState &lstate,
|
59
59
|
DataChunk &input) const {
|
60
|
-
auto &g = (
|
61
|
-
auto &l = (
|
60
|
+
auto &g = gstate.Cast<CopyToFunctionGlobalState>();
|
61
|
+
auto &l = lstate.Cast<CopyToFunctionLocalState>();
|
62
62
|
|
63
63
|
if (partition_output) {
|
64
64
|
l.part_buffer->Append(*l.part_buffer_append_state, input);
|
@@ -96,8 +96,8 @@ static string CreateDirRecursive(const vector<idx_t> &cols, const vector<string>
|
|
96
96
|
}
|
97
97
|
|
98
98
|
void PhysicalCopyToFile::Combine(ExecutionContext &context, GlobalSinkState &gstate, LocalSinkState &lstate) const {
|
99
|
-
auto &g = (
|
100
|
-
auto &l = (
|
99
|
+
auto &g = gstate.Cast<CopyToFunctionGlobalState>();
|
100
|
+
auto &l = lstate.Cast<CopyToFunctionLocalState>();
|
101
101
|
|
102
102
|
if (partition_output) {
|
103
103
|
auto &fs = FileSystem::GetFileSystem(context.client);
|
@@ -143,7 +143,7 @@ void PhysicalCopyToFile::Combine(ExecutionContext &context, GlobalSinkState &gst
|
|
143
143
|
|
144
144
|
SinkFinalizeType PhysicalCopyToFile::Finalize(Pipeline &pipeline, Event &event, ClientContext &context,
|
145
145
|
GlobalSinkState &gstate_p) const {
|
146
|
-
auto &gstate = (
|
146
|
+
auto &gstate = gstate_p.Cast<CopyToFunctionGlobalState>();
|
147
147
|
if (per_thread_output || partition_output) {
|
148
148
|
// already happened in combine
|
149
149
|
return SinkFinalizeType::READY;
|
@@ -164,7 +164,7 @@ unique_ptr<LocalSinkState> PhysicalCopyToFile::GetLocalSinkState(ExecutionContex
|
|
164
164
|
if (partition_output) {
|
165
165
|
auto state = make_uniq<CopyToFunctionLocalState>(nullptr);
|
166
166
|
{
|
167
|
-
auto &g = (
|
167
|
+
auto &g = sink_state->Cast<CopyToFunctionGlobalState>();
|
168
168
|
lock_guard<mutex> glock(g.lock);
|
169
169
|
state->writer_offset = g.last_file_offset++;
|
170
170
|
|
@@ -179,7 +179,7 @@ unique_ptr<LocalSinkState> PhysicalCopyToFile::GetLocalSinkState(ExecutionContex
|
|
179
179
|
if (per_thread_output) {
|
180
180
|
idx_t this_file_offset;
|
181
181
|
{
|
182
|
-
auto &g = (
|
182
|
+
auto &g = sink_state->Cast<CopyToFunctionGlobalState>();
|
183
183
|
lock_guard<mutex> glock(g.lock);
|
184
184
|
this_file_offset = g.last_file_offset++;
|
185
185
|
}
|
@@ -244,7 +244,7 @@ unique_ptr<GlobalSourceState> PhysicalCopyToFile::GetGlobalSourceState(ClientCon
|
|
244
244
|
void PhysicalCopyToFile::GetData(ExecutionContext &context, DataChunk &chunk, GlobalSourceState &gstate,
|
245
245
|
LocalSourceState &lstate) const {
|
246
246
|
auto &state = (CopyToFileState &)gstate;
|
247
|
-
auto &g = (
|
247
|
+
auto &g = sink_state->Cast<CopyToFunctionGlobalState>();
|
248
248
|
if (state.finished) {
|
249
249
|
return;
|
250
250
|
}
|
@@ -32,8 +32,8 @@ public:
|
|
32
32
|
|
33
33
|
SinkResultType PhysicalDelete::Sink(ExecutionContext &context, GlobalSinkState &state, LocalSinkState &lstate,
|
34
34
|
DataChunk &input) const {
|
35
|
-
auto &gstate = (
|
36
|
-
auto &ustate = (
|
35
|
+
auto &gstate = state.Cast<DeleteGlobalState>();
|
36
|
+
auto &ustate = lstate.Cast<DeleteLocalState>();
|
37
37
|
|
38
38
|
// get rows and
|
39
39
|
auto &transaction = DuckTransaction::Get(context.client, table.db);
|
@@ -72,7 +72,7 @@ public:
|
|
72
72
|
explicit DeleteSourceState(const PhysicalDelete &op) : finished(false) {
|
73
73
|
if (op.return_chunk) {
|
74
74
|
D_ASSERT(op.sink_state);
|
75
|
-
auto &g =
|
75
|
+
auto &g = op.sink_state->Cast<DeleteGlobalState>();
|
76
76
|
g.return_collection.InitializeScan(scan_state);
|
77
77
|
}
|
78
78
|
}
|
@@ -87,8 +87,8 @@ unique_ptr<GlobalSourceState> PhysicalDelete::GetGlobalSourceState(ClientContext
|
|
87
87
|
|
88
88
|
void PhysicalDelete::GetData(ExecutionContext &context, DataChunk &chunk, GlobalSourceState &gstate,
|
89
89
|
LocalSourceState &lstate) const {
|
90
|
-
auto &state = (
|
91
|
-
auto &g = (
|
90
|
+
auto &state = gstate.Cast<DeleteSourceState>();
|
91
|
+
auto &g = sink_state->Cast<DeleteGlobalState>();
|
92
92
|
if (state.finished) {
|
93
93
|
return;
|
94
94
|
}
|
@@ -97,7 +97,7 @@ unique_ptr<GlobalSourceState> PhysicalExport::GetGlobalSourceState(ClientContext
|
|
97
97
|
|
98
98
|
void PhysicalExport::GetData(ExecutionContext &context, DataChunk &chunk, GlobalSourceState &gstate,
|
99
99
|
LocalSourceState &lstate) const {
|
100
|
-
auto &state = (
|
100
|
+
auto &state = gstate.Cast<ExportSourceState>();
|
101
101
|
if (state.finished) {
|
102
102
|
return;
|
103
103
|
}
|