duckdb 0.8.1-dev51.0 → 0.8.1-dev96.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/package.json +1 -1
- package/src/duckdb/extension/icu/icu-datepart.cpp +1 -1
- package/src/duckdb/extension/json/include/json_common.hpp +1 -1
- package/src/duckdb/extension/json/include/json_executors.hpp +1 -1
- package/src/duckdb/extension/json/json_functions/json_create.cpp +6 -6
- package/src/duckdb/extension/json/json_functions/json_merge_patch.cpp +1 -1
- package/src/duckdb/extension/json/json_functions/json_transform.cpp +1 -1
- package/src/duckdb/extension/parquet/column_reader.cpp +52 -51
- package/src/duckdb/extension/parquet/column_writer.cpp +57 -45
- package/src/duckdb/extension/parquet/include/cast_column_reader.hpp +1 -1
- package/src/duckdb/extension/parquet/include/column_reader.hpp +5 -4
- package/src/duckdb/extension/parquet/include/column_writer.hpp +24 -0
- package/src/duckdb/extension/parquet/include/list_column_reader.hpp +1 -1
- package/src/duckdb/extension/parquet/include/parquet_dbp_decoder.hpp +4 -4
- package/src/duckdb/extension/parquet/include/parquet_rle_bp_decoder.hpp +4 -5
- package/src/duckdb/extension/parquet/include/resizable_buffer.hpp +4 -4
- package/src/duckdb/extension/parquet/include/row_number_column_reader.hpp +1 -1
- package/src/duckdb/extension/parquet/include/struct_column_reader.hpp +1 -1
- package/src/duckdb/extension/parquet/parquet-extension.cpp +1 -1
- package/src/duckdb/extension/parquet/parquet_metadata.cpp +1 -1
- package/src/duckdb/extension/parquet/parquet_reader.cpp +18 -18
- package/src/duckdb/extension/parquet/parquet_statistics.cpp +23 -26
- package/src/duckdb/extension/parquet/parquet_timestamp.cpp +2 -2
- package/src/duckdb/extension/parquet/parquet_writer.cpp +3 -3
- package/src/duckdb/extension/parquet/zstd_file_system.cpp +3 -3
- package/src/duckdb/src/catalog/catalog_set.cpp +1 -1
- package/src/duckdb/src/catalog/dependency_manager.cpp +2 -2
- package/src/duckdb/src/common/arrow/arrow_appender.cpp +12 -12
- package/src/duckdb/src/common/arrow/arrow_wrapper.cpp +7 -7
- package/src/duckdb/src/common/checksum.cpp +1 -1
- package/src/duckdb/src/common/compressed_file_system.cpp +6 -6
- package/src/duckdb/src/common/crypto/md5.cpp +9 -9
- package/src/duckdb/src/common/field_writer.cpp +1 -1
- package/src/duckdb/src/common/file_system.cpp +15 -2
- package/src/duckdb/src/common/fsst.cpp +11 -6
- package/src/duckdb/src/common/gzip_file_system.cpp +8 -8
- package/src/duckdb/src/common/hive_partitioning.cpp +1 -1
- package/src/duckdb/src/common/local_file_system.cpp +11 -11
- package/src/duckdb/src/common/operator/cast_operators.cpp +1 -1
- package/src/duckdb/src/common/pipe_file_system.cpp +2 -2
- package/src/duckdb/src/common/radix_partitioning.cpp +2 -2
- package/src/duckdb/src/common/row_operations/row_heap_gather.cpp +1 -1
- package/src/duckdb/src/common/row_operations/row_heap_scatter.cpp +5 -5
- package/src/duckdb/src/common/row_operations/row_match.cpp +1 -1
- package/src/duckdb/src/common/row_operations/row_radix_scatter.cpp +2 -2
- package/src/duckdb/src/common/row_operations/row_scatter.cpp +4 -4
- package/src/duckdb/src/common/serializer/binary_deserializer.cpp +1 -1
- package/src/duckdb/src/common/serializer/binary_serializer.cpp +3 -3
- package/src/duckdb/src/common/serializer.cpp +1 -1
- package/src/duckdb/src/common/sort/comparators.cpp +1 -1
- package/src/duckdb/src/common/sort/merge_sorter.cpp +7 -2
- package/src/duckdb/src/common/sort/partition_state.cpp +2 -2
- package/src/duckdb/src/common/types/bit.cpp +5 -5
- package/src/duckdb/src/common/types/blob.cpp +8 -8
- package/src/duckdb/src/common/types/column/column_data_allocator.cpp +4 -4
- package/src/duckdb/src/common/types/column/column_data_collection.cpp +3 -3
- package/src/duckdb/src/common/types/column/column_data_collection_segment.cpp +1 -1
- package/src/duckdb/src/common/types/column/partitioned_column_data.cpp +2 -2
- package/src/duckdb/src/common/types/hash.cpp +2 -2
- package/src/duckdb/src/common/types/hyperloglog.cpp +22 -21
- package/src/duckdb/src/common/types/list_segment.cpp +77 -49
- package/src/duckdb/src/common/types/row/partitioned_tuple_data.cpp +1 -1
- package/src/duckdb/src/common/types/row/tuple_data_allocator.cpp +5 -3
- package/src/duckdb/src/common/types/row/tuple_data_scatter_gather.cpp +17 -17
- package/src/duckdb/src/common/types/string_heap.cpp +1 -1
- package/src/duckdb/src/common/types/value.cpp +2 -2
- package/src/duckdb/src/common/types/vector.cpp +98 -101
- package/src/duckdb/src/common/types/vector_cache.cpp +6 -6
- package/src/duckdb/src/common/types/vector_constants.cpp +2 -1
- package/src/duckdb/src/common/types.cpp +44 -33
- package/src/duckdb/src/common/vector_operations/boolean_operators.cpp +2 -2
- package/src/duckdb/src/common/vector_operations/is_distinct_from.cpp +12 -12
- package/src/duckdb/src/common/vector_operations/vector_hash.cpp +13 -11
- package/src/duckdb/src/common/vector_operations/vector_storage.cpp +1 -1
- package/src/duckdb/src/core_functions/aggregate/distributive/approx_count.cpp +3 -3
- package/src/duckdb/src/core_functions/aggregate/distributive/arg_min_max.cpp +3 -3
- package/src/duckdb/src/core_functions/aggregate/distributive/bitagg.cpp +4 -4
- package/src/duckdb/src/core_functions/aggregate/distributive/bitstring_agg.cpp +12 -11
- package/src/duckdb/src/core_functions/aggregate/distributive/bool.cpp +3 -3
- package/src/duckdb/src/core_functions/aggregate/distributive/entropy.cpp +3 -3
- package/src/duckdb/src/core_functions/aggregate/distributive/kurtosis.cpp +2 -2
- package/src/duckdb/src/core_functions/aggregate/distributive/minmax.cpp +7 -7
- package/src/duckdb/src/core_functions/aggregate/distributive/product.cpp +2 -2
- package/src/duckdb/src/core_functions/aggregate/distributive/skew.cpp +2 -2
- package/src/duckdb/src/core_functions/aggregate/distributive/string_agg.cpp +2 -2
- package/src/duckdb/src/core_functions/aggregate/holistic/approximate_quantile.cpp +14 -14
- package/src/duckdb/src/core_functions/aggregate/holistic/mode.cpp +2 -2
- package/src/duckdb/src/core_functions/aggregate/holistic/quantile.cpp +21 -21
- package/src/duckdb/src/core_functions/aggregate/holistic/reservoir_quantile.cpp +18 -19
- package/src/duckdb/src/core_functions/aggregate/nested/histogram.cpp +3 -4
- package/src/duckdb/src/core_functions/aggregate/nested/list.cpp +4 -4
- package/src/duckdb/src/core_functions/aggregate/regression/regr_avg.cpp +4 -4
- package/src/duckdb/src/core_functions/aggregate/regression/regr_intercept.cpp +1 -1
- package/src/duckdb/src/core_functions/aggregate/regression/regr_r2.cpp +1 -1
- package/src/duckdb/src/core_functions/aggregate/regression/regr_sxx_syy.cpp +2 -2
- package/src/duckdb/src/core_functions/aggregate/regression/regr_sxy.cpp +1 -1
- package/src/duckdb/src/core_functions/scalar/blob/base64.cpp +1 -1
- package/src/duckdb/src/core_functions/scalar/date/date_part.cpp +45 -45
- package/src/duckdb/src/core_functions/scalar/date/strftime.cpp +2 -2
- package/src/duckdb/src/core_functions/scalar/generic/current_setting.cpp +1 -1
- package/src/duckdb/src/core_functions/scalar/generic/least.cpp +2 -2
- package/src/duckdb/src/core_functions/scalar/generic/stats.cpp +1 -1
- package/src/duckdb/src/core_functions/scalar/list/array_slice.cpp +3 -3
- package/src/duckdb/src/core_functions/scalar/list/flatten.cpp +2 -4
- package/src/duckdb/src/core_functions/scalar/list/list_aggregates.cpp +3 -3
- package/src/duckdb/src/core_functions/scalar/list/list_lambdas.cpp +6 -7
- package/src/duckdb/src/core_functions/scalar/list/list_sort.cpp +1 -1
- package/src/duckdb/src/core_functions/scalar/map/cardinality.cpp +1 -1
- package/src/duckdb/src/core_functions/scalar/map/map.cpp +2 -2
- package/src/duckdb/src/core_functions/scalar/map/map_concat.cpp +1 -1
- package/src/duckdb/src/core_functions/scalar/map/map_extract.cpp +5 -9
- package/src/duckdb/src/core_functions/scalar/math/numeric.cpp +3 -3
- package/src/duckdb/src/core_functions/scalar/string/starts_with.cpp +3 -2
- package/src/duckdb/src/core_functions/scalar/string/string_split.cpp +4 -4
- package/src/duckdb/src/core_functions/scalar/string/trim.cpp +1 -1
- package/src/duckdb/src/core_functions/scalar/union/union_extract.cpp +1 -1
- package/src/duckdb/src/execution/adaptive_filter.cpp +1 -1
- package/src/duckdb/src/execution/expression_executor/execute_case.cpp +10 -10
- package/src/duckdb/src/execution/expression_executor/execute_conjunction.cpp +7 -7
- package/src/duckdb/src/execution/expression_executor.cpp +28 -28
- package/src/duckdb/src/execution/index/art/art.cpp +30 -32
- package/src/duckdb/src/execution/index/art/fixed_size_allocator.cpp +3 -4
- package/src/duckdb/src/execution/join_hashtable.cpp +4 -4
- package/src/duckdb/src/execution/nested_loop_join/nested_loop_join_inner.cpp +4 -4
- package/src/duckdb/src/execution/nested_loop_join/nested_loop_join_mark.cpp +2 -2
- package/src/duckdb/src/execution/operator/aggregate/distinct_aggregate_data.cpp +1 -1
- package/src/duckdb/src/execution/operator/aggregate/physical_perfecthash_aggregate.cpp +1 -1
- package/src/duckdb/src/execution/operator/aggregate/physical_streaming_window.cpp +2 -2
- package/src/duckdb/src/execution/operator/aggregate/physical_ungrouped_aggregate.cpp +4 -4
- package/src/duckdb/src/execution/operator/filter/physical_filter.cpp +1 -1
- package/src/duckdb/src/execution/operator/join/outer_join_marker.cpp +1 -1
- package/src/duckdb/src/execution/operator/join/perfect_hash_join_executor.cpp +1 -1
- package/src/duckdb/src/execution/operator/join/physical_asof_join.cpp +2 -2
- package/src/duckdb/src/execution/operator/join/physical_blockwise_nl_join.cpp +4 -4
- package/src/duckdb/src/execution/operator/join/physical_index_join.cpp +3 -3
- package/src/duckdb/src/execution/operator/join/physical_nested_loop_join.cpp +3 -3
- package/src/duckdb/src/execution/operator/join/physical_piecewise_merge_join.cpp +3 -3
- package/src/duckdb/src/execution/operator/order/physical_top_n.cpp +1 -1
- package/src/duckdb/src/execution/operator/persistent/buffered_csv_reader.cpp +2 -2
- package/src/duckdb/src/execution/operator/persistent/csv_file_handle.cpp +2 -2
- package/src/duckdb/src/execution/operator/persistent/physical_batch_insert.cpp +2 -3
- package/src/duckdb/src/execution/operator/persistent/physical_insert.cpp +1 -1
- package/src/duckdb/src/execution/operator/projection/physical_pivot.cpp +2 -2
- package/src/duckdb/src/execution/operator/projection/physical_projection.cpp +1 -1
- package/src/duckdb/src/execution/operator/projection/physical_unnest.cpp +3 -3
- package/src/duckdb/src/execution/operator/scan/physical_column_data_scan.cpp +2 -1
- package/src/duckdb/src/execution/operator/scan/physical_expression_scan.cpp +1 -1
- package/src/duckdb/src/execution/operator/scan/physical_positional_scan.cpp +2 -2
- package/src/duckdb/src/execution/operator/schema/physical_create_type.cpp +1 -1
- package/src/duckdb/src/execution/perfect_aggregate_hashtable.cpp +1 -1
- package/src/duckdb/src/execution/physical_plan/plan_comparison_join.cpp +1 -1
- package/src/duckdb/src/execution/physical_plan/plan_create_table.cpp +1 -1
- package/src/duckdb/src/execution/physical_plan_generator.cpp +2 -2
- package/src/duckdb/src/execution/radix_partitioned_hashtable.cpp +1 -1
- package/src/duckdb/src/execution/reservoir_sample.cpp +2 -2
- package/src/duckdb/src/execution/window_segment_tree.cpp +8 -6
- package/src/duckdb/src/function/aggregate/distributive/count.cpp +2 -2
- package/src/duckdb/src/function/aggregate/distributive/first.cpp +5 -5
- package/src/duckdb/src/function/aggregate/sorted_aggregate_function.cpp +8 -8
- package/src/duckdb/src/function/cast/cast_function_set.cpp +1 -1
- package/src/duckdb/src/function/cast/decimal_cast.cpp +1 -1
- package/src/duckdb/src/function/cast/enum_casts.cpp +2 -2
- package/src/duckdb/src/function/cast/string_cast.cpp +11 -11
- package/src/duckdb/src/function/cast/union_casts.cpp +2 -2
- package/src/duckdb/src/function/cast/vector_cast_helpers.cpp +3 -2
- package/src/duckdb/src/function/scalar/generic/constant_or_null.cpp +1 -1
- package/src/duckdb/src/function/scalar/list/list_concat.cpp +2 -2
- package/src/duckdb/src/function/scalar/list/list_extract.cpp +3 -3
- package/src/duckdb/src/function/scalar/operators/arithmetic.cpp +2 -3
- package/src/duckdb/src/function/scalar/string/concat.cpp +8 -7
- package/src/duckdb/src/function/scalar/string/contains.cpp +4 -4
- package/src/duckdb/src/function/scalar/string/like.cpp +5 -5
- package/src/duckdb/src/function/scalar/string/regexp/regexp_extract_all.cpp +4 -4
- package/src/duckdb/src/function/scalar/string/regexp.cpp +3 -3
- package/src/duckdb/src/function/scalar/string/strip_accents.cpp +1 -1
- package/src/duckdb/src/function/scalar/struct/struct_extract.cpp +1 -1
- package/src/duckdb/src/function/scalar/system/aggregate_export.cpp +25 -23
- package/src/duckdb/src/function/scalar_function.cpp +3 -3
- package/src/duckdb/src/function/table/arrow.cpp +4 -4
- package/src/duckdb/src/function/table/arrow_conversion.cpp +67 -61
- package/src/duckdb/src/function/table/checkpoint.cpp +1 -1
- package/src/duckdb/src/function/table/copy_csv.cpp +11 -7
- package/src/duckdb/src/function/table/glob.cpp +1 -1
- package/src/duckdb/src/function/table/pragma_last_profiling_output.cpp +1 -1
- package/src/duckdb/src/function/table/range.cpp +4 -4
- package/src/duckdb/src/function/table/read_csv.cpp +4 -4
- package/src/duckdb/src/function/table/repeat.cpp +2 -2
- package/src/duckdb/src/function/table/repeat_row.cpp +2 -2
- package/src/duckdb/src/function/table/system/duckdb_functions.cpp +1 -1
- package/src/duckdb/src/function/table/system/test_vector_types.cpp +1 -1
- package/src/duckdb/src/function/table/table_scan.cpp +2 -2
- package/src/duckdb/src/function/table/unnest.cpp +1 -1
- package/src/duckdb/src/function/table/version/pragma_version.cpp +3 -3
- package/src/duckdb/src/include/duckdb/catalog/catalog.hpp +2 -2
- package/src/duckdb/src/include/duckdb/catalog/catalog_entry.hpp +2 -2
- package/src/duckdb/src/include/duckdb/common/allocator.hpp +15 -4
- package/src/duckdb/src/include/duckdb/common/arrow/arrow_buffer.hpp +7 -2
- package/src/duckdb/src/include/duckdb/common/crypto/md5.hpp +2 -2
- package/src/duckdb/src/include/duckdb/common/exception.hpp +2 -2
- package/src/duckdb/src/include/duckdb/common/field_writer.hpp +3 -3
- package/src/duckdb/src/include/duckdb/common/file_system.hpp +11 -0
- package/src/duckdb/src/include/duckdb/common/fsst.hpp +2 -3
- package/src/duckdb/src/include/duckdb/common/radix.hpp +3 -3
- package/src/duckdb/src/include/duckdb/common/serializer/binary_deserializer.hpp +1 -1
- package/src/duckdb/src/include/duckdb/common/serializer/binary_serializer.hpp +4 -1
- package/src/duckdb/src/include/duckdb/common/serializer.hpp +4 -4
- package/src/duckdb/src/include/duckdb/common/typedefs.hpp +30 -0
- package/src/duckdb/src/include/duckdb/common/types/column/partitioned_column_data.hpp +12 -0
- package/src/duckdb/src/include/duckdb/common/types/hyperloglog.hpp +6 -2
- package/src/duckdb/src/include/duckdb/common/types/null_value.hpp +1 -1
- package/src/duckdb/src/include/duckdb/common/types/row/partitioned_tuple_data.hpp +12 -0
- package/src/duckdb/src/include/duckdb/common/types/string_type.hpp +10 -10
- package/src/duckdb/src/include/duckdb/common/types/value.hpp +1 -1
- package/src/duckdb/src/include/duckdb/common/types/vector.hpp +9 -0
- package/src/duckdb/src/include/duckdb/common/types/vector_buffer.hpp +18 -6
- package/src/duckdb/src/include/duckdb/common/vector_operations/aggregate_executor.hpp +20 -19
- package/src/duckdb/src/include/duckdb/common/vector_operations/binary_executor.hpp +16 -15
- package/src/duckdb/src/include/duckdb/common/vector_operations/generic_executor.hpp +11 -11
- package/src/duckdb/src/include/duckdb/common/vector_operations/ternary_executor.hpp +23 -19
- package/src/duckdb/src/include/duckdb/common/vector_operations/unary_executor.hpp +3 -3
- package/src/duckdb/src/include/duckdb/core_functions/aggregate/algebraic/corr.hpp +1 -1
- package/src/duckdb/src/include/duckdb/core_functions/aggregate/algebraic/covar.hpp +1 -1
- package/src/duckdb/src/include/duckdb/core_functions/aggregate/algebraic/stddev.hpp +1 -1
- package/src/duckdb/src/include/duckdb/core_functions/aggregate/regression/regr_count.hpp +1 -1
- package/src/duckdb/src/include/duckdb/core_functions/aggregate/regression/regr_slope.hpp +1 -1
- package/src/duckdb/src/include/duckdb/core_functions/aggregate/sum_helpers.hpp +2 -2
- package/src/duckdb/src/include/duckdb/execution/expression_executor_state.hpp +14 -2
- package/src/duckdb/src/include/duckdb/execution/index/art/art.hpp +3 -3
- package/src/duckdb/src/include/duckdb/execution/operator/helper/physical_result_collector.hpp +3 -0
- package/src/duckdb/src/include/duckdb/execution/operator/persistent/csv_buffer.hpp +1 -1
- package/src/duckdb/src/include/duckdb/execution/physical_operator.hpp +5 -2
- package/src/duckdb/src/include/duckdb/execution/physical_operator_states.hpp +12 -12
- package/src/duckdb/src/include/duckdb/function/cast/default_casts.hpp +13 -2
- package/src/duckdb/src/include/duckdb/function/cast/vector_cast_helpers.hpp +4 -4
- package/src/duckdb/src/include/duckdb/function/compression_function.hpp +44 -0
- package/src/duckdb/src/include/duckdb/function/copy_function.hpp +6 -6
- package/src/duckdb/src/include/duckdb/function/function.hpp +3 -3
- package/src/duckdb/src/include/duckdb/function/macro_function.hpp +2 -2
- package/src/duckdb/src/include/duckdb/function/scalar/list/contains_or_position.hpp +3 -3
- package/src/duckdb/src/include/duckdb/function/scalar_function.hpp +2 -2
- package/src/duckdb/src/include/duckdb/function/table_function.hpp +6 -6
- package/src/duckdb/src/include/duckdb/main/capi/cast/utils.hpp +1 -1
- package/src/duckdb/src/include/duckdb/main/materialized_query_result.hpp +3 -0
- package/src/duckdb/src/include/duckdb/main/pending_query_result.hpp +3 -0
- package/src/duckdb/src/include/duckdb/main/query_result.hpp +17 -0
- package/src/duckdb/src/include/duckdb/main/relation.hpp +12 -0
- package/src/duckdb/src/include/duckdb/main/stream_query_result.hpp +3 -0
- package/src/duckdb/src/include/duckdb/optimizer/join_order/cardinality_estimator.hpp +2 -2
- package/src/duckdb/src/include/duckdb/parser/base_expression.hpp +6 -12
- package/src/duckdb/src/include/duckdb/parser/constraint.hpp +2 -2
- package/src/duckdb/src/include/duckdb/parser/expression/between_expression.hpp +1 -1
- package/src/duckdb/src/include/duckdb/parser/expression/bound_expression.hpp +1 -1
- package/src/duckdb/src/include/duckdb/parser/expression/case_expression.hpp +1 -1
- package/src/duckdb/src/include/duckdb/parser/expression/cast_expression.hpp +1 -1
- package/src/duckdb/src/include/duckdb/parser/expression/collate_expression.hpp +1 -1
- package/src/duckdb/src/include/duckdb/parser/expression/columnref_expression.hpp +1 -1
- package/src/duckdb/src/include/duckdb/parser/expression/comparison_expression.hpp +1 -1
- package/src/duckdb/src/include/duckdb/parser/expression/conjunction_expression.hpp +1 -1
- package/src/duckdb/src/include/duckdb/parser/expression/constant_expression.hpp +1 -1
- package/src/duckdb/src/include/duckdb/parser/expression/function_expression.hpp +1 -1
- package/src/duckdb/src/include/duckdb/parser/expression/lambda_expression.hpp +1 -1
- package/src/duckdb/src/include/duckdb/parser/expression/operator_expression.hpp +1 -1
- package/src/duckdb/src/include/duckdb/parser/expression/parameter_expression.hpp +1 -1
- package/src/duckdb/src/include/duckdb/parser/expression/positional_reference_expression.hpp +1 -1
- package/src/duckdb/src/include/duckdb/parser/expression/star_expression.hpp +1 -1
- package/src/duckdb/src/include/duckdb/parser/expression/subquery_expression.hpp +1 -1
- package/src/duckdb/src/include/duckdb/parser/expression/window_expression.hpp +1 -1
- package/src/duckdb/src/include/duckdb/parser/expression_map.hpp +1 -1
- package/src/duckdb/src/include/duckdb/parser/parsed_data/parse_info.hpp +2 -2
- package/src/duckdb/src/include/duckdb/parser/parsed_expression.hpp +5 -1
- package/src/duckdb/src/include/duckdb/parser/query_node.hpp +2 -2
- package/src/duckdb/src/include/duckdb/parser/result_modifier.hpp +36 -5
- package/src/duckdb/src/include/duckdb/parser/sql_statement.hpp +7 -4
- package/src/duckdb/src/include/duckdb/parser/statement/select_statement.hpp +1 -1
- package/src/duckdb/src/include/duckdb/parser/tableref/basetableref.hpp +1 -1
- package/src/duckdb/src/include/duckdb/parser/tableref/emptytableref.hpp +1 -1
- package/src/duckdb/src/include/duckdb/parser/tableref/expressionlistref.hpp +1 -1
- package/src/duckdb/src/include/duckdb/parser/tableref/joinref.hpp +1 -1
- package/src/duckdb/src/include/duckdb/parser/tableref/pivotref.hpp +1 -1
- package/src/duckdb/src/include/duckdb/parser/tableref/subqueryref.hpp +1 -1
- package/src/duckdb/src/include/duckdb/parser/tableref/table_function_ref.hpp +1 -1
- package/src/duckdb/src/include/duckdb/parser/tableref.hpp +4 -3
- package/src/duckdb/src/include/duckdb/parser/transformer.hpp +107 -91
- package/src/duckdb/src/include/duckdb/planner/bind_context.hpp +1 -1
- package/src/duckdb/src/include/duckdb/planner/bound_constraint.hpp +2 -2
- package/src/duckdb/src/include/duckdb/planner/bound_query_node.hpp +2 -2
- package/src/duckdb/src/include/duckdb/planner/bound_result_modifier.hpp +34 -1
- package/src/duckdb/src/include/duckdb/planner/bound_tableref.hpp +2 -2
- package/src/duckdb/src/include/duckdb/planner/expression/bound_aggregate_expression.hpp +1 -1
- package/src/duckdb/src/include/duckdb/planner/expression/bound_between_expression.hpp +1 -1
- package/src/duckdb/src/include/duckdb/planner/expression/bound_case_expression.hpp +1 -1
- package/src/duckdb/src/include/duckdb/planner/expression/bound_cast_expression.hpp +1 -1
- package/src/duckdb/src/include/duckdb/planner/expression/bound_columnref_expression.hpp +1 -1
- package/src/duckdb/src/include/duckdb/planner/expression/bound_comparison_expression.hpp +1 -1
- package/src/duckdb/src/include/duckdb/planner/expression/bound_conjunction_expression.hpp +1 -1
- package/src/duckdb/src/include/duckdb/planner/expression/bound_constant_expression.hpp +1 -1
- package/src/duckdb/src/include/duckdb/planner/expression/bound_function_expression.hpp +1 -1
- package/src/duckdb/src/include/duckdb/planner/expression/bound_lambda_expression.hpp +1 -1
- package/src/duckdb/src/include/duckdb/planner/expression/bound_lambdaref_expression.hpp +1 -1
- package/src/duckdb/src/include/duckdb/planner/expression/bound_operator_expression.hpp +1 -1
- package/src/duckdb/src/include/duckdb/planner/expression/bound_parameter_expression.hpp +1 -1
- package/src/duckdb/src/include/duckdb/planner/expression/bound_reference_expression.hpp +1 -1
- package/src/duckdb/src/include/duckdb/planner/expression/bound_subquery_expression.hpp +1 -1
- package/src/duckdb/src/include/duckdb/planner/expression/bound_unnest_expression.hpp +1 -1
- package/src/duckdb/src/include/duckdb/planner/expression/bound_window_expression.hpp +1 -1
- package/src/duckdb/src/include/duckdb/planner/expression.hpp +5 -7
- package/src/duckdb/src/include/duckdb/planner/filter/conjunction_filter.hpp +6 -0
- package/src/duckdb/src/include/duckdb/planner/filter/constant_filter.hpp +3 -0
- package/src/duckdb/src/include/duckdb/planner/filter/null_filter.hpp +6 -0
- package/src/duckdb/src/include/duckdb/planner/logical_operator.hpp +2 -2
- package/src/duckdb/src/include/duckdb/planner/operator/logical_pivot.hpp +3 -0
- package/src/duckdb/src/include/duckdb/planner/table_binding.hpp +26 -0
- package/src/duckdb/src/include/duckdb/planner/table_filter.hpp +17 -0
- package/src/duckdb/src/include/duckdb/planner/tableref/bound_pivotref.hpp +3 -0
- package/src/duckdb/src/include/duckdb/storage/compression/chimp/chimp_analyze.hpp +1 -1
- package/src/duckdb/src/include/duckdb/storage/compression/chimp/chimp_compress.hpp +2 -2
- package/src/duckdb/src/include/duckdb/storage/compression/patas/patas_analyze.hpp +2 -2
- package/src/duckdb/src/include/duckdb/storage/compression/patas/patas_compress.hpp +2 -2
- package/src/duckdb/src/include/duckdb/storage/index.hpp +2 -2
- package/src/duckdb/src/include/duckdb/storage/partial_block_manager.hpp +1 -1
- package/src/duckdb/src/include/duckdb/storage/storage_manager.hpp +12 -0
- package/src/duckdb/src/include/duckdb/storage/string_uncompressed.hpp +1 -1
- package/src/duckdb/src/include/duckdb/storage/table/chunk_info.hpp +25 -2
- package/src/duckdb/src/include/duckdb/storage/table/column_checkpoint_state.hpp +12 -0
- package/src/duckdb/src/include/duckdb/storage/table/scan_state.hpp +22 -0
- package/src/duckdb/src/include/duckdb/transaction/duck_transaction_manager.hpp +2 -2
- package/src/duckdb/src/include/duckdb/transaction/transaction.hpp +2 -2
- package/src/duckdb/src/main/capi/appender-c.cpp +5 -5
- package/src/duckdb/src/main/capi/arrow-c.cpp +10 -10
- package/src/duckdb/src/main/capi/cast/from_decimal-c.cpp +1 -1
- package/src/duckdb/src/main/capi/cast/utils-c.cpp +1 -1
- package/src/duckdb/src/main/capi/config-c.cpp +1 -1
- package/src/duckdb/src/main/capi/data_chunk-c.cpp +17 -17
- package/src/duckdb/src/main/capi/duckdb-c.cpp +4 -4
- package/src/duckdb/src/main/capi/duckdb_value-c.cpp +4 -4
- package/src/duckdb/src/main/capi/logical_types-c.cpp +22 -21
- package/src/duckdb/src/main/capi/pending-c.cpp +6 -6
- package/src/duckdb/src/main/capi/prepared-c.cpp +10 -10
- package/src/duckdb/src/main/capi/replacement_scan-c.cpp +6 -6
- package/src/duckdb/src/main/capi/result-c.cpp +23 -23
- package/src/duckdb/src/main/capi/table_function-c.cpp +1 -1
- package/src/duckdb/src/main/client_context.cpp +3 -3
- package/src/duckdb/src/main/database_manager.cpp +1 -1
- package/src/duckdb/src/main/error_manager.cpp +1 -1
- package/src/duckdb/src/main/extension/extension_load.cpp +1 -1
- package/src/duckdb/src/main/relation/create_table_relation.cpp +1 -1
- package/src/duckdb/src/main/relation/create_view_relation.cpp +1 -1
- package/src/duckdb/src/main/relation/delete_relation.cpp +1 -1
- package/src/duckdb/src/main/relation/explain_relation.cpp +1 -1
- package/src/duckdb/src/main/relation/insert_relation.cpp +1 -1
- package/src/duckdb/src/main/relation/update_relation.cpp +1 -1
- package/src/duckdb/src/main/relation/write_csv_relation.cpp +1 -1
- package/src/duckdb/src/main/relation/write_parquet_relation.cpp +1 -1
- package/src/duckdb/src/main/relation.cpp +1 -1
- package/src/duckdb/src/optimizer/deliminator.cpp +12 -12
- package/src/duckdb/src/optimizer/filter_combiner.cpp +3 -3
- package/src/duckdb/src/optimizer/join_order/cardinality_estimator.cpp +10 -10
- package/src/duckdb/src/optimizer/matcher/expression_matcher.cpp +1 -1
- package/src/duckdb/src/optimizer/pullup/pullup_projection.cpp +2 -2
- package/src/duckdb/src/optimizer/regex_range_filter.cpp +2 -4
- package/src/duckdb/src/optimizer/rule/distributivity.cpp +2 -2
- package/src/duckdb/src/optimizer/statistics/operator/propagate_filter.cpp +6 -6
- package/src/duckdb/src/optimizer/statistics/operator/propagate_get.cpp +2 -2
- package/src/duckdb/src/parallel/executor.cpp +1 -1
- package/src/duckdb/src/parser/base_expression.cpp +2 -5
- package/src/duckdb/src/parser/expression/between_expression.cpp +4 -4
- package/src/duckdb/src/parser/expression/case_expression.cpp +6 -6
- package/src/duckdb/src/parser/expression/cast_expression.cpp +4 -4
- package/src/duckdb/src/parser/expression/collate_expression.cpp +3 -3
- package/src/duckdb/src/parser/expression/columnref_expression.cpp +4 -4
- package/src/duckdb/src/parser/expression/comparison_expression.cpp +3 -3
- package/src/duckdb/src/parser/expression/conjunction_expression.cpp +2 -2
- package/src/duckdb/src/parser/expression/constant_expression.cpp +2 -2
- package/src/duckdb/src/parser/expression/function_expression.cpp +10 -14
- package/src/duckdb/src/parser/expression/lambda_expression.cpp +2 -2
- package/src/duckdb/src/parser/expression/operator_expression.cpp +4 -4
- package/src/duckdb/src/parser/expression/parameter_expression.cpp +2 -2
- package/src/duckdb/src/parser/expression/positional_reference_expression.cpp +3 -3
- package/src/duckdb/src/parser/expression/star_expression.cpp +9 -9
- package/src/duckdb/src/parser/expression/subquery_expression.cpp +5 -5
- package/src/duckdb/src/parser/expression/window_expression.cpp +13 -24
- package/src/duckdb/src/parser/parsed_expression.cpp +34 -18
- package/src/duckdb/src/parser/parsed_expression_iterator.cpp +4 -4
- package/src/duckdb/src/parser/parser.cpp +3 -3
- package/src/duckdb/src/parser/query_node/select_node.cpp +6 -13
- package/src/duckdb/src/parser/query_node.cpp +7 -6
- package/src/duckdb/src/parser/result_modifier.cpp +25 -18
- package/src/duckdb/src/parser/statement/select_statement.cpp +3 -3
- package/src/duckdb/src/parser/tableref/basetableref.cpp +4 -4
- package/src/duckdb/src/parser/tableref/emptytableref.cpp +1 -1
- package/src/duckdb/src/parser/tableref/expressionlistref.cpp +5 -5
- package/src/duckdb/src/parser/tableref/joinref.cpp +6 -6
- package/src/duckdb/src/parser/tableref/pivotref.cpp +10 -15
- package/src/duckdb/src/parser/tableref/subqueryref.cpp +3 -3
- package/src/duckdb/src/parser/tableref/table_function.cpp +3 -3
- package/src/duckdb/src/parser/tableref.cpp +12 -3
- package/src/duckdb/src/parser/transform/expression/transform_array_access.cpp +7 -7
- package/src/duckdb/src/parser/transform/expression/transform_bool_expr.cpp +4 -4
- package/src/duckdb/src/parser/transform/expression/transform_boolean_test.cpp +4 -4
- package/src/duckdb/src/parser/transform/expression/transform_case.cpp +8 -10
- package/src/duckdb/src/parser/transform/expression/transform_cast.cpp +7 -9
- package/src/duckdb/src/parser/transform/expression/transform_coalesce.cpp +3 -5
- package/src/duckdb/src/parser/transform/expression/transform_columnref.cpp +22 -22
- package/src/duckdb/src/parser/transform/expression/transform_constant.cpp +2 -2
- package/src/duckdb/src/parser/transform/expression/transform_expression.cpp +42 -44
- package/src/duckdb/src/parser/transform/expression/transform_function.cpp +69 -75
- package/src/duckdb/src/parser/transform/expression/transform_grouping_function.cpp +4 -4
- package/src/duckdb/src/parser/transform/expression/transform_interval.cpp +7 -7
- package/src/duckdb/src/parser/transform/expression/transform_is_null.cpp +4 -5
- package/src/duckdb/src/parser/transform/expression/transform_lambda.cpp +5 -6
- package/src/duckdb/src/parser/transform/expression/transform_operator.cpp +28 -29
- package/src/duckdb/src/parser/transform/expression/transform_param_ref.cpp +13 -14
- package/src/duckdb/src/parser/transform/expression/transform_positional_reference.cpp +4 -4
- package/src/duckdb/src/parser/transform/expression/transform_subquery.cpp +9 -10
- package/src/duckdb/src/parser/transform/helpers/transform_cte.cpp +28 -32
- package/src/duckdb/src/parser/transform/helpers/transform_groupby.cpp +18 -18
- package/src/duckdb/src/parser/transform/helpers/transform_sample.cpp +3 -3
- package/src/duckdb/src/parser/transform/helpers/transform_typename.cpp +27 -26
- package/src/duckdb/src/parser/transform/statement/transform_alter_sequence.cpp +11 -14
- package/src/duckdb/src/parser/transform/statement/transform_alter_table.cpp +14 -16
- package/src/duckdb/src/parser/transform/statement/transform_attach.cpp +8 -9
- package/src/duckdb/src/parser/transform/statement/transform_call.cpp +2 -5
- package/src/duckdb/src/parser/transform/statement/transform_checkpoint.cpp +4 -6
- package/src/duckdb/src/parser/transform/statement/transform_copy.cpp +22 -23
- package/src/duckdb/src/parser/transform/statement/transform_create_database.cpp +3 -4
- package/src/duckdb/src/parser/transform/statement/transform_create_function.cpp +14 -18
- package/src/duckdb/src/parser/transform/statement/transform_create_index.cpp +13 -15
- package/src/duckdb/src/parser/transform/statement/transform_create_schema.cpp +8 -10
- package/src/duckdb/src/parser/transform/statement/transform_create_sequence.cpp +8 -10
- package/src/duckdb/src/parser/transform/statement/transform_create_table.cpp +26 -28
- package/src/duckdb/src/parser/transform/statement/transform_create_table_as.cpp +8 -10
- package/src/duckdb/src/parser/transform/statement/transform_create_type.cpp +12 -15
- package/src/duckdb/src/parser/transform/statement/transform_create_view.cpp +13 -18
- package/src/duckdb/src/parser/transform/statement/transform_delete.cpp +11 -13
- package/src/duckdb/src/parser/transform/statement/transform_detach.cpp +3 -4
- package/src/duckdb/src/parser/transform/statement/transform_drop.cpp +20 -22
- package/src/duckdb/src/parser/transform/statement/transform_explain.cpp +5 -7
- package/src/duckdb/src/parser/transform/statement/transform_export.cpp +5 -6
- package/src/duckdb/src/parser/transform/statement/transform_import.cpp +2 -3
- package/src/duckdb/src/parser/transform/statement/transform_insert.cpp +21 -24
- package/src/duckdb/src/parser/transform/statement/transform_load.cpp +4 -5
- package/src/duckdb/src/parser/transform/statement/transform_pivot_stmt.cpp +7 -7
- package/src/duckdb/src/parser/transform/statement/transform_pragma.cpp +7 -9
- package/src/duckdb/src/parser/transform/statement/transform_prepare.cpp +11 -19
- package/src/duckdb/src/parser/transform/statement/transform_rename.cpp +12 -14
- package/src/duckdb/src/parser/transform/statement/transform_select.cpp +12 -9
- package/src/duckdb/src/parser/transform/statement/transform_select_node.cpp +34 -34
- package/src/duckdb/src/parser/transform/statement/transform_set.cpp +18 -19
- package/src/duckdb/src/parser/transform/statement/transform_show.cpp +5 -7
- package/src/duckdb/src/parser/transform/statement/transform_show_select.cpp +4 -5
- package/src/duckdb/src/parser/transform/statement/transform_transaction.cpp +3 -5
- package/src/duckdb/src/parser/transform/statement/transform_update.cpp +10 -13
- package/src/duckdb/src/parser/transform/statement/transform_upsert.cpp +4 -4
- package/src/duckdb/src/parser/transform/statement/transform_use.cpp +2 -3
- package/src/duckdb/src/parser/transform/statement/transform_vacuum.cpp +6 -10
- package/src/duckdb/src/parser/transform/tableref/transform_base_tableref.cpp +18 -18
- package/src/duckdb/src/parser/transform/tableref/transform_from.cpp +5 -5
- package/src/duckdb/src/parser/transform/tableref/transform_join.cpp +11 -11
- package/src/duckdb/src/parser/transform/tableref/transform_pivot.cpp +27 -27
- package/src/duckdb/src/parser/transform/tableref/transform_subquery.cpp +5 -5
- package/src/duckdb/src/parser/transform/tableref/transform_table_function.cpp +13 -12
- package/src/duckdb/src/parser/transform/tableref/transform_tableref.cpp +8 -8
- package/src/duckdb/src/parser/transformer.cpp +46 -46
- package/src/duckdb/src/planner/bind_context.cpp +6 -6
- package/src/duckdb/src/planner/binder/expression/bind_function_expression.cpp +1 -1
- package/src/duckdb/src/planner/binder/expression/bind_lambda.cpp +1 -1
- package/src/duckdb/src/planner/binder/expression/bind_star_expression.cpp +1 -1
- package/src/duckdb/src/planner/binder/expression/bind_subquery_expression.cpp +6 -3
- package/src/duckdb/src/planner/binder/query_node/bind_select_node.cpp +8 -8
- package/src/duckdb/src/planner/binder/query_node/plan_query_node.cpp +4 -4
- package/src/duckdb/src/planner/binder/statement/bind_create.cpp +1 -1
- package/src/duckdb/src/planner/binder/statement/bind_insert.cpp +2 -2
- package/src/duckdb/src/planner/binder/statement/bind_update.cpp +1 -1
- package/src/duckdb/src/planner/binder/tableref/bind_pivot.cpp +1 -1
- package/src/duckdb/src/planner/binder/tableref/bind_table_function.cpp +2 -2
- package/src/duckdb/src/planner/binder.cpp +1 -1
- package/src/duckdb/src/planner/bound_result_modifier.cpp +16 -11
- package/src/duckdb/src/planner/expression/bound_aggregate_expression.cpp +5 -5
- package/src/duckdb/src/planner/expression/bound_between_expression.cpp +5 -5
- package/src/duckdb/src/planner/expression/bound_case_expression.cpp +5 -5
- package/src/duckdb/src/planner/expression/bound_cast_expression.cpp +3 -3
- package/src/duckdb/src/planner/expression/bound_columnref_expression.cpp +2 -2
- package/src/duckdb/src/planner/expression/bound_comparison_expression.cpp +4 -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_expression.cpp +1 -1
- package/src/duckdb/src/planner/expression/bound_function_expression.cpp +3 -4
- package/src/duckdb/src/planner/expression/bound_lambda_expression.cpp +4 -5
- package/src/duckdb/src/planner/expression/bound_lambdaref_expression.cpp +2 -2
- package/src/duckdb/src/planner/expression/bound_operator_expression.cpp +3 -4
- package/src/duckdb/src/planner/expression/bound_parameter_expression.cpp +2 -2
- package/src/duckdb/src/planner/expression/bound_reference_expression.cpp +2 -2
- package/src/duckdb/src/planner/expression/bound_subquery_expression.cpp +1 -1
- package/src/duckdb/src/planner/expression/bound_unnest_expression.cpp +3 -3
- package/src/duckdb/src/planner/expression/bound_window_expression.cpp +8 -21
- package/src/duckdb/src/planner/expression.cpp +15 -0
- package/src/duckdb/src/planner/expression_binder/base_select_binder.cpp +2 -2
- package/src/duckdb/src/planner/expression_iterator.cpp +2 -2
- package/src/duckdb/src/planner/filter/conjunction_filter.cpp +2 -2
- package/src/duckdb/src/planner/filter/constant_filter.cpp +1 -1
- package/src/duckdb/src/planner/logical_operator.cpp +3 -4
- package/src/duckdb/src/planner/logical_operator_visitor.cpp +1 -1
- package/src/duckdb/src/planner/table_filter.cpp +1 -1
- package/src/duckdb/src/storage/arena_allocator.cpp +2 -2
- package/src/duckdb/src/storage/buffer/block_handle.cpp +1 -1
- package/src/duckdb/src/storage/checkpoint/write_overflow_strings_to_disk.cpp +2 -2
- package/src/duckdb/src/storage/checkpoint_manager.cpp +3 -3
- package/src/duckdb/src/storage/compression/bitpacking.cpp +8 -8
- package/src/duckdb/src/storage/compression/dictionary_compression.cpp +36 -36
- package/src/duckdb/src/storage/compression/fixed_size_uncompressed.cpp +11 -11
- package/src/duckdb/src/storage/compression/fsst.cpp +34 -34
- package/src/duckdb/src/storage/compression/rle.cpp +8 -8
- package/src/duckdb/src/storage/compression/string_uncompressed.cpp +13 -13
- package/src/duckdb/src/storage/compression/validity_uncompressed.cpp +11 -11
- package/src/duckdb/src/storage/data_table.cpp +2 -2
- package/src/duckdb/src/storage/local_storage.cpp +2 -1
- package/src/duckdb/src/storage/magic_bytes.cpp +1 -1
- package/src/duckdb/src/storage/single_file_block_manager.cpp +3 -3
- package/src/duckdb/src/storage/standard_buffer_manager.cpp +3 -3
- package/src/duckdb/src/storage/statistics/list_stats.cpp +1 -1
- package/src/duckdb/src/storage/statistics/numeric_stats.cpp +1 -1
- package/src/duckdb/src/storage/statistics/string_stats.cpp +15 -14
- package/src/duckdb/src/storage/table/chunk_info.cpp +2 -2
- package/src/duckdb/src/storage/table/column_segment.cpp +3 -3
- package/src/duckdb/src/storage/table/list_column_data.cpp +3 -3
- package/src/duckdb/src/storage/table/row_group.cpp +4 -4
- package/src/duckdb/src/storage/table/standard_column_data.cpp +1 -1
- package/src/duckdb/src/storage/table/update_segment.cpp +12 -12
- package/src/duckdb/src/storage/wal_replay.cpp +1 -1
- package/src/duckdb/src/transaction/cleanup_state.cpp +3 -3
- package/src/duckdb/src/transaction/commit_state.cpp +8 -8
- package/src/duckdb/src/transaction/duck_transaction.cpp +9 -7
- package/src/duckdb/src/transaction/duck_transaction_manager.cpp +16 -16
- package/src/duckdb/src/transaction/rollback_state.cpp +3 -3
- package/src/duckdb/src/verification/prepared_statement_verifier.cpp +1 -1
- package/src/duckdb/src/verification/statement_verifier.cpp +3 -4
- package/src/duckdb/third_party/hyperloglog/hyperloglog.hpp +2 -2
- package/src/duckdb/third_party/pcg/pcg_extras.hpp +1 -1
@@ -479,15 +479,15 @@ optional_ptr<TableFilterSet> CardinalityEstimator::GetTableFilters(LogicalOperat
|
|
479
479
|
return get ? &get->table_filters : nullptr;
|
480
480
|
}
|
481
481
|
|
482
|
-
idx_t CardinalityEstimator::InspectConjunctionAND(idx_t cardinality, idx_t column_index, ConjunctionAndFilter
|
482
|
+
idx_t CardinalityEstimator::InspectConjunctionAND(idx_t cardinality, idx_t column_index, ConjunctionAndFilter &filter,
|
483
483
|
unique_ptr<BaseStatistics> base_stats) {
|
484
484
|
auto has_equality_filter = false;
|
485
485
|
auto cardinality_after_filters = cardinality;
|
486
|
-
for (auto &child_filter : filter
|
486
|
+
for (auto &child_filter : filter.child_filters) {
|
487
487
|
if (child_filter->filter_type != TableFilterType::CONSTANT_COMPARISON) {
|
488
488
|
continue;
|
489
489
|
}
|
490
|
-
auto comparison_filter = (
|
490
|
+
auto &comparison_filter = child_filter->Cast<ConstantFilter>();
|
491
491
|
if (comparison_filter.comparison_type != ExpressionType::COMPARE_EQUAL) {
|
492
492
|
continue;
|
493
493
|
}
|
@@ -510,15 +510,15 @@ idx_t CardinalityEstimator::InspectConjunctionAND(idx_t cardinality, idx_t colum
|
|
510
510
|
return cardinality_after_filters;
|
511
511
|
}
|
512
512
|
|
513
|
-
idx_t CardinalityEstimator::InspectConjunctionOR(idx_t cardinality, idx_t column_index, ConjunctionOrFilter
|
513
|
+
idx_t CardinalityEstimator::InspectConjunctionOR(idx_t cardinality, idx_t column_index, ConjunctionOrFilter &filter,
|
514
514
|
unique_ptr<BaseStatistics> base_stats) {
|
515
515
|
auto has_equality_filter = false;
|
516
516
|
auto cardinality_after_filters = cardinality;
|
517
|
-
for (auto &child_filter : filter
|
517
|
+
for (auto &child_filter : filter.child_filters) {
|
518
518
|
if (child_filter->filter_type != TableFilterType::CONSTANT_COMPARISON) {
|
519
519
|
continue;
|
520
520
|
}
|
521
|
-
auto comparison_filter = (
|
521
|
+
auto &comparison_filter = child_filter->Cast<ConstantFilter>();
|
522
522
|
if (comparison_filter.comparison_type == ExpressionType::COMPARE_EQUAL) {
|
523
523
|
auto column_count = cardinality_after_filters;
|
524
524
|
if (base_stats) {
|
@@ -549,14 +549,14 @@ idx_t CardinalityEstimator::InspectTableFilters(idx_t cardinality, LogicalOperat
|
|
549
549
|
column_statistics = get->function.statistics(context, &table_scan_bind_data, it.first);
|
550
550
|
}
|
551
551
|
if (it.second->filter_type == TableFilterType::CONJUNCTION_AND) {
|
552
|
-
auto &filter =
|
552
|
+
auto &filter = it.second->Cast<ConjunctionAndFilter>();
|
553
553
|
idx_t cardinality_with_and_filter =
|
554
|
-
InspectConjunctionAND(cardinality, it.first,
|
554
|
+
InspectConjunctionAND(cardinality, it.first, filter, std::move(column_statistics));
|
555
555
|
cardinality_after_filters = MinValue(cardinality_after_filters, cardinality_with_and_filter);
|
556
556
|
} else if (it.second->filter_type == TableFilterType::CONJUNCTION_OR) {
|
557
|
-
auto &filter =
|
557
|
+
auto &filter = it.second->Cast<ConjunctionOrFilter>();
|
558
558
|
idx_t cardinality_with_or_filter =
|
559
|
-
InspectConjunctionOR(cardinality, it.first,
|
559
|
+
InspectConjunctionOR(cardinality, it.first, filter, std::move(column_statistics));
|
560
560
|
cardinality_after_filters = MinValue(cardinality_after_filters, cardinality_with_or_filter);
|
561
561
|
}
|
562
562
|
}
|
@@ -19,7 +19,7 @@ bool ExpressionMatcher::Match(Expression &expr, vector<reference<Expression>> &b
|
|
19
19
|
}
|
20
20
|
|
21
21
|
bool ExpressionEqualityMatcher::Match(Expression &expr, vector<reference<Expression>> &bindings) {
|
22
|
-
if (!expr.Equals(
|
22
|
+
if (!expr.Equals(expression)) {
|
23
23
|
return false;
|
24
24
|
}
|
25
25
|
bindings.push_back(expr);
|
@@ -24,8 +24,8 @@ static void ReplaceExpressionBinding(vector<unique_ptr<Expression>> &proj_expres
|
|
24
24
|
BoundColumnRefExpression &colref = expr.Cast<BoundColumnRefExpression>();
|
25
25
|
// find the corresponding column index in the projection expressions
|
26
26
|
for (idx_t proj_idx = 0; proj_idx < proj_expressions.size(); proj_idx++) {
|
27
|
-
auto proj_expr = proj_expressions[proj_idx]
|
28
|
-
if (proj_expr
|
27
|
+
auto &proj_expr = *proj_expressions[proj_idx];
|
28
|
+
if (proj_expr.type == ExpressionType::BOUND_COLUMN_REF) {
|
29
29
|
if (colref.Equals(proj_expr)) {
|
30
30
|
colref.binding.table_index = proj_table_idx;
|
31
31
|
colref.binding.column_index = proj_idx;
|
@@ -39,12 +39,10 @@ unique_ptr<LogicalOperator> RegexRangeFilter::Rewrite(unique_ptr<LogicalOperator
|
|
39
39
|
}
|
40
40
|
auto filter_left = make_uniq<BoundComparisonExpression>(
|
41
41
|
ExpressionType::COMPARE_GREATERTHANOREQUALTO, func.children[0]->Copy(),
|
42
|
-
make_uniq<BoundConstantExpression>(
|
43
|
-
Value::BLOB((const_data_ptr_t)info.range_min.c_str(), info.range_min.size())));
|
42
|
+
make_uniq<BoundConstantExpression>(Value::BLOB_RAW(info.range_min)));
|
44
43
|
auto filter_right = make_uniq<BoundComparisonExpression>(
|
45
44
|
ExpressionType::COMPARE_LESSTHANOREQUALTO, func.children[0]->Copy(),
|
46
|
-
make_uniq<BoundConstantExpression>(
|
47
|
-
Value::BLOB((const_data_ptr_t)info.range_max.c_str(), info.range_max.size())));
|
45
|
+
make_uniq<BoundConstantExpression>(Value::BLOB_RAW(info.range_max)));
|
48
46
|
auto filter_expr = make_uniq<BoundConjunctionExpression>(ExpressionType::CONJUNCTION_AND,
|
49
47
|
std::move(filter_left), std::move(filter_right));
|
50
48
|
|
@@ -33,7 +33,7 @@ unique_ptr<Expression> DistributivityRule::ExtractExpression(BoundConjunctionExp
|
|
33
33
|
// AND, remove expression from the list
|
34
34
|
auto &and_expr = child->Cast<BoundConjunctionExpression>();
|
35
35
|
for (idx_t i = 0; i < and_expr.children.size(); i++) {
|
36
|
-
if (
|
36
|
+
if (and_expr.children[i]->Equals(expr)) {
|
37
37
|
result = std::move(and_expr.children[i]);
|
38
38
|
and_expr.children.erase(and_expr.children.begin() + i);
|
39
39
|
break;
|
@@ -45,7 +45,7 @@ unique_ptr<Expression> DistributivityRule::ExtractExpression(BoundConjunctionExp
|
|
45
45
|
} else {
|
46
46
|
// not an AND node! remove the entire expression
|
47
47
|
// this happens in the case of e.g. (X AND B) OR X
|
48
|
-
D_ASSERT(
|
48
|
+
D_ASSERT(child->Equals(expr));
|
49
49
|
result = std::move(child);
|
50
50
|
conj.children[idx] = nullptr;
|
51
51
|
}
|
@@ -161,15 +161,15 @@ void StatisticsPropagator::UpdateFilterStatistics(Expression &left, Expression &
|
|
161
161
|
SetStatisticsNotNull((right.Cast<BoundColumnRefExpression>()).binding);
|
162
162
|
}
|
163
163
|
// check if this is a comparison between a constant and a column ref
|
164
|
-
BoundConstantExpression
|
165
|
-
BoundColumnRefExpression
|
164
|
+
optional_ptr<BoundConstantExpression> constant;
|
165
|
+
optional_ptr<BoundColumnRefExpression> columnref;
|
166
166
|
if (left.type == ExpressionType::VALUE_CONSTANT && right.type == ExpressionType::BOUND_COLUMN_REF) {
|
167
|
-
constant = (
|
168
|
-
columnref = (
|
167
|
+
constant = &left.Cast<BoundConstantExpression>();
|
168
|
+
columnref = &right.Cast<BoundColumnRefExpression>();
|
169
169
|
comparison_type = FlipComparisonExpression(comparison_type);
|
170
170
|
} else if (left.type == ExpressionType::BOUND_COLUMN_REF && right.type == ExpressionType::VALUE_CONSTANT) {
|
171
|
-
columnref = (
|
172
|
-
constant = (
|
171
|
+
columnref = &left.Cast<BoundColumnRefExpression>();
|
172
|
+
constant = &right.Cast<BoundConstantExpression>();
|
173
173
|
} else if (left.type == ExpressionType::BOUND_COLUMN_REF && right.type == ExpressionType::BOUND_COLUMN_REF) {
|
174
174
|
// comparison between two column refs
|
175
175
|
auto &left_column_ref = left.Cast<BoundColumnRefExpression>();
|
@@ -14,14 +14,14 @@ void StatisticsPropagator::UpdateFilterStatistics(BaseStatistics &input, TableFi
|
|
14
14
|
// FIXME: update stats...
|
15
15
|
switch (filter.filter_type) {
|
16
16
|
case TableFilterType::CONJUNCTION_AND: {
|
17
|
-
auto &conjunction_and = (
|
17
|
+
auto &conjunction_and = filter.Cast<ConjunctionAndFilter>();
|
18
18
|
for (auto &child_filter : conjunction_and.child_filters) {
|
19
19
|
UpdateFilterStatistics(input, *child_filter);
|
20
20
|
}
|
21
21
|
break;
|
22
22
|
}
|
23
23
|
case TableFilterType::CONSTANT_COMPARISON: {
|
24
|
-
auto &constant_filter = (
|
24
|
+
auto &constant_filter = filter.Cast<ConstantFilter>();
|
25
25
|
UpdateFilterStatistics(input, constant_filter.comparison_type, constant_filter.constant);
|
26
26
|
break;
|
27
27
|
}
|
@@ -562,7 +562,7 @@ bool Executor::HasResultCollector() {
|
|
562
562
|
|
563
563
|
unique_ptr<QueryResult> Executor::GetResult() {
|
564
564
|
D_ASSERT(HasResultCollector());
|
565
|
-
auto &result_collector = (
|
565
|
+
auto &result_collector = physical_plan->Cast<PhysicalResultCollector>();
|
566
566
|
D_ASSERT(result_collector.sink_state);
|
567
567
|
return result_collector.GetResult(*result_collector.sink_state);
|
568
568
|
}
|
@@ -18,11 +18,8 @@ string BaseExpression::GetName() const {
|
|
18
18
|
return !alias.empty() ? alias : ToString();
|
19
19
|
}
|
20
20
|
|
21
|
-
bool BaseExpression::Equals(const BaseExpression
|
22
|
-
if (
|
23
|
-
return false;
|
24
|
-
}
|
25
|
-
if (this->expression_class != other->expression_class || this->type != other->type) {
|
21
|
+
bool BaseExpression::Equals(const BaseExpression &other) const {
|
22
|
+
if (expression_class != other.expression_class || type != other.type) {
|
26
23
|
return false;
|
27
24
|
}
|
28
25
|
return true;
|
@@ -15,14 +15,14 @@ string BetweenExpression::ToString() const {
|
|
15
15
|
return ToString<BetweenExpression, ParsedExpression>(*this);
|
16
16
|
}
|
17
17
|
|
18
|
-
bool BetweenExpression::Equal(const BetweenExpression
|
19
|
-
if (!a
|
18
|
+
bool BetweenExpression::Equal(const BetweenExpression &a, const BetweenExpression &b) {
|
19
|
+
if (!a.input->Equals(*b.input)) {
|
20
20
|
return false;
|
21
21
|
}
|
22
|
-
if (!a
|
22
|
+
if (!a.lower->Equals(*b.lower)) {
|
23
23
|
return false;
|
24
24
|
}
|
25
|
-
if (!a
|
25
|
+
if (!a.upper->Equals(*b.upper)) {
|
26
26
|
return false;
|
27
27
|
}
|
28
28
|
return true;
|
@@ -27,19 +27,19 @@ string CaseExpression::ToString() const {
|
|
27
27
|
return ToString<CaseExpression, ParsedExpression>(*this);
|
28
28
|
}
|
29
29
|
|
30
|
-
bool CaseExpression::Equal(const CaseExpression
|
31
|
-
if (a
|
30
|
+
bool CaseExpression::Equal(const CaseExpression &a, const CaseExpression &b) {
|
31
|
+
if (a.case_checks.size() != b.case_checks.size()) {
|
32
32
|
return false;
|
33
33
|
}
|
34
|
-
for (idx_t i = 0; i < a
|
35
|
-
if (!a
|
34
|
+
for (idx_t i = 0; i < a.case_checks.size(); i++) {
|
35
|
+
if (!a.case_checks[i].when_expr->Equals(*b.case_checks[i].when_expr)) {
|
36
36
|
return false;
|
37
37
|
}
|
38
|
-
if (!a
|
38
|
+
if (!a.case_checks[i].then_expr->Equals(*b.case_checks[i].then_expr)) {
|
39
39
|
return false;
|
40
40
|
}
|
41
41
|
}
|
42
|
-
if (!a
|
42
|
+
if (!a.else_expr->Equals(*b.else_expr)) {
|
43
43
|
return false;
|
44
44
|
}
|
45
45
|
return true;
|
@@ -19,14 +19,14 @@ string CastExpression::ToString() const {
|
|
19
19
|
return ToString<CastExpression, ParsedExpression>(*this);
|
20
20
|
}
|
21
21
|
|
22
|
-
bool CastExpression::Equal(const CastExpression
|
23
|
-
if (!a
|
22
|
+
bool CastExpression::Equal(const CastExpression &a, const CastExpression &b) {
|
23
|
+
if (!a.child->Equals(*b.child)) {
|
24
24
|
return false;
|
25
25
|
}
|
26
|
-
if (a
|
26
|
+
if (a.cast_type != b.cast_type) {
|
27
27
|
return false;
|
28
28
|
}
|
29
|
-
if (a
|
29
|
+
if (a.try_cast != b.try_cast) {
|
30
30
|
return false;
|
31
31
|
}
|
32
32
|
return true;
|
@@ -18,11 +18,11 @@ string CollateExpression::ToString() const {
|
|
18
18
|
return StringUtil::Format("%s COLLATE %s", child->ToString(), SQLIdentifier(collation));
|
19
19
|
}
|
20
20
|
|
21
|
-
bool CollateExpression::Equal(const CollateExpression
|
22
|
-
if (!a
|
21
|
+
bool CollateExpression::Equal(const CollateExpression &a, const CollateExpression &b) {
|
22
|
+
if (!a.child->Equals(*b.child)) {
|
23
23
|
return false;
|
24
24
|
}
|
25
|
-
if (a
|
25
|
+
if (a.collation != b.collation) {
|
26
26
|
return false;
|
27
27
|
}
|
28
28
|
return true;
|
@@ -64,12 +64,12 @@ string ColumnRefExpression::ToString() const {
|
|
64
64
|
return result;
|
65
65
|
}
|
66
66
|
|
67
|
-
bool ColumnRefExpression::Equal(const ColumnRefExpression
|
68
|
-
if (a
|
67
|
+
bool ColumnRefExpression::Equal(const ColumnRefExpression &a, const ColumnRefExpression &b) {
|
68
|
+
if (a.column_names.size() != b.column_names.size()) {
|
69
69
|
return false;
|
70
70
|
}
|
71
|
-
for (idx_t i = 0; i < a
|
72
|
-
if (!StringUtil::CIEquals(a
|
71
|
+
for (idx_t i = 0; i < a.column_names.size(); i++) {
|
72
|
+
if (!StringUtil::CIEquals(a.column_names[i], b.column_names[i])) {
|
73
73
|
return false;
|
74
74
|
}
|
75
75
|
}
|
@@ -18,11 +18,11 @@ string ComparisonExpression::ToString() const {
|
|
18
18
|
return ToString<ComparisonExpression, ParsedExpression>(*this);
|
19
19
|
}
|
20
20
|
|
21
|
-
bool ComparisonExpression::Equal(const ComparisonExpression
|
22
|
-
if (!a
|
21
|
+
bool ComparisonExpression::Equal(const ComparisonExpression &a, const ComparisonExpression &b) {
|
22
|
+
if (!a.left->Equals(*b.left)) {
|
23
23
|
return false;
|
24
24
|
}
|
25
|
-
if (!a
|
25
|
+
if (!a.right->Equals(*b.right)) {
|
26
26
|
return false;
|
27
27
|
}
|
28
28
|
return true;
|
@@ -42,8 +42,8 @@ string ConjunctionExpression::ToString() const {
|
|
42
42
|
return ToString<ConjunctionExpression, ParsedExpression>(*this);
|
43
43
|
}
|
44
44
|
|
45
|
-
bool ConjunctionExpression::Equal(const ConjunctionExpression
|
46
|
-
return ExpressionUtil::SetEquals(a
|
45
|
+
bool ConjunctionExpression::Equal(const ConjunctionExpression &a, const ConjunctionExpression &b) {
|
46
|
+
return ExpressionUtil::SetEquals(a.children, b.children);
|
47
47
|
}
|
48
48
|
|
49
49
|
unique_ptr<ParsedExpression> ConjunctionExpression::Copy() const {
|
@@ -18,8 +18,8 @@ string ConstantExpression::ToString() const {
|
|
18
18
|
return value.ToSQLString();
|
19
19
|
}
|
20
20
|
|
21
|
-
bool ConstantExpression::Equal(const ConstantExpression
|
22
|
-
return a
|
21
|
+
bool ConstantExpression::Equal(const ConstantExpression &a, const ConstantExpression &b) {
|
22
|
+
return a.value.type() == b.value.type() && !ValueOperations::DistinctFrom(a.value, b.value);
|
23
23
|
}
|
24
24
|
|
25
25
|
hash_t ConstantExpression::Hash() const {
|
@@ -37,26 +37,26 @@ string FunctionExpression::ToString() const {
|
|
37
37
|
filter.get(), order_bys.get(), export_state, true);
|
38
38
|
}
|
39
39
|
|
40
|
-
bool FunctionExpression::Equal(const FunctionExpression
|
41
|
-
if (a
|
42
|
-
b
|
40
|
+
bool FunctionExpression::Equal(const FunctionExpression &a, const FunctionExpression &b) {
|
41
|
+
if (a.catalog != b.catalog || a.schema != b.schema || a.function_name != b.function_name ||
|
42
|
+
b.distinct != a.distinct) {
|
43
43
|
return false;
|
44
44
|
}
|
45
|
-
if (b
|
45
|
+
if (b.children.size() != a.children.size()) {
|
46
46
|
return false;
|
47
47
|
}
|
48
|
-
for (idx_t i = 0; i < a
|
49
|
-
if (!a
|
48
|
+
for (idx_t i = 0; i < a.children.size(); i++) {
|
49
|
+
if (!a.children[i]->Equals(*b.children[i])) {
|
50
50
|
return false;
|
51
51
|
}
|
52
52
|
}
|
53
|
-
if (!
|
53
|
+
if (!ParsedExpression::Equals(a.filter, b.filter)) {
|
54
54
|
return false;
|
55
55
|
}
|
56
|
-
if (!a
|
56
|
+
if (!OrderModifier::Equals(a.order_bys, b.order_bys)) {
|
57
57
|
return false;
|
58
58
|
}
|
59
|
-
if (a
|
59
|
+
if (a.export_state != b.export_state) {
|
60
60
|
return false;
|
61
61
|
}
|
62
62
|
return true;
|
@@ -81,11 +81,7 @@ unique_ptr<ParsedExpression> FunctionExpression::Copy() const {
|
|
81
81
|
if (filter) {
|
82
82
|
filter_copy = filter->Copy();
|
83
83
|
}
|
84
|
-
|
85
|
-
if (order_bys) {
|
86
|
-
order_copy.reset(static_cast<OrderModifier *>(order_bys->Copy().release()));
|
87
|
-
}
|
88
|
-
|
84
|
+
auto order_copy = order_bys ? unique_ptr_cast<ResultModifier, OrderModifier>(order_bys->Copy()) : nullptr;
|
89
85
|
auto copy =
|
90
86
|
make_uniq<FunctionExpression>(catalog, schema, function_name, std::move(copy_children), std::move(filter_copy),
|
91
87
|
std::move(order_copy), distinct, is_operator, export_state);
|
@@ -16,8 +16,8 @@ string LambdaExpression::ToString() const {
|
|
16
16
|
return lhs->ToString() + " -> " + expr->ToString();
|
17
17
|
}
|
18
18
|
|
19
|
-
bool LambdaExpression::Equal(const LambdaExpression
|
20
|
-
return a
|
19
|
+
bool LambdaExpression::Equal(const LambdaExpression &a, const LambdaExpression &b) {
|
20
|
+
return a.lhs->Equals(*b.lhs) && a.expr->Equals(*b.expr);
|
21
21
|
}
|
22
22
|
|
23
23
|
hash_t LambdaExpression::Hash() const {
|
@@ -27,12 +27,12 @@ string OperatorExpression::ToString() const {
|
|
27
27
|
return ToString<OperatorExpression, ParsedExpression>(*this);
|
28
28
|
}
|
29
29
|
|
30
|
-
bool OperatorExpression::Equal(const OperatorExpression
|
31
|
-
if (a
|
30
|
+
bool OperatorExpression::Equal(const OperatorExpression &a, const OperatorExpression &b) {
|
31
|
+
if (a.children.size() != b.children.size()) {
|
32
32
|
return false;
|
33
33
|
}
|
34
|
-
for (idx_t i = 0; i < a
|
35
|
-
if (!a
|
34
|
+
for (idx_t i = 0; i < a.children.size(); i++) {
|
35
|
+
if (!a.children[i]->Equals(*b.children[i])) {
|
36
36
|
return false;
|
37
37
|
}
|
38
38
|
}
|
@@ -25,8 +25,8 @@ unique_ptr<ParsedExpression> ParameterExpression::Copy() const {
|
|
25
25
|
return std::move(copy);
|
26
26
|
}
|
27
27
|
|
28
|
-
bool ParameterExpression::Equal(const ParameterExpression
|
29
|
-
return a
|
28
|
+
bool ParameterExpression::Equal(const ParameterExpression &a, const ParameterExpression &b) {
|
29
|
+
return a.parameter_nr == b.parameter_nr;
|
30
30
|
}
|
31
31
|
|
32
32
|
hash_t ParameterExpression::Hash() const {
|
@@ -18,9 +18,9 @@ string PositionalReferenceExpression::ToString() const {
|
|
18
18
|
return "#" + to_string(index);
|
19
19
|
}
|
20
20
|
|
21
|
-
bool PositionalReferenceExpression::Equal(const PositionalReferenceExpression
|
22
|
-
const PositionalReferenceExpression
|
23
|
-
return a
|
21
|
+
bool PositionalReferenceExpression::Equal(const PositionalReferenceExpression &a,
|
22
|
+
const PositionalReferenceExpression &b) {
|
23
|
+
return a.index == b.index;
|
24
24
|
}
|
25
25
|
|
26
26
|
unique_ptr<ParsedExpression> PositionalReferenceExpression::Copy() const {
|
@@ -54,26 +54,26 @@ string StarExpression::ToString() const {
|
|
54
54
|
return result;
|
55
55
|
}
|
56
56
|
|
57
|
-
bool StarExpression::Equal(const StarExpression
|
58
|
-
if (a
|
57
|
+
bool StarExpression::Equal(const StarExpression &a, const StarExpression &b) {
|
58
|
+
if (a.relation_name != b.relation_name || a.exclude_list != b.exclude_list) {
|
59
59
|
return false;
|
60
60
|
}
|
61
|
-
if (a
|
61
|
+
if (a.columns != b.columns) {
|
62
62
|
return false;
|
63
63
|
}
|
64
|
-
if (a
|
64
|
+
if (a.replace_list.size() != b.replace_list.size()) {
|
65
65
|
return false;
|
66
66
|
}
|
67
|
-
for (auto &entry : a
|
68
|
-
auto other_entry = b
|
69
|
-
if (other_entry == b
|
67
|
+
for (auto &entry : a.replace_list) {
|
68
|
+
auto other_entry = b.replace_list.find(entry.first);
|
69
|
+
if (other_entry == b.replace_list.end()) {
|
70
70
|
return false;
|
71
71
|
}
|
72
|
-
if (!entry.second->Equals(other_entry->second
|
72
|
+
if (!entry.second->Equals(*other_entry->second)) {
|
73
73
|
return false;
|
74
74
|
}
|
75
75
|
}
|
76
|
-
if (!
|
76
|
+
if (!ParsedExpression::Equals(a.expr, b.expr)) {
|
77
77
|
return false;
|
78
78
|
}
|
79
79
|
return true;
|
@@ -28,15 +28,15 @@ string SubqueryExpression::ToString() const {
|
|
28
28
|
}
|
29
29
|
}
|
30
30
|
|
31
|
-
bool SubqueryExpression::Equal(const SubqueryExpression
|
32
|
-
if (!a
|
31
|
+
bool SubqueryExpression::Equal(const SubqueryExpression &a, const SubqueryExpression &b) {
|
32
|
+
if (!a.subquery || !b.subquery) {
|
33
33
|
return false;
|
34
34
|
}
|
35
|
-
if (!
|
35
|
+
if (!ParsedExpression::Equals(a.child, b.child)) {
|
36
36
|
return false;
|
37
37
|
}
|
38
|
-
return a
|
39
|
-
a
|
38
|
+
return a.comparison_type == b.comparison_type && a.subquery_type == b.subquery_type &&
|
39
|
+
a.subquery->Equals(*b.subquery);
|
40
40
|
}
|
41
41
|
|
42
42
|
unique_ptr<ParsedExpression> SubqueryExpression::Copy() const {
|
@@ -63,53 +63,42 @@ string WindowExpression::ToString() const {
|
|
63
63
|
return ToString<WindowExpression, ParsedExpression, OrderByNode>(*this, schema, function_name);
|
64
64
|
}
|
65
65
|
|
66
|
-
bool WindowExpression::Equal(const WindowExpression
|
66
|
+
bool WindowExpression::Equal(const WindowExpression &a, const WindowExpression &b) {
|
67
67
|
// check if the child expressions are equivalent
|
68
|
-
if (
|
68
|
+
if (a.ignore_nulls != b.ignore_nulls) {
|
69
69
|
return false;
|
70
70
|
}
|
71
|
-
if (a
|
71
|
+
if (!ParsedExpression::ListEquals(a.children, b.children)) {
|
72
72
|
return false;
|
73
73
|
}
|
74
|
-
|
75
|
-
if (!a->children[i]->Equals(b->children[i].get())) {
|
76
|
-
return false;
|
77
|
-
}
|
78
|
-
}
|
79
|
-
if (a->start != b->start || a->end != b->end) {
|
74
|
+
if (a.start != b.start || a.end != b.end) {
|
80
75
|
return false;
|
81
76
|
}
|
82
77
|
// check if the framing expressions are equivalentbind_
|
83
|
-
if (!
|
84
|
-
!
|
85
|
-
!
|
86
|
-
!BaseExpression::Equals(a->default_expr.get(), b->default_expr.get())) {
|
78
|
+
if (!ParsedExpression::Equals(a.start_expr, b.start_expr) || !ParsedExpression::Equals(a.end_expr, b.end_expr) ||
|
79
|
+
!ParsedExpression::Equals(a.offset_expr, b.offset_expr) ||
|
80
|
+
!ParsedExpression::Equals(a.default_expr, b.default_expr)) {
|
87
81
|
return false;
|
88
82
|
}
|
89
83
|
|
90
84
|
// check if the partitions are equivalent
|
91
|
-
if (a
|
85
|
+
if (!ParsedExpression::ListEquals(a.partitions, b.partitions)) {
|
92
86
|
return false;
|
93
87
|
}
|
94
|
-
for (idx_t i = 0; i < a->partitions.size(); i++) {
|
95
|
-
if (!a->partitions[i]->Equals(b->partitions[i].get())) {
|
96
|
-
return false;
|
97
|
-
}
|
98
|
-
}
|
99
88
|
// check if the orderings are equivalent
|
100
|
-
if (a
|
89
|
+
if (a.orders.size() != b.orders.size()) {
|
101
90
|
return false;
|
102
91
|
}
|
103
|
-
for (idx_t i = 0; i < a
|
104
|
-
if (a
|
92
|
+
for (idx_t i = 0; i < a.orders.size(); i++) {
|
93
|
+
if (a.orders[i].type != b.orders[i].type) {
|
105
94
|
return false;
|
106
95
|
}
|
107
|
-
if (!a
|
96
|
+
if (!a.orders[i].expression->Equals(*b.orders[i].expression)) {
|
108
97
|
return false;
|
109
98
|
}
|
110
99
|
}
|
111
100
|
// check if the filter clauses are equivalent
|
112
|
-
if (!
|
101
|
+
if (!ParsedExpression::Equals(a.filter_expr, b.filter_expr)) {
|
113
102
|
return false;
|
114
103
|
}
|
115
104
|
|