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
package/binding.gyp
CHANGED
@@ -224,18 +224,18 @@
|
|
224
224
|
"src/duckdb/third_party/zstd/compress/zstd_lazy.cpp",
|
225
225
|
"src/duckdb/third_party/zstd/compress/zstd_ldm.cpp",
|
226
226
|
"src/duckdb/third_party/zstd/compress/zstd_opt.cpp",
|
227
|
-
"src/duckdb/extension/icu/./icu-table-range.cpp",
|
228
|
-
"src/duckdb/extension/icu/./icu-datepart.cpp",
|
229
|
-
"src/duckdb/extension/icu/./icu-timebucket.cpp",
|
230
|
-
"src/duckdb/extension/icu/./icu-timezone.cpp",
|
231
|
-
"src/duckdb/extension/icu/./icu-datesub.cpp",
|
232
|
-
"src/duckdb/extension/icu/./icu-list-range.cpp",
|
233
227
|
"src/duckdb/extension/icu/./icu-datetrunc.cpp",
|
234
|
-
"src/duckdb/extension/icu/./icu-extension.cpp",
|
235
228
|
"src/duckdb/extension/icu/./icu-strptime.cpp",
|
229
|
+
"src/duckdb/extension/icu/./icu-timezone.cpp",
|
230
|
+
"src/duckdb/extension/icu/./icu-extension.cpp",
|
231
|
+
"src/duckdb/extension/icu/./icu-datepart.cpp",
|
236
232
|
"src/duckdb/extension/icu/./icu-dateadd.cpp",
|
237
|
-
"src/duckdb/extension/icu/./icu-
|
233
|
+
"src/duckdb/extension/icu/./icu-list-range.cpp",
|
234
|
+
"src/duckdb/extension/icu/./icu-table-range.cpp",
|
235
|
+
"src/duckdb/extension/icu/./icu-timebucket.cpp",
|
238
236
|
"src/duckdb/extension/icu/./icu-makedate.cpp",
|
237
|
+
"src/duckdb/extension/icu/./icu-datefunc.cpp",
|
238
|
+
"src/duckdb/extension/icu/./icu-datesub.cpp",
|
239
239
|
"src/duckdb/ub_extension_icu_third_party_icu_common.cpp",
|
240
240
|
"src/duckdb/ub_extension_icu_third_party_icu_i18n.cpp",
|
241
241
|
"src/duckdb/extension/icu/third_party/icu/stubdata/stubdata.cpp",
|
package/package.json
CHANGED
@@ -197,7 +197,7 @@ struct ICUDateAdd : public ICUDateFunc {
|
|
197
197
|
static void ExecuteUnary(DataChunk &args, ExpressionState &state, Vector &result) {
|
198
198
|
D_ASSERT(args.ColumnCount() == 1);
|
199
199
|
|
200
|
-
auto &func_expr =
|
200
|
+
auto &func_expr = state.expr.Cast<BoundFunctionExpression>();
|
201
201
|
auto &info = (BindData &)*func_expr.bind_info;
|
202
202
|
CalendarPtr calendar(info.calendar->clone());
|
203
203
|
|
@@ -217,7 +217,7 @@ struct ICUDateAdd : public ICUDateFunc {
|
|
217
217
|
static void ExecuteBinary(DataChunk &args, ExpressionState &state, Vector &result) {
|
218
218
|
D_ASSERT(args.ColumnCount() == 2);
|
219
219
|
|
220
|
-
auto &func_expr =
|
220
|
+
auto &func_expr = state.expr.Cast<BoundFunctionExpression>();
|
221
221
|
auto &info = (BindData &)*func_expr.bind_info;
|
222
222
|
CalendarPtr calendar(info.calendar->clone());
|
223
223
|
|
@@ -234,7 +234,7 @@ struct ICUDatePart : public ICUDateFunc {
|
|
234
234
|
D_ASSERT(args.ColumnCount() == 1);
|
235
235
|
auto &date_arg = args.data[0];
|
236
236
|
|
237
|
-
auto &func_expr =
|
237
|
+
auto &func_expr = state.expr.Cast<BoundFunctionExpression>();
|
238
238
|
auto &info = (BIND_TYPE &)*func_expr.bind_info;
|
239
239
|
CalendarPtr calendar_ptr(info.calendar->clone());
|
240
240
|
auto calendar = calendar_ptr.get();
|
@@ -258,7 +258,7 @@ struct ICUDatePart : public ICUDateFunc {
|
|
258
258
|
auto &part_arg = args.data[0];
|
259
259
|
auto &date_arg = args.data[1];
|
260
260
|
|
261
|
-
auto &func_expr =
|
261
|
+
auto &func_expr = state.expr.Cast<BoundFunctionExpression>();
|
262
262
|
auto &info = (BIND_TYPE &)*func_expr.bind_info;
|
263
263
|
CalendarPtr calendar_ptr(info.calendar->clone());
|
264
264
|
auto calendar = calendar_ptr.get();
|
@@ -280,7 +280,7 @@ struct ICUDatePart : public ICUDateFunc {
|
|
280
280
|
template <typename INPUT_TYPE>
|
281
281
|
static void StructFunction(DataChunk &args, ExpressionState &state, Vector &result) {
|
282
282
|
using BIND_TYPE = BindAdapterData<int64_t>;
|
283
|
-
auto &func_expr =
|
283
|
+
auto &func_expr = state.expr.Cast<BoundFunctionExpression>();
|
284
284
|
auto &info = (BIND_TYPE &)*func_expr.bind_info;
|
285
285
|
CalendarPtr calendar_ptr(info.calendar->clone());
|
286
286
|
auto calendar = calendar_ptr.get();
|
@@ -95,7 +95,7 @@ struct ICUCalendarSub : public ICUDateFunc {
|
|
95
95
|
auto &startdate_arg = args.data[1];
|
96
96
|
auto &enddate_arg = args.data[2];
|
97
97
|
|
98
|
-
auto &func_expr =
|
98
|
+
auto &func_expr = state.expr.Cast<BoundFunctionExpression>();
|
99
99
|
auto &info = (BindData &)*func_expr.bind_info;
|
100
100
|
CalendarPtr calendar(info.calendar->clone());
|
101
101
|
|
@@ -217,7 +217,7 @@ struct ICUCalendarDiff : public ICUDateFunc {
|
|
217
217
|
auto &startdate_arg = args.data[1];
|
218
218
|
auto &enddate_arg = args.data[2];
|
219
219
|
|
220
|
-
auto &func_expr =
|
220
|
+
auto &func_expr = state.expr.Cast<BoundFunctionExpression>();
|
221
221
|
auto &info = (BindData &)*func_expr.bind_info;
|
222
222
|
CalendarPtr calendar_ptr(info.calendar->clone());
|
223
223
|
auto calendar = calendar_ptr.get();
|
@@ -98,7 +98,7 @@ struct ICUDateTrunc : public ICUDateFunc {
|
|
98
98
|
auto &part_arg = args.data[0];
|
99
99
|
auto &date_arg = args.data[1];
|
100
100
|
|
101
|
-
auto &func_expr =
|
101
|
+
auto &func_expr = state.expr.Cast<BoundFunctionExpression>();
|
102
102
|
auto &info = (BindData &)*func_expr.bind_info;
|
103
103
|
CalendarPtr calendar(info.calendar->clone());
|
104
104
|
|
@@ -61,7 +61,7 @@ struct IcuBindData : public FunctionData {
|
|
61
61
|
}
|
62
62
|
|
63
63
|
bool Equals(const FunctionData &other_p) const override {
|
64
|
-
auto &other = (
|
64
|
+
auto &other = other_p.Cast<IcuBindData>();
|
65
65
|
return language == other.language && country == other.country;
|
66
66
|
}
|
67
67
|
};
|
@@ -86,8 +86,8 @@ static int32_t ICUGetSortKey(icu::Collator &collator, string_t input, duckdb::un
|
|
86
86
|
static void ICUCollateFunction(DataChunk &args, ExpressionState &state, Vector &result) {
|
87
87
|
const char HEX_TABLE[] = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F'};
|
88
88
|
|
89
|
-
auto &func_expr =
|
90
|
-
auto &info =
|
89
|
+
auto &func_expr = state.expr.Cast<BoundFunctionExpression>();
|
90
|
+
auto &info = func_expr.bind_info->Cast<IcuBindData>();
|
91
91
|
auto &collator = *info.collator;
|
92
92
|
|
93
93
|
duckdb::unique_ptr<char[]> buffer;
|
@@ -127,7 +127,7 @@ struct ICUListRange : public ICUDateFunc {
|
|
127
127
|
D_ASSERT(result.GetType().id() == LogicalTypeId::LIST);
|
128
128
|
D_ASSERT(args.ColumnCount() == 3);
|
129
129
|
|
130
|
-
auto &func_expr =
|
130
|
+
auto &func_expr = state.expr.Cast<BoundFunctionExpression>();
|
131
131
|
auto &bind_info = (BindData &)*func_expr.bind_info;
|
132
132
|
CalendarPtr calendar_ptr(bind_info.calendar->clone());
|
133
133
|
auto calendar = calendar_ptr.get();
|
@@ -35,7 +35,7 @@ struct ICUMakeTimestampTZFunc : public ICUDateFunc {
|
|
35
35
|
|
36
36
|
template <typename T>
|
37
37
|
static void Execute(DataChunk &input, ExpressionState &state, Vector &result) {
|
38
|
-
auto &func_expr =
|
38
|
+
auto &func_expr = state.expr.Cast<BoundFunctionExpression>();
|
39
39
|
auto &info = (BindData &)*func_expr.bind_info;
|
40
40
|
CalendarPtr calendar_ptr(info.calendar->clone());
|
41
41
|
auto calendar = calendar_ptr.get();
|
@@ -28,7 +28,7 @@ struct ICUStrptime : public ICUDateFunc {
|
|
28
28
|
StrpTimeFormat format;
|
29
29
|
|
30
30
|
bool Equals(const FunctionData &other_p) const override {
|
31
|
-
auto &other = (
|
31
|
+
auto &other = other_p.Cast<ICUStrptimeBindData>();
|
32
32
|
return format.format_specifier == other.format.format_specifier;
|
33
33
|
}
|
34
34
|
duckdb::unique_ptr<FunctionData> Copy() const override {
|
@@ -91,8 +91,8 @@ struct ICUStrptime : public ICUDateFunc {
|
|
91
91
|
auto &str_arg = args.data[0];
|
92
92
|
auto &fmt_arg = args.data[1];
|
93
93
|
|
94
|
-
auto &func_expr =
|
95
|
-
auto &info =
|
94
|
+
auto &func_expr = state.expr.Cast<BoundFunctionExpression>();
|
95
|
+
auto &info = func_expr.bind_info->Cast<ICUStrptimeBindData>();
|
96
96
|
CalendarPtr calendar(info.calendar->clone());
|
97
97
|
auto &format = info.format;
|
98
98
|
|
@@ -145,7 +145,7 @@ struct ICUStrptime : public ICUDateFunc {
|
|
145
145
|
auto &catalog = Catalog::GetSystemCatalog(context);
|
146
146
|
auto entry = catalog.GetEntry(context, CatalogType::SCALAR_FUNCTION_ENTRY, DEFAULT_SCHEMA, name);
|
147
147
|
D_ASSERT(entry && entry->type == CatalogType::SCALAR_FUNCTION_ENTRY);
|
148
|
-
auto &func = (
|
148
|
+
auto &func = entry->Cast<ScalarFunctionCatalogEntry>();
|
149
149
|
vector<LogicalType> types {LogicalType::VARCHAR, LogicalType::VARCHAR};
|
150
150
|
string error;
|
151
151
|
|
@@ -162,7 +162,7 @@ struct ICUStrptime : public ICUDateFunc {
|
|
162
162
|
}
|
163
163
|
|
164
164
|
static bool CastFromVarchar(Vector &source, Vector &result, idx_t count, CastParameters ¶meters) {
|
165
|
-
auto &cast_data =
|
165
|
+
auto &cast_data = parameters.cast_data->Cast<CastData>();
|
166
166
|
auto info = (BindData *)cast_data.info.get();
|
167
167
|
CalendarPtr cal(info->calendar->clone());
|
168
168
|
|
@@ -283,7 +283,7 @@ struct ICUStrftime : public ICUDateFunc {
|
|
283
283
|
auto &src_arg = args.data[0];
|
284
284
|
auto &fmt_arg = args.data[1];
|
285
285
|
|
286
|
-
auto &func_expr =
|
286
|
+
auto &func_expr = state.expr.Cast<BoundFunctionExpression>();
|
287
287
|
auto &info = (BindData &)*func_expr.bind_info;
|
288
288
|
CalendarPtr calendar(info.calendar->clone());
|
289
289
|
const auto tz_name = info.tz_setting.c_str();
|
@@ -389,7 +389,7 @@ struct ICUStrftime : public ICUDateFunc {
|
|
389
389
|
}
|
390
390
|
|
391
391
|
static bool CastToVarchar(Vector &source, Vector &result, idx_t count, CastParameters ¶meters) {
|
392
|
-
auto &cast_data =
|
392
|
+
auto &cast_data = parameters.cast_data->Cast<CastData>();
|
393
393
|
auto info = (BindData *)cast_data.info.get();
|
394
394
|
CalendarPtr calendar(info->calendar->clone());
|
395
395
|
|
@@ -125,7 +125,7 @@ struct ICUTimeBucket : public ICUDateFunc {
|
|
125
125
|
static void ExecuteBinary(DataChunk &args, ExpressionState &state, Vector &result) {
|
126
126
|
D_ASSERT(args.ColumnCount() == 2);
|
127
127
|
|
128
|
-
auto &func_expr =
|
128
|
+
auto &func_expr = state.expr.Cast<BoundFunctionExpression>();
|
129
129
|
auto &info = (BindData &)*func_expr.bind_info;
|
130
130
|
CalendarPtr calendar(info.calendar->clone());
|
131
131
|
|
@@ -138,7 +138,7 @@ struct ICUTimeBucket : public ICUDateFunc {
|
|
138
138
|
static void ExecuteTernary(DataChunk &args, ExpressionState &state, Vector &result) {
|
139
139
|
D_ASSERT(args.ColumnCount() == 3);
|
140
140
|
|
141
|
-
auto &func_expr =
|
141
|
+
auto &func_expr = state.expr.Cast<BoundFunctionExpression>();
|
142
142
|
auto &info = (BindData &)*func_expr.bind_info;
|
143
143
|
CalendarPtr calendar(info.calendar->clone());
|
144
144
|
|
@@ -357,7 +357,7 @@ struct ICUTimeBucket : public ICUDateFunc {
|
|
357
357
|
static void ICUTimeBucketFunction(DataChunk &args, ExpressionState &state, Vector &result) {
|
358
358
|
D_ASSERT(args.ColumnCount() == 2);
|
359
359
|
|
360
|
-
auto &func_expr =
|
360
|
+
auto &func_expr = state.expr.Cast<BoundFunctionExpression>();
|
361
361
|
auto &info = (BindData &)*func_expr.bind_info;
|
362
362
|
CalendarPtr calendar_ptr(info.calendar->clone());
|
363
363
|
auto calendar = calendar_ptr.get();
|
@@ -413,7 +413,7 @@ struct ICUTimeBucket : public ICUDateFunc {
|
|
413
413
|
static void ICUTimeBucketOffsetFunction(DataChunk &args, ExpressionState &state, Vector &result) {
|
414
414
|
D_ASSERT(args.ColumnCount() == 3);
|
415
415
|
|
416
|
-
auto &func_expr =
|
416
|
+
auto &func_expr = state.expr.Cast<BoundFunctionExpression>();
|
417
417
|
auto &info = (BindData &)*func_expr.bind_info;
|
418
418
|
CalendarPtr calendar_ptr(info.calendar->clone());
|
419
419
|
auto calendar = calendar_ptr.get();
|
@@ -478,7 +478,7 @@ struct ICUTimeBucket : public ICUDateFunc {
|
|
478
478
|
static void ICUTimeBucketOriginFunction(DataChunk &args, ExpressionState &state, Vector &result) {
|
479
479
|
D_ASSERT(args.ColumnCount() == 3);
|
480
480
|
|
481
|
-
auto &func_expr =
|
481
|
+
auto &func_expr = state.expr.Cast<BoundFunctionExpression>();
|
482
482
|
auto &info = (BindData &)*func_expr.bind_info;
|
483
483
|
CalendarPtr calendar_ptr(info.calendar->clone());
|
484
484
|
auto calendar = calendar_ptr.get();
|
@@ -546,7 +546,7 @@ struct ICUTimeBucket : public ICUDateFunc {
|
|
546
546
|
static void ICUTimeBucketTimeZoneFunction(DataChunk &args, ExpressionState &state, Vector &result) {
|
547
547
|
D_ASSERT(args.ColumnCount() == 3);
|
548
548
|
|
549
|
-
auto &func_expr =
|
549
|
+
auto &func_expr = state.expr.Cast<BoundFunctionExpression>();
|
550
550
|
auto &info = (BindData &)*func_expr.bind_info;
|
551
551
|
CalendarPtr calendar_ptr(info.calendar->clone());
|
552
552
|
auto calendar = calendar_ptr.get();
|
@@ -124,7 +124,7 @@ struct ICUFromNaiveTimestamp : public ICUDateFunc {
|
|
124
124
|
}
|
125
125
|
|
126
126
|
static bool CastFromNaive(Vector &source, Vector &result, idx_t count, CastParameters ¶meters) {
|
127
|
-
auto &cast_data =
|
127
|
+
auto &cast_data = parameters.cast_data->Cast<CastData>();
|
128
128
|
auto info = (BindData *)cast_data.info.get();
|
129
129
|
CalendarPtr calendar(info->calendar->clone());
|
130
130
|
|
@@ -187,7 +187,7 @@ struct ICUToNaiveTimestamp : public ICUDateFunc {
|
|
187
187
|
}
|
188
188
|
|
189
189
|
static bool CastToNaive(Vector &source, Vector &result, idx_t count, CastParameters ¶meters) {
|
190
|
-
auto &cast_data =
|
190
|
+
auto &cast_data = parameters.cast_data->Cast<CastData>();
|
191
191
|
auto info = (BindData *)cast_data.info.get();
|
192
192
|
CalendarPtr calendar(info->calendar->clone());
|
193
193
|
|
@@ -246,7 +246,7 @@ struct ICULocalTimestampFunc : public ICUDateFunc {
|
|
246
246
|
}
|
247
247
|
|
248
248
|
static timestamp_t GetLocalTimestamp(ExpressionState &state) {
|
249
|
-
auto &func_expr =
|
249
|
+
auto &func_expr = state.expr.Cast<BoundFunctionExpression>();
|
250
250
|
auto &info = (BindDataNow &)*func_expr.bind_info;
|
251
251
|
CalendarPtr calendar_ptr(info.calendar->clone());
|
252
252
|
auto calendar = calendar_ptr.get();
|
@@ -295,7 +295,7 @@ struct ICULocalTimeFunc : public ICUDateFunc {
|
|
295
295
|
struct ICUTimeZoneFunc : public ICUDateFunc {
|
296
296
|
template <typename OP>
|
297
297
|
static void Execute(DataChunk &input, ExpressionState &state, Vector &result) {
|
298
|
-
auto &func_expr =
|
298
|
+
auto &func_expr = state.expr.Cast<BoundFunctionExpression>();
|
299
299
|
auto &info = (BindData &)*func_expr.bind_info;
|
300
300
|
CalendarPtr calendar_ptr(info.calendar->clone());
|
301
301
|
auto calendar = calendar_ptr.get();
|
@@ -33,7 +33,7 @@ public:
|
|
33
33
|
template <class T>
|
34
34
|
static void BinaryExecute(DataChunk &args, ExpressionState &state, Vector &result,
|
35
35
|
std::function<T(yyjson_val *, yyjson_alc *, Vector &)> fun) {
|
36
|
-
auto &func_expr =
|
36
|
+
auto &func_expr = state.expr.Cast<BoundFunctionExpression>();
|
37
37
|
const auto &info = (JSONReadFunctionData &)*func_expr.bind_info;
|
38
38
|
auto &lstate = JSONFunctionLocalState::ResetAndGet(state);
|
39
39
|
auto alc = lstate.json_allocator.GetYYJSONAllocator();
|
@@ -80,7 +80,7 @@ public:
|
|
80
80
|
template <class T>
|
81
81
|
static void ExecuteMany(DataChunk &args, ExpressionState &state, Vector &result,
|
82
82
|
std::function<T(yyjson_val *, yyjson_alc *, Vector &)> fun) {
|
83
|
-
auto &func_expr =
|
83
|
+
auto &func_expr = state.expr.Cast<BoundFunctionExpression>();
|
84
84
|
const auto &info = (JSONReadManyFunctionData &)*func_expr.bind_info;
|
85
85
|
auto &lstate = JSONFunctionLocalState::ResetAndGet(state);
|
86
86
|
auto alc = lstate.json_allocator.GetYYJSONAllocator();
|
@@ -13,7 +13,7 @@ namespace duckdb {
|
|
13
13
|
|
14
14
|
static BoundStatement CopyToJSONPlan(Binder &binder, CopyStatement &stmt) {
|
15
15
|
auto stmt_copy = stmt.Copy();
|
16
|
-
auto © = (
|
16
|
+
auto © = stmt_copy->Cast<CopyStatement>();
|
17
17
|
auto &info = *copy.info;
|
18
18
|
|
19
19
|
// Bind the select statement of the original to resolve the types
|
@@ -25,7 +25,7 @@ static BoundStatement CopyToJSONPlan(Binder &binder, CopyStatement &stmt) {
|
|
25
25
|
select_stmt->node = std::move(copy.select_statement);
|
26
26
|
auto subquery_ref = make_uniq<SubqueryRef>(std::move(select_stmt));
|
27
27
|
copy.select_statement = make_uniq_base<QueryNode, SelectNode>();
|
28
|
-
auto &new_select_node =
|
28
|
+
auto &new_select_node = copy.select_statement->Cast<SelectNode>();
|
29
29
|
new_select_node.from_table = std::move(subquery_ref);
|
30
30
|
|
31
31
|
// Create new select list
|
@@ -56,8 +56,8 @@ static BoundStatement CopyToJSONPlan(Binder &binder, CopyStatement &stmt) {
|
|
56
56
|
}
|
57
57
|
|
58
58
|
// Now create the struct_pack/to_json to create a JSON object per row
|
59
|
-
auto &select_node =
|
60
|
-
vector<
|
59
|
+
auto &select_node = copy.select_statement->Cast<SelectNode>();
|
60
|
+
vector<unique_ptr<ParsedExpression>> struct_pack_child;
|
61
61
|
struct_pack_child.emplace_back(make_uniq<FunctionExpression>("struct_pack", std::move(select_list)));
|
62
62
|
select_node.select_list.emplace_back(make_uniq<FunctionExpression>("to_json", std::move(struct_pack_child)));
|
63
63
|
|
@@ -421,7 +421,7 @@ static void CreateValues(const JSONCreateFunctionData &info, yyjson_mut_doc *doc
|
|
421
421
|
}
|
422
422
|
|
423
423
|
static void ObjectFunction(DataChunk &args, ExpressionState &state, Vector &result) {
|
424
|
-
auto &func_expr =
|
424
|
+
auto &func_expr = state.expr.Cast<BoundFunctionExpression>();
|
425
425
|
const auto &info = (JSONCreateFunctionData &)*func_expr.bind_info;
|
426
426
|
auto &lstate = JSONFunctionLocalState::ResetAndGet(state);
|
427
427
|
auto alc = lstate.json_allocator.GetYYJSONAllocator();
|
@@ -453,7 +453,7 @@ static void ObjectFunction(DataChunk &args, ExpressionState &state, Vector &resu
|
|
453
453
|
}
|
454
454
|
|
455
455
|
static void ArrayFunction(DataChunk &args, ExpressionState &state, Vector &result) {
|
456
|
-
auto &func_expr =
|
456
|
+
auto &func_expr = state.expr.Cast<BoundFunctionExpression>();
|
457
457
|
const auto &info = (JSONCreateFunctionData &)*func_expr.bind_info;
|
458
458
|
auto &lstate = JSONFunctionLocalState::ResetAndGet(state);
|
459
459
|
auto alc = lstate.json_allocator.GetYYJSONAllocator();
|
@@ -486,7 +486,7 @@ static void ArrayFunction(DataChunk &args, ExpressionState &state, Vector &resul
|
|
486
486
|
}
|
487
487
|
|
488
488
|
static void ToJSONFunction(DataChunk &args, ExpressionState &state, Vector &result) {
|
489
|
-
auto &func_expr =
|
489
|
+
auto &func_expr = state.expr.Cast<BoundFunctionExpression>();
|
490
490
|
const auto &info = (JSONCreateFunctionData &)*func_expr.bind_info;
|
491
491
|
auto &lstate = JSONFunctionLocalState::ResetAndGet(state);
|
492
492
|
auto alc = lstate.json_allocator.GetYYJSONAllocator();
|
@@ -74,8 +74,8 @@ static void JsonSerializeFunction(DataChunk &args, ExpressionState &state, Vecto
|
|
74
74
|
auto alc = local_state.json_allocator.GetYYJSONAllocator();
|
75
75
|
auto &inputs = args.data[0];
|
76
76
|
|
77
|
-
auto &func_expr =
|
78
|
-
const auto &info =
|
77
|
+
auto &func_expr = state.expr.Cast<BoundFunctionExpression>();
|
78
|
+
const auto &info = func_expr.bind_info->Cast<JsonSerializeBindData>();
|
79
79
|
|
80
80
|
UnaryExecutor::Execute<string_t, string_t>(inputs, result, args.size(), [&](string_t input) {
|
81
81
|
auto doc = JSONCommon::CreateDocument(alc);
|
@@ -92,7 +92,7 @@ static void JsonSerializeFunction(DataChunk &args, ExpressionState &state, Vecto
|
|
92
92
|
if (statement->type != StatementType::SELECT_STATEMENT) {
|
93
93
|
throw NotImplementedException("Only SELECT statements can be serialized to json!");
|
94
94
|
}
|
95
|
-
auto &select = (
|
95
|
+
auto &select = statement->Cast<SelectStatement>();
|
96
96
|
auto serializer = JsonSerializer(doc, info.skip_if_null, info.skip_if_empty);
|
97
97
|
select.FormatSerialize(serializer);
|
98
98
|
auto json = serializer.GetRootObject();
|
@@ -115,7 +115,7 @@ unique_ptr<FunctionLocalState> JSONFunctionLocalState::Init(ExpressionState &sta
|
|
115
115
|
}
|
116
116
|
|
117
117
|
JSONFunctionLocalState &JSONFunctionLocalState::ResetAndGet(ExpressionState &state) {
|
118
|
-
auto &lstate =
|
118
|
+
auto &lstate = ExecuteFunctionState::GetFunctionState(state)->Cast<JSONFunctionLocalState>();
|
119
119
|
lstate.json_allocator.Reset();
|
120
120
|
return lstate;
|
121
121
|
}
|
@@ -197,7 +197,7 @@ static duckdb::unique_ptr<FunctionLocalState> InitJSONCastLocalState(CastLocalSt
|
|
197
197
|
}
|
198
198
|
|
199
199
|
static bool CastVarcharToJSON(Vector &source, Vector &result, idx_t count, CastParameters ¶meters) {
|
200
|
-
auto &lstate =
|
200
|
+
auto &lstate = parameters.local_state->Cast<JSONFunctionLocalState>();
|
201
201
|
lstate.json_allocator.Reset();
|
202
202
|
auto alc = lstate.json_allocator.GetYYJSONAllocator();
|
203
203
|
|
@@ -143,15 +143,15 @@ void ParquetOptions::Deserialize(FieldReader &reader) {
|
|
143
143
|
|
144
144
|
BindInfo ParquetGetBatchInfo(const FunctionData *bind_data) {
|
145
145
|
auto bind_info = BindInfo(ScanType::PARQUET);
|
146
|
-
auto parquet_bind = (
|
146
|
+
auto &parquet_bind = bind_data->Cast<ParquetReadBindData>();
|
147
147
|
vector<Value> file_path;
|
148
|
-
for (auto &path : parquet_bind
|
148
|
+
for (auto &path : parquet_bind.files) {
|
149
149
|
file_path.emplace_back(path);
|
150
150
|
}
|
151
151
|
bind_info.InsertOption("file_path", Value::LIST(LogicalType::VARCHAR, file_path));
|
152
|
-
bind_info.InsertOption("binary_as_string", Value::BOOLEAN(parquet_bind
|
153
|
-
bind_info.InsertOption("file_row_number", Value::BOOLEAN(parquet_bind
|
154
|
-
parquet_bind
|
152
|
+
bind_info.InsertOption("binary_as_string", Value::BOOLEAN(parquet_bind.parquet_options.binary_as_string));
|
153
|
+
bind_info.InsertOption("file_row_number", Value::BOOLEAN(parquet_bind.parquet_options.file_row_number));
|
154
|
+
parquet_bind.parquet_options.file_options.AddBatchInfo(bind_info);
|
155
155
|
return bind_info;
|
156
156
|
}
|
157
157
|
|
@@ -205,7 +205,7 @@ public:
|
|
205
205
|
|
206
206
|
static unique_ptr<BaseStatistics> ParquetScanStats(ClientContext &context, const FunctionData *bind_data_p,
|
207
207
|
column_t column_index) {
|
208
|
-
auto &bind_data = (
|
208
|
+
auto &bind_data = bind_data_p->Cast<ParquetReadBindData>();
|
209
209
|
|
210
210
|
if (IsRowIdColumnId(column_index)) {
|
211
211
|
return nullptr;
|
@@ -308,7 +308,7 @@ public:
|
|
308
308
|
|
309
309
|
static double ParquetProgress(ClientContext &context, const FunctionData *bind_data_p,
|
310
310
|
const GlobalTableFunctionState *global_state) {
|
311
|
-
auto &bind_data = (
|
311
|
+
auto &bind_data = bind_data_p->Cast<ParquetReadBindData>();
|
312
312
|
if (bind_data.files.empty()) {
|
313
313
|
return 100.0;
|
314
314
|
}
|
@@ -323,8 +323,8 @@ public:
|
|
323
323
|
|
324
324
|
static unique_ptr<LocalTableFunctionState>
|
325
325
|
ParquetScanInitLocal(ExecutionContext &context, TableFunctionInitInput &input, GlobalTableFunctionState *gstate_p) {
|
326
|
-
auto &bind_data =
|
327
|
-
auto &gstate = (
|
326
|
+
auto &bind_data = input.bind_data->Cast<ParquetReadBindData>();
|
327
|
+
auto &gstate = gstate_p->Cast<ParquetReadGlobalState>();
|
328
328
|
|
329
329
|
auto result = make_uniq<ParquetReadLocalState>();
|
330
330
|
result->is_parallel = true;
|
@@ -394,13 +394,13 @@ public:
|
|
394
394
|
static idx_t ParquetScanGetBatchIndex(ClientContext &context, const FunctionData *bind_data_p,
|
395
395
|
LocalTableFunctionState *local_state,
|
396
396
|
GlobalTableFunctionState *global_state) {
|
397
|
-
auto &data = (
|
397
|
+
auto &data = local_state->Cast<ParquetReadLocalState>();
|
398
398
|
return data.batch_index;
|
399
399
|
}
|
400
400
|
|
401
401
|
static void ParquetScanSerialize(FieldWriter &writer, const FunctionData *bind_data_p,
|
402
402
|
const TableFunction &function) {
|
403
|
-
auto &bind_data = (
|
403
|
+
auto &bind_data = bind_data_p->Cast<ParquetReadBindData>();
|
404
404
|
writer.WriteList<string>(bind_data.files);
|
405
405
|
writer.WriteRegularSerializableList(bind_data.types);
|
406
406
|
writer.WriteList<string>(bind_data.names);
|
@@ -422,9 +422,9 @@ public:
|
|
422
422
|
if (!data_p.local_state) {
|
423
423
|
return;
|
424
424
|
}
|
425
|
-
auto &data =
|
426
|
-
auto &gstate =
|
427
|
-
auto &bind_data =
|
425
|
+
auto &data = data_p.local_state->Cast<ParquetReadLocalState>();
|
426
|
+
auto &gstate = data_p.global_state->Cast<ParquetReadGlobalState>();
|
427
|
+
auto &bind_data = data_p.bind_data->CastNoConst<ParquetReadBindData>();
|
428
428
|
|
429
429
|
do {
|
430
430
|
if (gstate.CanRemoveFilterColumns()) {
|
@@ -448,12 +448,12 @@ public:
|
|
448
448
|
}
|
449
449
|
|
450
450
|
static unique_ptr<NodeStatistics> ParquetCardinality(ClientContext &context, const FunctionData *bind_data) {
|
451
|
-
auto &data = (
|
451
|
+
auto &data = bind_data->Cast<ParquetReadBindData>();
|
452
452
|
return make_uniq<NodeStatistics>(data.initial_file_cardinality * data.files.size());
|
453
453
|
}
|
454
454
|
|
455
455
|
static idx_t ParquetScanMaxThreads(ClientContext &context, const FunctionData *bind_data) {
|
456
|
-
auto &data = (
|
456
|
+
auto &data = bind_data->Cast<ParquetReadBindData>();
|
457
457
|
return data.initial_file_row_groups * data.files.size();
|
458
458
|
}
|
459
459
|
|
@@ -513,11 +513,11 @@ public:
|
|
513
513
|
|
514
514
|
static void ParquetComplexFilterPushdown(ClientContext &context, LogicalGet &get, FunctionData *bind_data_p,
|
515
515
|
vector<unique_ptr<Expression>> &filters) {
|
516
|
-
auto data = (
|
517
|
-
auto reset_reader = MultiFileReader::ComplexFilterPushdown(context, data
|
518
|
-
data
|
516
|
+
auto &data = bind_data_p->Cast<ParquetReadBindData>();
|
517
|
+
auto reset_reader = MultiFileReader::ComplexFilterPushdown(context, data.files,
|
518
|
+
data.parquet_options.file_options, get, filters);
|
519
519
|
if (reset_reader) {
|
520
|
-
MultiFileReader::PruneReaders(
|
520
|
+
MultiFileReader::PruneReaders(data);
|
521
521
|
}
|
522
522
|
}
|
523
523
|
|
@@ -618,7 +618,7 @@ unique_ptr<FunctionData> ParquetWriteBind(ClientContext &context, CopyInfo &info
|
|
618
618
|
unique_ptr<GlobalFunctionData> ParquetWriteInitializeGlobal(ClientContext &context, FunctionData &bind_data,
|
619
619
|
const string &file_path) {
|
620
620
|
auto global_state = make_uniq<ParquetWriteGlobalState>();
|
621
|
-
auto &parquet_bind = (
|
621
|
+
auto &parquet_bind = bind_data.Cast<ParquetWriteBindData>();
|
622
622
|
|
623
623
|
auto &fs = FileSystem::GetFileSystem(context);
|
624
624
|
global_state->writer =
|
@@ -629,9 +629,9 @@ unique_ptr<GlobalFunctionData> ParquetWriteInitializeGlobal(ClientContext &conte
|
|
629
629
|
|
630
630
|
void ParquetWriteSink(ExecutionContext &context, FunctionData &bind_data_p, GlobalFunctionData &gstate,
|
631
631
|
LocalFunctionData &lstate, DataChunk &input) {
|
632
|
-
auto &bind_data = (
|
633
|
-
auto &global_state = (
|
634
|
-
auto &local_state = (
|
632
|
+
auto &bind_data = bind_data_p.Cast<ParquetWriteBindData>();
|
633
|
+
auto &global_state = gstate.Cast<ParquetWriteGlobalState>();
|
634
|
+
auto &local_state = lstate.Cast<ParquetWriteLocalState>();
|
635
635
|
|
636
636
|
// append data to the local (buffered) chunk collection
|
637
637
|
local_state.buffer.Append(input);
|
@@ -645,20 +645,20 @@ void ParquetWriteSink(ExecutionContext &context, FunctionData &bind_data_p, Glob
|
|
645
645
|
|
646
646
|
void ParquetWriteCombine(ExecutionContext &context, FunctionData &bind_data, GlobalFunctionData &gstate,
|
647
647
|
LocalFunctionData &lstate) {
|
648
|
-
auto &global_state = (
|
649
|
-
auto &local_state = (
|
648
|
+
auto &global_state = gstate.Cast<ParquetWriteGlobalState>();
|
649
|
+
auto &local_state = lstate.Cast<ParquetWriteLocalState>();
|
650
650
|
// flush any data left in the local state to the file
|
651
651
|
global_state.writer->Flush(local_state.buffer);
|
652
652
|
}
|
653
653
|
|
654
654
|
void ParquetWriteFinalize(ClientContext &context, FunctionData &bind_data, GlobalFunctionData &gstate) {
|
655
|
-
auto &global_state = (
|
655
|
+
auto &global_state = gstate.Cast<ParquetWriteGlobalState>();
|
656
656
|
// finalize: write any additional metadata to the file here
|
657
657
|
global_state.writer->Finalize();
|
658
658
|
}
|
659
659
|
|
660
660
|
unique_ptr<LocalFunctionData> ParquetWriteInitializeLocal(ExecutionContext &context, FunctionData &bind_data_p) {
|
661
|
-
auto &bind_data = (
|
661
|
+
auto &bind_data = bind_data_p.Cast<ParquetWriteBindData>();
|
662
662
|
return make_uniq<ParquetWriteLocalState>(context.client, bind_data.sql_types);
|
663
663
|
}
|
664
664
|
|
@@ -418,7 +418,7 @@ unique_ptr<FunctionData> ParquetMetaDataBind(ClientContext &context, TableFuncti
|
|
418
418
|
|
419
419
|
template <bool SCHEMA>
|
420
420
|
unique_ptr<GlobalTableFunctionState> ParquetMetaDataInit(ClientContext &context, TableFunctionInitInput &input) {
|
421
|
-
auto &bind_data =
|
421
|
+
auto &bind_data = input.bind_data->Cast<ParquetMetaDataBindData>();
|
422
422
|
D_ASSERT(!bind_data.files.empty());
|
423
423
|
|
424
424
|
auto result = make_uniq<ParquetMetaDataOperatorData>(context, bind_data.return_types);
|
@@ -433,8 +433,8 @@ unique_ptr<GlobalTableFunctionState> ParquetMetaDataInit(ClientContext &context,
|
|
433
433
|
|
434
434
|
template <bool SCHEMA>
|
435
435
|
void ParquetMetaDataImplementation(ClientContext &context, TableFunctionInput &data_p, DataChunk &output) {
|
436
|
-
auto &data =
|
437
|
-
auto &bind_data =
|
436
|
+
auto &data = data_p.global_state->Cast<ParquetMetaDataOperatorData>();
|
437
|
+
auto &bind_data = data_p.bind_data->Cast<ParquetMetaDataBindData>();
|
438
438
|
|
439
439
|
while (true) {
|
440
440
|
if (!data.collection.Scan(data.scan_state, output)) {
|
@@ -16,11 +16,11 @@ DuckIndexEntry::~DuckIndexEntry() {
|
|
16
16
|
info->indexes.RemoveIndex(index);
|
17
17
|
}
|
18
18
|
|
19
|
-
string DuckIndexEntry::GetSchemaName() {
|
19
|
+
string DuckIndexEntry::GetSchemaName() const {
|
20
20
|
return info->schema;
|
21
21
|
}
|
22
22
|
|
23
|
-
string DuckIndexEntry::GetTableName() {
|
23
|
+
string DuckIndexEntry::GetTableName() const {
|
24
24
|
return info->table;
|
25
25
|
}
|
26
26
|
|