duckdb 1.1.2-dev4.0 → 1.1.2-dev6.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/third_party/icu/common/putil.cpp +0 -5
- package/src/duckdb/extension/icu/third_party/icu/common/rbbiscan.cpp +1 -1
- package/src/duckdb/extension/icu/third_party/icu/common/rbbitblb.cpp +1 -1
- package/src/duckdb/extension/icu/third_party/icu/common/ucurr.cpp +1 -1
- package/src/duckdb/extension/icu/third_party/icu/common/uresbund.cpp +1 -1
- package/src/duckdb/extension/icu/third_party/icu/common/uresimp.h +31 -31
- package/src/duckdb/extension/icu/third_party/icu/common/ustring.cpp +1 -1
- package/src/duckdb/extension/icu/third_party/icu/common/uvector.cpp +1 -1
- package/src/duckdb/extension/icu/third_party/icu/i18n/coleitr.cpp +12 -12
- package/src/duckdb/extension/icu/third_party/icu/i18n/format.cpp +1 -1
- package/src/duckdb/extension/icu/third_party/icu/i18n/listformatter.cpp +4 -4
- package/src/duckdb/extension/icu/third_party/icu/i18n/number_decimalquantity.h +1 -1
- package/src/duckdb/extension/icu/third_party/icu/i18n/tzgnames.cpp +1 -1
- package/src/duckdb/extension/icu/third_party/icu/i18n/unicode/coleitr.h +28 -28
- package/src/duckdb/extension/icu/third_party/icu/i18n/unicode/format.h +7 -7
- package/src/duckdb/extension/icu/third_party/icu/i18n/unicode/ucol.h +1 -1
- package/src/duckdb/extension/icu/third_party/icu/i18n/unicode/ucoleitr.h +41 -41
- package/src/duckdb/extension/icu/third_party/icu/i18n/unicode/umsg.h +41 -41
- package/src/duckdb/extension/icu/third_party/icu/i18n/usrchimp.h +3 -3
- package/src/duckdb/extension/json/include/json_common.hpp +1 -1
- package/src/duckdb/extension/json/json_functions/json_structure.cpp +13 -7
- package/src/duckdb/extension/parquet/column_writer.cpp +2 -1
- package/src/duckdb/extension/parquet/geo_parquet.cpp +24 -9
- package/src/duckdb/extension/parquet/include/geo_parquet.hpp +3 -1
- package/src/duckdb/extension/parquet/include/parquet_reader.hpp +1 -0
- package/src/duckdb/extension/parquet/include/parquet_rle_bp_decoder.hpp +1 -1
- package/src/duckdb/extension/parquet/include/templated_column_reader.hpp +0 -4
- package/src/duckdb/extension/parquet/parquet_extension.cpp +20 -6
- package/src/duckdb/extension/parquet/parquet_reader.cpp +1 -2
- package/src/duckdb/extension/parquet/parquet_writer.cpp +1 -1
- package/src/duckdb/extension/parquet/serialize_parquet.cpp +0 -2
- package/src/duckdb/src/catalog/catalog_entry/duck_schema_entry.cpp +8 -1
- package/src/duckdb/src/catalog/default/default_functions.cpp +5 -5
- package/src/duckdb/src/common/allocator.cpp +3 -2
- package/src/duckdb/src/common/arrow/arrow_appender.cpp +1 -0
- package/src/duckdb/src/common/arrow/arrow_converter.cpp +11 -0
- package/src/duckdb/src/common/arrow/schema_metadata.cpp +6 -4
- package/src/duckdb/src/common/enum_util.cpp +33 -0
- package/src/duckdb/src/common/exception.cpp +3 -0
- package/src/duckdb/src/common/extra_type_info.cpp +1 -44
- package/src/duckdb/src/common/field_writer.cpp +97 -0
- package/src/duckdb/src/common/render_tree.cpp +7 -5
- package/src/duckdb/src/common/row_operations/row_match.cpp +359 -0
- package/src/duckdb/src/common/serializer/buffered_deserializer.cpp +27 -0
- package/src/duckdb/src/common/serializer/buffered_serializer.cpp +36 -0
- package/src/duckdb/src/common/serializer/format_serializer.cpp +15 -0
- package/src/duckdb/src/common/serializer.cpp +24 -0
- package/src/duckdb/src/common/sort/comparators.cpp +2 -2
- package/src/duckdb/src/common/types/bit.cpp +57 -34
- package/src/duckdb/src/common/types/data_chunk.cpp +32 -29
- package/src/duckdb/src/common/types/vector_cache.cpp +12 -6
- package/src/duckdb/src/common/vector_operations/comparison_operators.cpp +14 -0
- package/src/duckdb/src/core_functions/aggregate/distributive/bitstring_agg.cpp +20 -1
- package/src/duckdb/src/core_functions/aggregate/distributive/minmax.cpp +2 -2
- package/src/duckdb/src/core_functions/aggregate/holistic/approx_top_k.cpp +32 -7
- package/src/duckdb/src/core_functions/function_list.cpp +1 -2
- package/src/duckdb/src/core_functions/scalar/bit/bitstring.cpp +23 -5
- package/src/duckdb/src/core_functions/scalar/date/date_diff.cpp +12 -6
- package/src/duckdb/src/core_functions/scalar/date/date_part.cpp +1 -1
- package/src/duckdb/src/execution/expression_executor/execute_between.cpp +4 -3
- package/src/duckdb/src/execution/expression_executor/execute_case.cpp +4 -3
- package/src/duckdb/src/execution/expression_executor/execute_cast.cpp +2 -1
- package/src/duckdb/src/execution/expression_executor/execute_comparison.cpp +3 -2
- package/src/duckdb/src/execution/expression_executor/execute_conjunction.cpp +2 -1
- package/src/duckdb/src/execution/expression_executor/execute_function.cpp +2 -1
- package/src/duckdb/src/execution/expression_executor/execute_operator.cpp +3 -2
- package/src/duckdb/src/execution/expression_executor/execute_reference.cpp +1 -1
- package/src/duckdb/src/execution/expression_executor.cpp +9 -3
- package/src/duckdb/src/execution/expression_executor_state.cpp +11 -9
- package/src/duckdb/src/execution/index/art/fixed_size_allocator.cpp +238 -0
- package/src/duckdb/src/execution/index/art/plan_art.cpp +94 -0
- package/src/duckdb/src/execution/index/index_type_set.cpp +4 -1
- package/src/duckdb/src/execution/join_hashtable.cpp +7 -8
- package/src/duckdb/src/execution/operator/aggregate/physical_hash_aggregate.cpp +6 -4
- package/src/duckdb/src/execution/operator/csv_scanner/buffer_manager/csv_buffer_manager.cpp +4 -4
- package/src/duckdb/src/execution/operator/csv_scanner/scanner/base_scanner.cpp +1 -1
- package/src/duckdb/src/execution/operator/csv_scanner/scanner/csv_schema.cpp +44 -5
- package/src/duckdb/src/execution/operator/csv_scanner/scanner/string_value_scanner.cpp +28 -24
- package/src/duckdb/src/execution/operator/csv_scanner/sniffer/csv_sniffer.cpp +25 -26
- package/src/duckdb/src/execution/operator/csv_scanner/sniffer/dialect_detection.cpp +5 -3
- package/src/duckdb/src/execution/operator/csv_scanner/sniffer/header_detection.cpp +4 -4
- package/src/duckdb/src/execution/operator/csv_scanner/sniffer/type_detection.cpp +2 -2
- package/src/duckdb/src/execution/operator/csv_scanner/sniffer/type_refinement.cpp +1 -1
- package/src/duckdb/src/execution/operator/csv_scanner/sniffer/type_replacement.cpp +1 -1
- package/src/duckdb/src/execution/operator/csv_scanner/state_machine/csv_state_machine.cpp +1 -1
- package/src/duckdb/src/execution/operator/csv_scanner/state_machine/csv_state_machine_cache.cpp +2 -2
- package/src/duckdb/src/execution/operator/csv_scanner/table_function/csv_file_scanner.cpp +1 -1
- package/src/duckdb/src/execution/operator/csv_scanner/table_function/global_csv_state.cpp +1 -1
- package/src/duckdb/src/execution/operator/csv_scanner/util/csv_reader_options.cpp +73 -27
- package/src/duckdb/src/execution/operator/helper/physical_buffered_collector.cpp +1 -1
- package/src/duckdb/src/execution/operator/persistent/base_csv_reader.cpp +695 -0
- package/src/duckdb/src/execution/operator/persistent/buffered_csv_reader.cpp +1487 -0
- package/src/duckdb/src/execution/operator/persistent/csv_buffer.cpp +72 -0
- package/src/duckdb/src/execution/operator/persistent/csv_file_handle.cpp +158 -0
- package/src/duckdb/src/execution/operator/persistent/csv_reader_options.cpp +280 -0
- package/src/duckdb/src/execution/operator/persistent/parallel_csv_reader.cpp +666 -0
- package/src/duckdb/src/execution/operator/persistent/physical_export.cpp +14 -4
- package/src/duckdb/src/execution/operator/schema/physical_create_index.cpp +207 -0
- package/src/duckdb/src/execution/partitionable_hashtable.cpp +207 -0
- package/src/duckdb/src/execution/perfect_aggregate_hashtable.cpp +6 -1
- package/src/duckdb/src/execution/physical_plan/plan_comparison_join.cpp +0 -4
- package/src/duckdb/src/execution/physical_plan/plan_create_index.cpp +14 -87
- package/src/duckdb/src/execution/physical_plan/plan_export.cpp +1 -1
- package/src/duckdb/src/execution/physical_plan/plan_get.cpp +1 -1
- package/src/duckdb/src/execution/reservoir_sample.cpp +1 -1
- package/src/duckdb/src/execution/window_executor.cpp +3 -3
- package/src/duckdb/src/function/pragma/pragma_queries.cpp +1 -1
- package/src/duckdb/src/function/scalar/strftime_format.cpp +1 -2
- package/src/duckdb/src/function/scalar/string/concat.cpp +118 -151
- package/src/duckdb/src/function/table/arrow.cpp +13 -0
- package/src/duckdb/src/function/table/arrow_conversion.cpp +12 -7
- package/src/duckdb/src/function/table/copy_csv.cpp +1 -1
- package/src/duckdb/src/function/table/read_csv.cpp +2 -30
- package/src/duckdb/src/function/table/sniff_csv.cpp +2 -1
- package/src/duckdb/src/function/table/system/duckdb_secrets.cpp +15 -7
- package/src/duckdb/src/function/table/version/pragma_version.cpp +3 -3
- package/src/duckdb/src/include/duckdb/catalog/catalog_entry_retriever.hpp +1 -1
- package/src/duckdb/src/include/duckdb/common/atomic.hpp +13 -1
- package/src/duckdb/src/include/duckdb/common/bitpacking.hpp +3 -4
- package/src/duckdb/src/include/duckdb/common/enum_util.hpp +8 -0
- package/src/duckdb/src/include/duckdb/common/enums/metric_type.hpp +2 -0
- package/src/duckdb/src/include/duckdb/common/exception.hpp +10 -0
- package/src/duckdb/src/include/duckdb/common/extra_type_info/enum_type_info.hpp +53 -0
- package/src/duckdb/src/include/duckdb/common/insertion_order_preserving_map.hpp +5 -5
- package/src/duckdb/src/include/duckdb/common/multi_file_reader.hpp +5 -0
- package/src/duckdb/src/include/duckdb/common/types/bit.hpp +36 -33
- package/src/duckdb/src/include/duckdb/common/types/data_chunk.hpp +10 -13
- package/src/duckdb/src/include/duckdb/common/types/uhugeint.hpp +1 -1
- package/src/duckdb/src/include/duckdb/common/types/vector_cache.hpp +7 -5
- package/src/duckdb/src/include/duckdb/common/windows_undefs.hpp +2 -1
- package/src/duckdb/src/include/duckdb/core_functions/aggregate/minmax_n_helpers.hpp +2 -0
- package/src/duckdb/src/include/duckdb/core_functions/scalar/bit_functions.hpp +1 -1
- package/src/duckdb/src/include/duckdb/core_functions/scalar/list_functions.hpp +0 -6
- package/src/duckdb/src/include/duckdb/core_functions/scalar/math_functions.hpp +1 -1
- package/src/duckdb/src/include/duckdb/execution/expression_executor_state.hpp +3 -2
- package/src/duckdb/src/include/duckdb/execution/index/art/art.hpp +3 -0
- package/src/duckdb/src/include/duckdb/execution/index/index_type.hpp +16 -1
- package/src/duckdb/src/include/duckdb/execution/operator/csv_scanner/csv_buffer_manager.hpp +4 -4
- package/src/duckdb/src/include/duckdb/execution/operator/csv_scanner/csv_reader_options.hpp +4 -2
- package/src/duckdb/src/include/duckdb/execution/operator/csv_scanner/csv_schema.hpp +3 -2
- package/src/duckdb/src/include/duckdb/execution/operator/csv_scanner/sniffer/csv_sniffer.hpp +91 -36
- package/src/duckdb/src/include/duckdb/execution/operator/csv_scanner/sniffer/sniff_result.hpp +36 -0
- package/src/duckdb/src/include/duckdb/execution/operator/csv_scanner/string_value_scanner.hpp +1 -1
- package/src/duckdb/src/include/duckdb/execution/operator/join/perfect_hash_join_executor.hpp +0 -1
- package/src/duckdb/src/include/duckdb/execution/operator/persistent/physical_export.hpp +2 -5
- package/src/duckdb/src/include/duckdb/function/table_function.hpp +1 -1
- package/src/duckdb/src/include/duckdb/main/database.hpp +5 -0
- package/src/duckdb/src/include/duckdb/main/extension_entries.hpp +1 -0
- package/src/duckdb/src/include/duckdb/main/profiling_info.hpp +20 -22
- package/src/duckdb/src/include/duckdb/main/query_profiler.hpp +7 -9
- package/src/duckdb/src/include/duckdb/main/secret/secret.hpp +8 -1
- package/src/duckdb/src/include/duckdb/main/table_description.hpp +14 -0
- package/src/duckdb/src/include/duckdb/optimizer/unnest_rewriter.hpp +5 -5
- package/src/duckdb/src/include/duckdb/parser/parsed_data/exported_table_data.hpp +15 -5
- package/src/duckdb/src/include/duckdb/parser/transformer.hpp +2 -0
- package/src/duckdb/src/include/duckdb/planner/expression_binder/order_binder.hpp +4 -0
- package/src/duckdb/src/include/duckdb/planner/operator/logical_export.hpp +10 -13
- package/src/duckdb/src/include/duckdb/planner/table_filter.hpp +1 -0
- package/src/duckdb/src/include/duckdb/storage/metadata/metadata_manager.hpp +2 -2
- package/src/duckdb/src/include/duckdb/storage/standard_buffer_manager.hpp +1 -1
- package/src/duckdb/src/include/duckdb/storage/statistics/distinct_statistics.hpp +0 -2
- package/src/duckdb/src/include/duckdb/storage/table/segment_tree.hpp +1 -0
- package/src/duckdb/src/include/duckdb/transaction/duck_transaction.hpp +5 -1
- package/src/duckdb/src/include/duckdb.h +2 -2
- package/src/duckdb/src/main/appender.cpp +3 -0
- package/src/duckdb/src/main/capi/profiling_info-c.cpp +5 -2
- package/src/duckdb/src/main/client_context.cpp +8 -2
- package/src/duckdb/src/main/connection.cpp +1 -1
- package/src/duckdb/src/main/database.cpp +13 -0
- package/src/duckdb/src/main/extension/extension_helper.cpp +1 -1
- package/src/duckdb/src/main/extension/extension_install.cpp +9 -1
- package/src/duckdb/src/main/extension/extension_load.cpp +3 -2
- package/src/duckdb/src/main/extension_install_info.cpp +1 -1
- package/src/duckdb/src/main/profiling_info.cpp +78 -58
- package/src/duckdb/src/main/query_profiler.cpp +79 -89
- package/src/duckdb/src/main/relation/read_csv_relation.cpp +1 -1
- package/src/duckdb/src/main/secret/secret.cpp +2 -1
- package/src/duckdb/src/main/secret/secret_manager.cpp +14 -0
- package/src/duckdb/src/optimizer/cte_filter_pusher.cpp +4 -2
- package/src/duckdb/src/optimizer/deliminator.cpp +0 -7
- package/src/duckdb/src/optimizer/in_clause_rewriter.cpp +7 -0
- package/src/duckdb/src/optimizer/pushdown/pushdown_left_join.cpp +4 -1
- package/src/duckdb/src/optimizer/unnest_rewriter.cpp +21 -21
- package/src/duckdb/src/parallel/task_scheduler.cpp +9 -0
- package/src/duckdb/src/parser/parsed_data/exported_table_data.cpp +22 -0
- package/src/duckdb/src/parser/parsed_expression_iterator.cpp +3 -0
- package/src/duckdb/src/parser/statement/insert_statement.cpp +7 -1
- package/src/duckdb/src/parser/transform/expression/transform_boolean_test.cpp +1 -1
- package/src/duckdb/src/parser/transform/helpers/transform_typename.cpp +89 -87
- package/src/duckdb/src/parser/transform/statement/transform_pivot_stmt.cpp +2 -2
- package/src/duckdb/src/planner/binder/expression/bind_macro_expression.cpp +4 -9
- package/src/duckdb/src/planner/binder/query_node/bind_select_node.cpp +4 -0
- package/src/duckdb/src/planner/binder/query_node/plan_setop.cpp +2 -2
- package/src/duckdb/src/planner/binder/statement/bind_create_table.cpp +4 -1
- package/src/duckdb/src/planner/binder/statement/bind_export.cpp +4 -3
- package/src/duckdb/src/planner/expression_binder/order_binder.cpp +13 -3
- package/src/duckdb/src/planner/expression_binder.cpp +1 -1
- package/src/duckdb/src/planner/operator/logical_export.cpp +28 -0
- package/src/duckdb/src/planner/table_binding.cpp +1 -2
- package/src/duckdb/src/planner/table_filter.cpp +6 -2
- package/src/duckdb/src/storage/buffer/buffer_pool.cpp +2 -1
- package/src/duckdb/src/storage/checkpoint_manager.cpp +1 -1
- package/src/duckdb/src/storage/compression/bitpacking.cpp +7 -3
- package/src/duckdb/src/storage/compression/dictionary_compression.cpp +1 -1
- package/src/duckdb/src/storage/metadata/metadata_manager.cpp +2 -2
- package/src/duckdb/src/storage/serialization/serialize_logical_operator.cpp +16 -0
- package/src/duckdb/src/storage/serialization/serialize_nodes.cpp +29 -0
- package/src/duckdb/src/storage/serialization/serialize_parse_info.cpp +15 -0
- package/src/duckdb/src/storage/single_file_block_manager.cpp +2 -1
- package/src/duckdb/src/storage/statistics/distinct_statistics.cpp +3 -5
- package/src/duckdb/src/storage/storage_info.cpp +4 -4
- package/src/duckdb/src/storage/table/row_group_collection.cpp +1 -1
- package/src/duckdb/src/storage/table/row_version_manager.cpp +5 -1
- package/src/duckdb/src/storage/temporary_file_manager.cpp +1 -1
- package/src/duckdb/src/transaction/duck_transaction.cpp +15 -14
- package/src/duckdb/third_party/brotli/common/brotli_platform.h +1 -1
- package/src/duckdb/third_party/brotli/dec/decode.cpp +1 -1
- package/src/duckdb/third_party/brotli/enc/memory.cpp +4 -4
- package/src/duckdb/third_party/fsst/libfsst.cpp +1 -1
- package/src/duckdb/third_party/hyperloglog/sds.cpp +1 -1
- package/src/duckdb/third_party/hyperloglog/sds.hpp +1 -1
- package/src/duckdb/third_party/libpg_query/include/common/keywords.hpp +1 -1
- package/src/duckdb/third_party/libpg_query/include/datatype/timestamp.hpp +1 -1
- package/src/duckdb/third_party/libpg_query/include/mb/pg_wchar.hpp +1 -1
- package/src/duckdb/third_party/libpg_query/include/nodes/bitmapset.hpp +1 -1
- package/src/duckdb/third_party/libpg_query/include/nodes/lockoptions.hpp +1 -1
- package/src/duckdb/third_party/libpg_query/include/nodes/makefuncs.hpp +1 -1
- package/src/duckdb/third_party/libpg_query/include/nodes/pg_list.hpp +1 -1
- package/src/duckdb/third_party/libpg_query/include/nodes/value.hpp +1 -1
- package/src/duckdb/third_party/libpg_query/include/parser/gramparse.hpp +1 -1
- package/src/duckdb/third_party/libpg_query/include/parser/parser.hpp +1 -1
- package/src/duckdb/third_party/libpg_query/include/parser/scanner.hpp +1 -1
- package/src/duckdb/third_party/libpg_query/include/parser/scansup.hpp +1 -1
- package/src/duckdb/third_party/libpg_query/include/pg_functions.hpp +1 -1
- package/src/duckdb/third_party/libpg_query/pg_functions.cpp +1 -1
- package/src/duckdb/third_party/libpg_query/src_backend_nodes_list.cpp +1 -1
- package/src/duckdb/third_party/libpg_query/src_backend_nodes_makefuncs.cpp +1 -1
- package/src/duckdb/third_party/libpg_query/src_backend_nodes_value.cpp +1 -1
- package/src/duckdb/third_party/libpg_query/src_backend_parser_gram.cpp +1964 -1964
- package/src/duckdb/third_party/libpg_query/src_backend_parser_parser.cpp +1 -1
- package/src/duckdb/third_party/libpg_query/src_backend_parser_scansup.cpp +1 -1
- package/src/duckdb/third_party/libpg_query/src_common_keywords.cpp +1 -1
- package/src/duckdb/third_party/lz4/lz4.cpp +1 -1
- package/src/duckdb/third_party/mbedtls/include/des_alt.h +1 -1
- package/src/duckdb/third_party/mbedtls/include/mbedtls/aes_alt.h +1 -1
- package/src/duckdb/third_party/mbedtls/include/mbedtls/aria_alt.h +1 -1
- package/src/duckdb/third_party/mbedtls/include/mbedtls/asn1write.h +1 -1
- package/src/duckdb/third_party/mbedtls/include/mbedtls/camellia_alt.h +1 -1
- package/src/duckdb/third_party/mbedtls/include/mbedtls/ccm_alt.h +1 -1
- package/src/duckdb/third_party/mbedtls/include/mbedtls/chacha20.h +1 -1
- package/src/duckdb/third_party/mbedtls/include/mbedtls/chachapoly.h +1 -1
- package/src/duckdb/third_party/mbedtls/include/mbedtls/cmac.h +1 -1
- package/src/duckdb/third_party/mbedtls/include/mbedtls/config_psa.h +1 -1
- package/src/duckdb/third_party/mbedtls/include/mbedtls/ecdsa.h +1 -1
- package/src/duckdb/third_party/mbedtls/include/mbedtls/ecp.h +1 -1
- package/src/duckdb/third_party/mbedtls/include/mbedtls/gcm_alt.h +1 -1
- package/src/duckdb/third_party/mbedtls/include/mbedtls/md5.h +1 -1
- package/src/duckdb/third_party/mbedtls/include/mbedtls/nist_kw.h +1 -1
- package/src/duckdb/third_party/mbedtls/include/mbedtls/pkcs12.h +1 -1
- package/src/duckdb/third_party/mbedtls/include/mbedtls/pkcs5.h +1 -1
- package/src/duckdb/third_party/mbedtls/include/mbedtls/psa_util.h +1 -1
- package/src/duckdb/third_party/mbedtls/include/mbedtls/ripemd160.h +1 -1
- package/src/duckdb/third_party/mbedtls/include/mbedtls/threading.h +1 -1
- package/src/duckdb/third_party/mbedtls/include/mbedtls/timing.h +1 -1
- package/src/duckdb/third_party/mbedtls/include/platform_alt.h +1 -1
- package/src/duckdb/third_party/mbedtls/include/psa/crypto.h +1 -1
- package/src/duckdb/third_party/mbedtls/include/rsa_alt.h +1 -1
- package/src/duckdb/third_party/mbedtls/include/sha1_alt.h +1 -1
- package/src/duckdb/third_party/mbedtls/include/sha256_alt.h +1 -1
- package/src/duckdb/third_party/mbedtls/include/sha512_alt.h +1 -1
- package/src/duckdb/third_party/mbedtls/include/ssl_misc.h +1 -1
- package/src/duckdb/third_party/mbedtls/library/aesni.h +1 -1
- package/src/duckdb/third_party/mbedtls/library/padlock.h +1 -1
- package/src/duckdb/third_party/miniz/miniz.cpp +1 -1
- package/src/duckdb/third_party/parquet/parquet_types.cpp +1 -1
- package/src/duckdb/third_party/parquet/windows_compatibility.h +1 -1
- package/src/duckdb/third_party/pcg/pcg_extras.hpp +1 -1
- package/src/duckdb/third_party/pcg/pcg_uint128.hpp +1 -1
- package/src/duckdb/third_party/skiplist/Node.h +4 -4
- package/src/duckdb/third_party/snappy/snappy.cc +1 -1
- package/src/duckdb/third_party/snappy/snappy_version.hpp +1 -1
- package/src/duckdb/third_party/thrift/thrift/thrift-config.h +1 -1
- package/src/duckdb/third_party/zstd/decompress/zstd_decompress_block.cpp +1 -1
- package/src/duckdb/third_party/zstd/include/zstd_static.h +1 -1
- package/src/duckdb/ub_src_execution_index_art.cpp +2 -0
- package/src/duckdb/ub_src_parser_parsed_data.cpp +2 -0
- package/src/duckdb/ub_src_planner_operator.cpp +2 -0
@@ -4,6 +4,7 @@
|
|
4
4
|
#include "duckdb/common/string_util.hpp"
|
5
5
|
#include "duckdb/common/enum_util.hpp"
|
6
6
|
#include "duckdb/common/multi_file_reader.hpp"
|
7
|
+
#include "duckdb/common/set.hpp"
|
7
8
|
|
8
9
|
namespace duckdb {
|
9
10
|
|
@@ -404,7 +405,7 @@ string CSVReaderOptions::ToString(const string ¤t_file_path) const {
|
|
404
405
|
auto &skip_rows = dialect_options.skip_rows;
|
405
406
|
|
406
407
|
auto &header = dialect_options.header;
|
407
|
-
string error = " file=" + current_file_path + "\n ";
|
408
|
+
string error = " file = " + current_file_path + "\n ";
|
408
409
|
// Let's first print options that can either be set by the user or by the sniffer
|
409
410
|
// delimiter
|
410
411
|
error += FormatOptionLine("delimiter", delimiter);
|
@@ -427,13 +428,13 @@ string CSVReaderOptions::ToString(const string ¤t_file_path) const {
|
|
427
428
|
|
428
429
|
// Now we do options that can only be set by the user, that might hold some general significance
|
429
430
|
// null padding
|
430
|
-
error += "null_padding=" + std::to_string(null_padding) + "\n ";
|
431
|
+
error += "null_padding = " + std::to_string(null_padding) + "\n ";
|
431
432
|
// sample_size
|
432
|
-
error += "sample_size=" + std::to_string(sample_size_chunks * STANDARD_VECTOR_SIZE) + "\n ";
|
433
|
+
error += "sample_size = " + std::to_string(sample_size_chunks * STANDARD_VECTOR_SIZE) + "\n ";
|
433
434
|
// ignore_errors
|
434
|
-
error += "ignore_errors=" + ignore_errors.FormatValue() + "\n ";
|
435
|
+
error += "ignore_errors = " + ignore_errors.FormatValue() + "\n ";
|
435
436
|
// all_varchar
|
436
|
-
error += "all_varchar=" + std::to_string(all_varchar) + "\n";
|
437
|
+
error += "all_varchar = " + std::to_string(all_varchar) + "\n";
|
437
438
|
|
438
439
|
// Add information regarding sniffer mismatches (if any)
|
439
440
|
error += sniffer_user_mismatch_error;
|
@@ -452,15 +453,15 @@ static Value StringVectorToValue(const vector<string> &vec) {
|
|
452
453
|
static uint8_t GetCandidateSpecificity(const LogicalType &candidate_type) {
|
453
454
|
//! Const ht with accepted auto_types and their weights in specificity
|
454
455
|
const duckdb::unordered_map<uint8_t, uint8_t> auto_type_candidates_specificity {
|
455
|
-
{(
|
456
|
-
{(
|
457
|
-
{(
|
458
|
-
{(
|
459
|
-
{(
|
460
|
-
{(
|
461
|
-
{(
|
462
|
-
|
463
|
-
auto id = (
|
456
|
+
{static_cast<uint8_t>(LogicalTypeId::VARCHAR), 0}, {static_cast<uint8_t>(LogicalTypeId::DOUBLE), 1},
|
457
|
+
{static_cast<uint8_t>(LogicalTypeId::FLOAT), 2}, {static_cast<uint8_t>(LogicalTypeId::DECIMAL), 3},
|
458
|
+
{static_cast<uint8_t>(LogicalTypeId::BIGINT), 4}, {static_cast<uint8_t>(LogicalTypeId::INTEGER), 5},
|
459
|
+
{static_cast<uint8_t>(LogicalTypeId::SMALLINT), 6}, {static_cast<uint8_t>(LogicalTypeId::TINYINT), 7},
|
460
|
+
{static_cast<uint8_t>(LogicalTypeId::TIMESTAMP), 8}, {static_cast<uint8_t>(LogicalTypeId::DATE), 9},
|
461
|
+
{static_cast<uint8_t>(LogicalTypeId::TIME), 10}, {static_cast<uint8_t>(LogicalTypeId::BOOLEAN), 11},
|
462
|
+
{static_cast<uint8_t>(LogicalTypeId::SQLNULL), 12}};
|
463
|
+
|
464
|
+
auto id = static_cast<uint8_t>(candidate_type.id());
|
464
465
|
auto it = auto_type_candidates_specificity.find(id);
|
465
466
|
if (it == auto_type_candidates_specificity.end()) {
|
466
467
|
throw BinderException("Auto Type Candidate of type %s is not accepted as a valid input",
|
@@ -468,7 +469,7 @@ static uint8_t GetCandidateSpecificity(const LogicalType &candidate_type) {
|
|
468
469
|
}
|
469
470
|
return it->second;
|
470
471
|
}
|
471
|
-
bool StoreUserDefinedParameter(string &option) {
|
472
|
+
bool StoreUserDefinedParameter(const string &option) {
|
472
473
|
if (option == "column_types" || option == "types" || option == "dtypes" || option == "auto_detect" ||
|
473
474
|
option == "auto_type_candidates" || option == "columns" || option == "names") {
|
474
475
|
// We don't store options related to types, names and auto-detection since these are either irrelevant to our
|
@@ -477,20 +478,49 @@ bool StoreUserDefinedParameter(string &option) {
|
|
477
478
|
}
|
478
479
|
return true;
|
479
480
|
}
|
480
|
-
|
481
|
+
|
482
|
+
void CSVReaderOptions::Verify() {
|
483
|
+
if (rejects_table_name.IsSetByUser() && !store_rejects.GetValue() && store_rejects.IsSetByUser()) {
|
484
|
+
throw BinderException("REJECTS_TABLE option is only supported when store_rejects is not manually set to false");
|
485
|
+
}
|
486
|
+
if (rejects_scan_name.IsSetByUser() && !store_rejects.GetValue() && store_rejects.IsSetByUser()) {
|
487
|
+
throw BinderException("REJECTS_SCAN option is only supported when store_rejects is not manually set to false");
|
488
|
+
}
|
489
|
+
if (rejects_scan_name.IsSetByUser() || rejects_table_name.IsSetByUser()) {
|
490
|
+
// Ensure we set store_rejects to true automagically
|
491
|
+
store_rejects.Set(true, false);
|
492
|
+
}
|
493
|
+
// Validate rejects_table options
|
494
|
+
if (store_rejects.GetValue()) {
|
495
|
+
if (!ignore_errors.GetValue() && ignore_errors.IsSetByUser()) {
|
496
|
+
throw BinderException(
|
497
|
+
"STORE_REJECTS option is only supported when IGNORE_ERRORS is not manually set to false");
|
498
|
+
}
|
499
|
+
// Ensure we set ignore errors to true automagically
|
500
|
+
ignore_errors.Set(true, false);
|
501
|
+
if (file_options.union_by_name) {
|
502
|
+
throw BinderException("REJECTS_TABLE option is not supported when UNION_BY_NAME is set to true");
|
503
|
+
}
|
504
|
+
}
|
505
|
+
if (rejects_limit != 0 && !store_rejects.GetValue()) {
|
506
|
+
throw BinderException("REJECTS_LIMIT option is only supported when REJECTS_TABLE is set to a table name");
|
507
|
+
}
|
508
|
+
}
|
509
|
+
|
510
|
+
void CSVReaderOptions::FromNamedParameters(const named_parameter_map_t &in, ClientContext &context) {
|
481
511
|
map<string, string> ordered_user_defined_parameters;
|
482
512
|
for (auto &kv : in) {
|
483
513
|
if (MultiFileReader().ParseOption(kv.first, kv.second, file_options, context)) {
|
484
514
|
continue;
|
485
515
|
}
|
486
516
|
auto loption = StringUtil::Lower(kv.first);
|
487
|
-
// skip variables that are specific to auto
|
517
|
+
// skip variables that are specific to auto-detection
|
488
518
|
if (StoreUserDefinedParameter(loption)) {
|
489
519
|
ordered_user_defined_parameters[loption] = kv.second.ToSQLString();
|
490
520
|
}
|
491
521
|
if (loption == "columns") {
|
492
522
|
if (!name_list.empty()) {
|
493
|
-
throw BinderException("
|
523
|
+
throw BinderException("read_csv column_names/names can only be supplied once");
|
494
524
|
}
|
495
525
|
columns_set = true;
|
496
526
|
auto &child_type = kv.second.type();
|
@@ -539,23 +569,40 @@ void CSVReaderOptions::FromNamedParameters(named_parameter_map_t &in, ClientCont
|
|
539
569
|
auto_type_candidates.emplace_back(candidate_type.second);
|
540
570
|
}
|
541
571
|
} else if (loption == "column_names" || loption == "names") {
|
572
|
+
unordered_set<string> column_names;
|
542
573
|
if (!name_list.empty()) {
|
543
|
-
throw BinderException("
|
574
|
+
throw BinderException("read_csv column_names/names can only be supplied once");
|
544
575
|
}
|
545
576
|
if (kv.second.IsNull()) {
|
546
|
-
throw BinderException("
|
577
|
+
throw BinderException("read_csv %s cannot be NULL", kv.first);
|
547
578
|
}
|
548
579
|
auto &children = ListValue::GetChildren(kv.second);
|
549
580
|
for (auto &child : children) {
|
550
581
|
name_list.push_back(StringValue::Get(child));
|
551
582
|
}
|
583
|
+
for (auto &name : name_list) {
|
584
|
+
bool empty = true;
|
585
|
+
for (auto &c : name) {
|
586
|
+
if (!StringUtil::CharacterIsSpace(c)) {
|
587
|
+
empty = false;
|
588
|
+
break;
|
589
|
+
}
|
590
|
+
}
|
591
|
+
if (empty) {
|
592
|
+
throw BinderException("read_csv %s cannot have empty (or all whitespace) value", kv.first);
|
593
|
+
}
|
594
|
+
if (column_names.find(name) != column_names.end()) {
|
595
|
+
throw BinderException("read_csv %s must have unique values. \"%s\" is repeated.", kv.first, name);
|
596
|
+
}
|
597
|
+
column_names.insert(name);
|
598
|
+
}
|
552
599
|
} else if (loption == "column_types" || loption == "types" || loption == "dtypes") {
|
553
600
|
auto &child_type = kv.second.type();
|
554
601
|
if (child_type.id() != LogicalTypeId::STRUCT && child_type.id() != LogicalTypeId::LIST) {
|
555
|
-
throw BinderException("
|
602
|
+
throw BinderException("read_csv %s requires a struct or list as input", kv.first);
|
556
603
|
}
|
557
604
|
if (!sql_type_list.empty()) {
|
558
|
-
throw BinderException("
|
605
|
+
throw BinderException("read_csv column_types/types/dtypes can only be supplied once");
|
559
606
|
}
|
560
607
|
vector<string> sql_type_names;
|
561
608
|
if (child_type.id() == LogicalTypeId::STRUCT) {
|
@@ -565,7 +612,7 @@ void CSVReaderOptions::FromNamedParameters(named_parameter_map_t &in, ClientCont
|
|
565
612
|
auto &name = StructType::GetChildName(child_type, i);
|
566
613
|
auto &val = struct_children[i];
|
567
614
|
if (val.type().id() != LogicalTypeId::VARCHAR) {
|
568
|
-
throw BinderException("
|
615
|
+
throw BinderException("read_csv %s requires a type specification as string", kv.first);
|
569
616
|
}
|
570
617
|
sql_type_names.push_back(StringValue::Get(val));
|
571
618
|
sql_types_per_column[name] = i;
|
@@ -573,7 +620,7 @@ void CSVReaderOptions::FromNamedParameters(named_parameter_map_t &in, ClientCont
|
|
573
620
|
} else {
|
574
621
|
auto &list_child = ListType::GetChildType(child_type);
|
575
622
|
if (list_child.id() != LogicalTypeId::VARCHAR) {
|
576
|
-
throw BinderException("
|
623
|
+
throw BinderException("read_csv %s requires a list of types (varchar) as input", kv.first);
|
577
624
|
}
|
578
625
|
auto &children = ListValue::GetChildren(kv.second);
|
579
626
|
for (auto &child : children) {
|
@@ -584,8 +631,7 @@ void CSVReaderOptions::FromNamedParameters(named_parameter_map_t &in, ClientCont
|
|
584
631
|
for (auto &sql_type : sql_type_names) {
|
585
632
|
auto def_type = TransformStringToLogicalType(sql_type, context);
|
586
633
|
if (def_type.id() == LogicalTypeId::USER) {
|
587
|
-
throw BinderException("Unrecognized type \"%s\" for
|
588
|
-
kv.first);
|
634
|
+
throw BinderException("Unrecognized type \"%s\" for read_csv %s definition", sql_type, kv.first);
|
589
635
|
}
|
590
636
|
sql_type_list.push_back(std::move(def_type));
|
591
637
|
}
|
@@ -606,7 +652,7 @@ void CSVReaderOptions::FromNamedParameters(named_parameter_map_t &in, ClientCont
|
|
606
652
|
}
|
607
653
|
|
608
654
|
//! This function is used to remember options set by the sniffer, for use in ReadCSVRelation
|
609
|
-
void CSVReaderOptions::ToNamedParameters(named_parameter_map_t &named_params) {
|
655
|
+
void CSVReaderOptions::ToNamedParameters(named_parameter_map_t &named_params) const {
|
610
656
|
auto &delimiter = dialect_options.state_machine_options.delimiter;
|
611
657
|
auto "e = dialect_options.state_machine_options.quote;
|
612
658
|
auto &escape = dialect_options.state_machine_options.escape;
|
@@ -59,7 +59,7 @@ unique_ptr<LocalSinkState> PhysicalBufferedCollector::GetLocalSinkState(Executio
|
|
59
59
|
unique_ptr<QueryResult> PhysicalBufferedCollector::GetResult(GlobalSinkState &state) {
|
60
60
|
auto &gstate = state.Cast<BufferedCollectorGlobalState>();
|
61
61
|
lock_guard<mutex> l(gstate.glock);
|
62
|
-
// FIXME: maybe we want to check if the execution was
|
62
|
+
// FIXME: maybe we want to check if the execution was successful before creating the StreamQueryResult ?
|
63
63
|
auto cc = gstate.context.lock();
|
64
64
|
auto result = make_uniq<StreamQueryResult>(statement_type, properties, types, names, cc->GetClientProperties(),
|
65
65
|
gstate.buffered_data);
|