duckdb 1.1.2-dev2.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/binding.gyp +4 -2
- 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
@@ -145,7 +145,7 @@ string PragmaImportDatabase(ClientContext &context, const FunctionParameters &pa
|
|
145
145
|
auto &fs = FileSystem::GetFileSystem(context);
|
146
146
|
|
147
147
|
string final_query;
|
148
|
-
// read the "
|
148
|
+
// read the "schema.sql" and "load.sql" files
|
149
149
|
vector<string> files = {"schema.sql", "load.sql"};
|
150
150
|
for (auto &file : files) {
|
151
151
|
auto file_path = fs.JoinPath(parameters.values[0].ToString(), file);
|
@@ -1185,8 +1185,7 @@ bool StrpTimeFormat::Parse(const char *data, size_t size, ParseResult &result, b
|
|
1185
1185
|
case StrTimeSpecifier::YEAR_WITHOUT_CENTURY_PADDED:
|
1186
1186
|
case StrTimeSpecifier::YEAR_WITHOUT_CENTURY:
|
1187
1187
|
case StrTimeSpecifier::YEAR_DECIMAL:
|
1188
|
-
//
|
1189
|
-
break;
|
1188
|
+
// Switch to offset parsing
|
1190
1189
|
case StrTimeSpecifier::WEEKDAY_DECIMAL:
|
1191
1190
|
// First offset specifier
|
1192
1191
|
offset_specifier = specifiers[i];
|
@@ -45,7 +45,7 @@ static void StringConcatFunction(DataChunk &args, ExpressionState &state, Vector
|
|
45
45
|
vector<idx_t> result_lengths(args.size(), 0);
|
46
46
|
for (idx_t col_idx = 0; col_idx < args.ColumnCount(); col_idx++) {
|
47
47
|
auto &input = args.data[col_idx];
|
48
|
-
D_ASSERT(input.GetType().
|
48
|
+
D_ASSERT(input.GetType().InternalType() == PhysicalType::VARCHAR);
|
49
49
|
if (input.GetVectorType() == VectorType::CONSTANT_VECTOR) {
|
50
50
|
if (ConstantVector::IsNull(input)) {
|
51
51
|
// constant null, skip
|
@@ -143,68 +143,60 @@ static void ConcatOperator(DataChunk &args, ExpressionState &state, Vector &resu
|
|
143
143
|
});
|
144
144
|
}
|
145
145
|
|
146
|
+
struct ListConcatInputData {
|
147
|
+
ListConcatInputData(Vector &input, Vector &child_vec) : input(input), child_vec(child_vec) {
|
148
|
+
}
|
149
|
+
|
150
|
+
UnifiedVectorFormat vdata;
|
151
|
+
Vector &input;
|
152
|
+
Vector &child_vec;
|
153
|
+
UnifiedVectorFormat child_vdata;
|
154
|
+
const list_entry_t *input_entries = nullptr;
|
155
|
+
};
|
156
|
+
|
146
157
|
static void ListConcatFunction(DataChunk &args, ExpressionState &state, Vector &result) {
|
147
|
-
D_ASSERT(args.ColumnCount() == 2);
|
148
158
|
auto count = args.size();
|
149
159
|
|
150
|
-
Vector &lhs = args.data[0];
|
151
|
-
Vector &rhs = args.data[1];
|
152
|
-
if (lhs.GetType().id() == LogicalTypeId::SQLNULL) {
|
153
|
-
result.Reference(rhs);
|
154
|
-
return;
|
155
|
-
}
|
156
|
-
if (rhs.GetType().id() == LogicalTypeId::SQLNULL) {
|
157
|
-
result.Reference(lhs);
|
158
|
-
return;
|
159
|
-
}
|
160
|
-
|
161
|
-
UnifiedVectorFormat lhs_data;
|
162
|
-
UnifiedVectorFormat rhs_data;
|
163
|
-
lhs.ToUnifiedFormat(count, lhs_data);
|
164
|
-
rhs.ToUnifiedFormat(count, rhs_data);
|
165
|
-
auto lhs_entries = UnifiedVectorFormat::GetData<list_entry_t>(lhs_data);
|
166
|
-
auto rhs_entries = UnifiedVectorFormat::GetData<list_entry_t>(rhs_data);
|
167
|
-
|
168
|
-
auto lhs_list_size = ListVector::GetListSize(lhs);
|
169
|
-
auto rhs_list_size = ListVector::GetListSize(rhs);
|
170
|
-
auto &lhs_child = ListVector::GetEntry(lhs);
|
171
|
-
auto &rhs_child = ListVector::GetEntry(rhs);
|
172
|
-
UnifiedVectorFormat lhs_child_data;
|
173
|
-
UnifiedVectorFormat rhs_child_data;
|
174
|
-
lhs_child.ToUnifiedFormat(lhs_list_size, lhs_child_data);
|
175
|
-
rhs_child.ToUnifiedFormat(rhs_list_size, rhs_child_data);
|
176
|
-
|
177
|
-
result.SetVectorType(VectorType::FLAT_VECTOR);
|
178
160
|
auto result_entries = FlatVector::GetData<list_entry_t>(result);
|
179
|
-
|
161
|
+
vector<ListConcatInputData> input_data;
|
162
|
+
for (auto &input : args.data) {
|
163
|
+
if (input.GetType().id() == LogicalTypeId::SQLNULL) {
|
164
|
+
// ignore NULL values
|
165
|
+
continue;
|
166
|
+
}
|
167
|
+
|
168
|
+
auto &child_vec = ListVector::GetEntry(input);
|
169
|
+
ListConcatInputData data(input, child_vec);
|
170
|
+
input.ToUnifiedFormat(count, data.vdata);
|
171
|
+
|
172
|
+
data.input_entries = UnifiedVectorFormat::GetData<list_entry_t>(data.vdata);
|
173
|
+
auto list_size = ListVector::GetListSize(input);
|
174
|
+
|
175
|
+
child_vec.ToUnifiedFormat(list_size, data.child_vdata);
|
176
|
+
|
177
|
+
input_data.push_back(std::move(data));
|
178
|
+
}
|
180
179
|
|
181
180
|
idx_t offset = 0;
|
182
181
|
for (idx_t i = 0; i < count; i++) {
|
183
|
-
auto
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
lhs_entry.offset);
|
196
|
-
}
|
197
|
-
if (rhs_data.validity.RowIsValid(rhs_list_index)) {
|
198
|
-
const auto &rhs_entry = rhs_entries[rhs_list_index];
|
199
|
-
result_entries[i].length += rhs_entry.length;
|
200
|
-
ListVector::Append(result, rhs_child, *rhs_child_data.sel, rhs_entry.offset + rhs_entry.length,
|
201
|
-
rhs_entry.offset);
|
182
|
+
auto &result_entry = result_entries[i];
|
183
|
+
result_entry.offset = offset;
|
184
|
+
result_entry.length = 0;
|
185
|
+
for (auto &data : input_data) {
|
186
|
+
auto list_index = data.vdata.sel->get_index(i);
|
187
|
+
if (!data.vdata.validity.RowIsValid(list_index)) {
|
188
|
+
continue;
|
189
|
+
}
|
190
|
+
const auto &list_entry = data.input_entries[list_index];
|
191
|
+
result_entry.length += list_entry.length;
|
192
|
+
ListVector::Append(result, data.child_vec, *data.child_vdata.sel, list_entry.offset + list_entry.length,
|
193
|
+
list_entry.offset);
|
202
194
|
}
|
203
|
-
offset +=
|
195
|
+
offset += result_entry.length;
|
204
196
|
}
|
205
|
-
|
197
|
+
ListVector::SetListSize(result, offset);
|
206
198
|
|
207
|
-
if (
|
199
|
+
if (args.AllConstant()) {
|
208
200
|
result.SetVectorType(VectorType::CONSTANT_VECTOR);
|
209
201
|
}
|
210
202
|
}
|
@@ -235,128 +227,103 @@ static void SetArgumentType(ScalarFunction &bound_function, const LogicalType &t
|
|
235
227
|
bound_function.return_type = type;
|
236
228
|
}
|
237
229
|
|
238
|
-
static
|
239
|
-
|
240
|
-
arguments[1]->return_type.id() != LogicalTypeId::SQLNULL) {
|
241
|
-
throw BinderException("Cannot concatenate types %s and %s", arguments[0]->return_type.ToString(),
|
242
|
-
arguments[1]->return_type.ToString());
|
243
|
-
}
|
244
|
-
|
245
|
-
// if either argument is an array, we cast it to a list
|
246
|
-
arguments[0] = BoundCastExpression::AddArrayCastToList(context, std::move(arguments[0]));
|
247
|
-
arguments[1] = BoundCastExpression::AddArrayCastToList(context, std::move(arguments[1]));
|
248
|
-
}
|
249
|
-
|
250
|
-
static unique_ptr<FunctionData> HandleListBinding(ClientContext &context, ScalarFunction &bound_function,
|
251
|
-
vector<unique_ptr<Expression>> &arguments, bool is_operator) {
|
252
|
-
// list_concat only accepts two arguments
|
253
|
-
D_ASSERT(arguments.size() == 2);
|
254
|
-
|
255
|
-
auto &lhs = arguments[0]->return_type;
|
256
|
-
auto &rhs = arguments[1]->return_type;
|
257
|
-
|
258
|
-
if (lhs.id() == LogicalTypeId::UNKNOWN || rhs.id() == LogicalTypeId::UNKNOWN) {
|
259
|
-
throw ParameterNotResolvedException();
|
260
|
-
} else if (lhs.id() == LogicalTypeId::SQLNULL || rhs.id() == LogicalTypeId::SQLNULL) {
|
261
|
-
// we mimic postgres behaviour: list_concat(NULL, my_list) = my_list
|
262
|
-
auto return_type = rhs.id() == LogicalTypeId::SQLNULL ? lhs : rhs;
|
263
|
-
SetArgumentType(bound_function, return_type, is_operator);
|
264
|
-
return make_uniq<ConcatFunctionData>(bound_function.return_type, is_operator);
|
265
|
-
}
|
266
|
-
if (lhs.id() != LogicalTypeId::LIST || rhs.id() != LogicalTypeId::LIST) {
|
267
|
-
throw BinderException("Cannot concatenate types %s and %s", lhs.ToString(), rhs.ToString());
|
268
|
-
}
|
269
|
-
|
270
|
-
// Resolve list type
|
230
|
+
static unique_ptr<FunctionData> BindListConcat(ClientContext &context, ScalarFunction &bound_function,
|
231
|
+
vector<unique_ptr<Expression>> &arguments, bool is_operator) {
|
271
232
|
LogicalType child_type = LogicalType::SQLNULL;
|
272
|
-
|
273
|
-
|
233
|
+
bool all_null = true;
|
234
|
+
for (auto &arg : arguments) {
|
235
|
+
auto &return_type = arg->return_type;
|
236
|
+
if (return_type == LogicalTypeId::SQLNULL) {
|
237
|
+
// we mimic postgres behaviour: list_concat(NULL, my_list) = my_list
|
238
|
+
continue;
|
239
|
+
}
|
240
|
+
all_null = false;
|
241
|
+
LogicalType next_type = LogicalTypeId::INVALID;
|
242
|
+
switch (return_type.id()) {
|
243
|
+
case LogicalTypeId::UNKNOWN:
|
244
|
+
throw ParameterNotResolvedException();
|
245
|
+
case LogicalTypeId::LIST:
|
246
|
+
next_type = ListType::GetChildType(return_type);
|
247
|
+
break;
|
248
|
+
case LogicalTypeId::ARRAY:
|
249
|
+
next_type = ArrayType::GetChildType(return_type);
|
250
|
+
break;
|
251
|
+
default: {
|
252
|
+
string type_list;
|
253
|
+
for (idx_t arg_idx = 0; arg_idx < arguments.size(); arg_idx++) {
|
254
|
+
if (!type_list.empty()) {
|
255
|
+
if (arg_idx + 1 == arguments.size()) {
|
256
|
+
// last argument
|
257
|
+
type_list += " and ";
|
258
|
+
} else {
|
259
|
+
type_list += ", ";
|
260
|
+
}
|
261
|
+
}
|
262
|
+
type_list += arguments[arg_idx]->return_type.ToString();
|
263
|
+
}
|
264
|
+
throw BinderException(*arg, "Cannot concatenate types %s - an explicit cast is required", type_list);
|
265
|
+
}
|
266
|
+
}
|
274
267
|
if (!LogicalType::TryGetMaxLogicalType(context, child_type, next_type, child_type)) {
|
275
|
-
throw BinderException(
|
268
|
+
throw BinderException(*arg,
|
269
|
+
"Cannot concatenate lists of types %s[] and %s[] - an explicit cast is required",
|
276
270
|
child_type.ToString(), next_type.ToString());
|
277
271
|
}
|
278
272
|
}
|
273
|
+
if (all_null) {
|
274
|
+
// all arguments are NULL
|
275
|
+
SetArgumentType(bound_function, LogicalTypeId::SQLNULL, is_operator);
|
276
|
+
return make_uniq<ConcatFunctionData>(bound_function.return_type, is_operator);
|
277
|
+
}
|
279
278
|
auto list_type = LogicalType::LIST(child_type);
|
280
279
|
|
281
280
|
SetArgumentType(bound_function, list_type, is_operator);
|
282
281
|
return make_uniq<ConcatFunctionData>(bound_function.return_type, is_operator);
|
283
282
|
}
|
284
283
|
|
285
|
-
static
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
284
|
+
static unique_ptr<FunctionData> BindConcatFunctionInternal(ClientContext &context, ScalarFunction &bound_function,
|
285
|
+
vector<unique_ptr<Expression>> &arguments,
|
286
|
+
bool is_operator) {
|
287
|
+
bool list_concat = false;
|
288
|
+
// blob concat is only supported for the concat operator - regular concat converts to varchar
|
289
|
+
bool all_blob = is_operator ? true : false;
|
290
|
+
for (auto &arg : arguments) {
|
291
|
+
if (arg->return_type.id() == LogicalTypeId::UNKNOWN) {
|
292
|
+
throw ParameterNotResolvedException();
|
293
|
+
}
|
294
|
+
if (arg->return_type.id() == LogicalTypeId::LIST || arg->return_type.id() == LogicalTypeId::ARRAY) {
|
295
|
+
list_concat = true;
|
296
|
+
}
|
297
|
+
if (arg->return_type.id() != LogicalTypeId::BLOB) {
|
298
|
+
all_blob = false;
|
299
|
+
}
|
291
300
|
}
|
301
|
+
if (list_concat) {
|
302
|
+
return BindListConcat(context, bound_function, arguments, is_operator);
|
303
|
+
}
|
304
|
+
auto return_type = all_blob ? LogicalType::BLOB : LogicalType::VARCHAR;
|
305
|
+
|
306
|
+
// we can now assume that the input is a string or castable to a string
|
307
|
+
SetArgumentType(bound_function, return_type, is_operator);
|
308
|
+
return make_uniq<ConcatFunctionData>(bound_function.return_type, is_operator);
|
292
309
|
}
|
293
310
|
|
294
311
|
static unique_ptr<FunctionData> BindConcatFunction(ClientContext &context, ScalarFunction &bound_function,
|
295
312
|
vector<unique_ptr<Expression>> &arguments) {
|
296
|
-
|
297
|
-
LogicalTypeId second_arg;
|
298
|
-
FindFirstTwoArguments(arguments, first_arg, second_arg);
|
299
|
-
|
300
|
-
if (arguments.size() > 2 && (first_arg == LogicalTypeId::ARRAY || first_arg == LogicalTypeId::LIST)) {
|
301
|
-
throw BinderException("list_concat only accepts two arguments");
|
302
|
-
}
|
303
|
-
|
304
|
-
if (first_arg == LogicalTypeId::ARRAY || second_arg == LogicalTypeId::ARRAY) {
|
305
|
-
HandleArrayBinding(context, arguments);
|
306
|
-
FindFirstTwoArguments(arguments, first_arg, second_arg);
|
307
|
-
}
|
308
|
-
|
309
|
-
if (first_arg == LogicalTypeId::LIST || second_arg == LogicalTypeId::LIST) {
|
310
|
-
return HandleListBinding(context, bound_function, arguments, false);
|
311
|
-
}
|
312
|
-
|
313
|
-
// we can now assume that the input is a string or castable to a string
|
314
|
-
SetArgumentType(bound_function, LogicalType::VARCHAR, false);
|
315
|
-
return make_uniq<ConcatFunctionData>(bound_function.return_type, false);
|
313
|
+
return BindConcatFunctionInternal(context, bound_function, arguments, false);
|
316
314
|
}
|
317
315
|
|
318
316
|
static unique_ptr<FunctionData> BindConcatOperator(ClientContext &context, ScalarFunction &bound_function,
|
319
317
|
vector<unique_ptr<Expression>> &arguments) {
|
320
|
-
|
321
|
-
|
322
|
-
LogicalTypeId lhs;
|
323
|
-
LogicalTypeId rhs;
|
324
|
-
FindFirstTwoArguments(arguments, lhs, rhs);
|
325
|
-
|
326
|
-
if (lhs == LogicalTypeId::UNKNOWN || rhs == LogicalTypeId::UNKNOWN) {
|
327
|
-
throw ParameterNotResolvedException();
|
328
|
-
}
|
329
|
-
if (lhs == LogicalTypeId::ARRAY || rhs == LogicalTypeId::ARRAY) {
|
330
|
-
HandleArrayBinding(context, arguments);
|
331
|
-
FindFirstTwoArguments(arguments, lhs, rhs);
|
332
|
-
}
|
333
|
-
|
334
|
-
if (lhs == LogicalTypeId::LIST || rhs == LogicalTypeId::LIST) {
|
335
|
-
return HandleListBinding(context, bound_function, arguments, true);
|
336
|
-
}
|
337
|
-
|
338
|
-
LogicalType return_type;
|
339
|
-
if (lhs == LogicalTypeId::BLOB && rhs == LogicalTypeId::BLOB) {
|
340
|
-
return_type = LogicalType::BLOB;
|
341
|
-
} else {
|
342
|
-
return_type = LogicalType::VARCHAR;
|
343
|
-
}
|
344
|
-
|
345
|
-
// we can now assume that the input is a string or castable to a string
|
346
|
-
SetArgumentType(bound_function, return_type, true);
|
347
|
-
return make_uniq<ConcatFunctionData>(bound_function.return_type, true);
|
318
|
+
return BindConcatFunctionInternal(context, bound_function, arguments, true);
|
348
319
|
}
|
349
320
|
|
350
321
|
static unique_ptr<BaseStatistics> ListConcatStats(ClientContext &context, FunctionStatisticsInput &input) {
|
351
322
|
auto &child_stats = input.child_stats;
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
auto stats = left_stats.ToUnique();
|
358
|
-
stats->Merge(right_stats);
|
359
|
-
|
323
|
+
auto stats = child_stats[0].ToUnique();
|
324
|
+
for (idx_t i = 1; i < child_stats.size(); i++) {
|
325
|
+
stats->Merge(child_stats[i]);
|
326
|
+
}
|
360
327
|
return stats;
|
361
328
|
}
|
362
329
|
|
@@ -99,6 +99,19 @@ static unique_ptr<ArrowType> GetArrowExtensionType(const ArrowSchemaMetadata &ex
|
|
99
99
|
auto type_info = make_uniq<ArrowStringInfo>(ArrowVariableSizeType::SUPER_SIZE);
|
100
100
|
return make_uniq<ArrowType>(LogicalType::BIT, std::move(type_info));
|
101
101
|
|
102
|
+
} else if (arrow_extension == "duckdb.varint") {
|
103
|
+
if (format != "z" && format != "Z") {
|
104
|
+
std::ostringstream error;
|
105
|
+
error << "duckdb.bit must be a blob (i.e., \'z\'). It is incorrectly defined as:" << format;
|
106
|
+
return make_uniq<ArrowType>(error.str());
|
107
|
+
}
|
108
|
+
unique_ptr<ArrowStringInfo> type_info;
|
109
|
+
if (format == "z") {
|
110
|
+
type_info = make_uniq<ArrowStringInfo>(ArrowVariableSizeType::NORMAL);
|
111
|
+
} else {
|
112
|
+
type_info = make_uniq<ArrowStringInfo>(ArrowVariableSizeType::SUPER_SIZE);
|
113
|
+
}
|
114
|
+
return make_uniq<ArrowType>(LogicalType::VARINT, std::move(type_info));
|
102
115
|
} else {
|
103
116
|
std::ostringstream error;
|
104
117
|
error << "Arrow Type with extension name: " << arrow_extension << " and format: " << format
|
@@ -138,6 +138,12 @@ static ArrowListOffsetData ConvertArrowListOffsetsTemplated(Vector &vector, Arro
|
|
138
138
|
auto &start_offset = result.start_offset;
|
139
139
|
auto &list_size = result.list_size;
|
140
140
|
|
141
|
+
if (size == 0) {
|
142
|
+
start_offset = 0;
|
143
|
+
list_size = 0;
|
144
|
+
return result;
|
145
|
+
}
|
146
|
+
|
141
147
|
idx_t cur_offset = 0;
|
142
148
|
auto offsets = ArrowBufferData<BUFFER_TYPE>(array, 1) + effective_offset;
|
143
149
|
start_offset = offsets[0];
|
@@ -765,14 +771,12 @@ static void ColumnArrowToDuckDB(Vector &vector, ArrowArray &array, ArrowArraySca
|
|
765
771
|
case LogicalTypeId::BOOLEAN: {
|
766
772
|
//! Arrow bit-packs boolean values
|
767
773
|
//! Lets first figure out where we are in the source array
|
768
|
-
auto
|
769
|
-
|
774
|
+
auto effective_offset =
|
775
|
+
GetEffectiveOffset(array, NumericCast<int64_t>(parent_offset), scan_state, nested_offset);
|
776
|
+
auto src_ptr = ArrowBufferData<uint8_t>(array, 1) + effective_offset / 8;
|
770
777
|
auto tgt_ptr = (uint8_t *)FlatVector::GetData(vector);
|
771
778
|
int src_pos = 0;
|
772
|
-
idx_t cur_bit =
|
773
|
-
if (nested_offset != -1) {
|
774
|
-
cur_bit = NumericCast<idx_t>(nested_offset % 8);
|
775
|
-
}
|
779
|
+
idx_t cur_bit = effective_offset % 8;
|
776
780
|
for (idx_t row = 0; row < size; row++) {
|
777
781
|
if ((src_ptr[src_pos] & (1 << cur_bit)) == 0) {
|
778
782
|
tgt_ptr[row] = 0;
|
@@ -1026,7 +1030,8 @@ static void ColumnArrowToDuckDB(Vector &vector, ArrowArray &array, ArrowArraySca
|
|
1026
1030
|
break;
|
1027
1031
|
}
|
1028
1032
|
case LogicalTypeId::BLOB:
|
1029
|
-
case LogicalTypeId::BIT:
|
1033
|
+
case LogicalTypeId::BIT:
|
1034
|
+
case LogicalTypeId::VARINT: {
|
1030
1035
|
ArrowToDuckDBBlob(vector, array, scan_state, size, arrow_type, nested_offset,
|
1031
1036
|
NumericCast<int64_t>(parent_offset));
|
1032
1037
|
break;
|
@@ -7,7 +7,7 @@
|
|
7
7
|
#include "duckdb/common/types/column/column_data_collection.hpp"
|
8
8
|
#include "duckdb/common/types/string_type.hpp"
|
9
9
|
#include "duckdb/common/vector_operations/vector_operations.hpp"
|
10
|
-
#include "duckdb/execution/operator/csv_scanner/csv_sniffer.hpp"
|
10
|
+
#include "duckdb/execution/operator/csv_scanner/sniffer/csv_sniffer.hpp"
|
11
11
|
#include "duckdb/function/copy_function.hpp"
|
12
12
|
#include "duckdb/function/scalar/string_functions.hpp"
|
13
13
|
#include "duckdb/function/table/read_csv.hpp"
|
@@ -8,7 +8,7 @@
|
|
8
8
|
#include "duckdb/common/union_by_name.hpp"
|
9
9
|
#include "duckdb/execution/operator/csv_scanner/global_csv_state.hpp"
|
10
10
|
#include "duckdb/execution/operator/csv_scanner/csv_error.hpp"
|
11
|
-
#include "duckdb/execution/operator/csv_scanner/csv_sniffer.hpp"
|
11
|
+
#include "duckdb/execution/operator/csv_scanner/sniffer/csv_sniffer.hpp"
|
12
12
|
#include "duckdb/execution/operator/persistent/csv_rejects_table.hpp"
|
13
13
|
#include "duckdb/function/function_set.hpp"
|
14
14
|
#include "duckdb/main/client_context.hpp"
|
@@ -52,36 +52,9 @@ static unique_ptr<FunctionData> ReadCSVBind(ClientContext &context, TableFunctio
|
|
52
52
|
auto multi_file_list = multi_file_reader->CreateFileList(context, input.inputs[0]);
|
53
53
|
|
54
54
|
options.FromNamedParameters(input.named_parameters, context);
|
55
|
-
if (options.rejects_table_name.IsSetByUser() && !options.store_rejects.GetValue() &&
|
56
|
-
options.store_rejects.IsSetByUser()) {
|
57
|
-
throw BinderException("REJECTS_TABLE option is only supported when store_rejects is not manually set to false");
|
58
|
-
}
|
59
|
-
if (options.rejects_scan_name.IsSetByUser() && !options.store_rejects.GetValue() &&
|
60
|
-
options.store_rejects.IsSetByUser()) {
|
61
|
-
throw BinderException("REJECTS_SCAN option is only supported when store_rejects is not manually set to false");
|
62
|
-
}
|
63
|
-
if (options.rejects_scan_name.IsSetByUser() || options.rejects_table_name.IsSetByUser()) {
|
64
|
-
// Ensure we set store_rejects to true automagically
|
65
|
-
options.store_rejects.Set(true, false);
|
66
|
-
}
|
67
|
-
// Validate rejects_table options
|
68
|
-
if (options.store_rejects.GetValue()) {
|
69
|
-
if (!options.ignore_errors.GetValue() && options.ignore_errors.IsSetByUser()) {
|
70
|
-
throw BinderException(
|
71
|
-
"STORE_REJECTS option is only supported when IGNORE_ERRORS is not manually set to false");
|
72
|
-
}
|
73
|
-
// Ensure we set ignore errors to true automagically
|
74
|
-
options.ignore_errors.Set(true, false);
|
75
|
-
if (options.file_options.union_by_name) {
|
76
|
-
throw BinderException("REJECTS_TABLE option is not supported when UNION_BY_NAME is set to true");
|
77
|
-
}
|
78
|
-
}
|
79
|
-
if (options.rejects_limit != 0 && !options.store_rejects.GetValue()) {
|
80
|
-
throw BinderException("REJECTS_LIMIT option is only supported when REJECTS_TABLE is set to a table name");
|
81
|
-
}
|
82
55
|
|
83
56
|
options.file_options.AutoDetectHivePartitioning(*multi_file_list, context);
|
84
|
-
|
57
|
+
options.Verify();
|
85
58
|
if (!options.auto_detect) {
|
86
59
|
if (!options.columns_set) {
|
87
60
|
throw BinderException("read_csv requires columns to be specified through the 'columns' option. Use "
|
@@ -291,7 +264,6 @@ void ReadCSVTableFunction::ReadCSVAddNamedParameters(TableFunction &table_functi
|
|
291
264
|
table_function.named_parameters["types"] = LogicalType::ANY;
|
292
265
|
table_function.named_parameters["names"] = LogicalType::LIST(LogicalType::VARCHAR);
|
293
266
|
table_function.named_parameters["column_names"] = LogicalType::LIST(LogicalType::VARCHAR);
|
294
|
-
table_function.named_parameters["parallel"] = LogicalType::BOOLEAN;
|
295
267
|
table_function.named_parameters["comment"] = LogicalType::VARCHAR;
|
296
268
|
|
297
269
|
MultiFileReader::AddParameters(table_function);
|
@@ -1,7 +1,7 @@
|
|
1
1
|
#include "duckdb/function/built_in_functions.hpp"
|
2
2
|
#include "duckdb/execution/operator/csv_scanner/csv_reader_options.hpp"
|
3
3
|
#include "duckdb/common/types/data_chunk.hpp"
|
4
|
-
#include "duckdb/execution/operator/csv_scanner/csv_sniffer.hpp"
|
4
|
+
#include "duckdb/execution/operator/csv_scanner/sniffer/csv_sniffer.hpp"
|
5
5
|
#include "duckdb/execution/operator/csv_scanner/csv_buffer_manager.hpp"
|
6
6
|
#include "duckdb/function/table_function.hpp"
|
7
7
|
#include "duckdb/main/client_context.hpp"
|
@@ -50,6 +50,7 @@ static unique_ptr<FunctionData> CSVSniffBind(ClientContext &context, TableFuncti
|
|
50
50
|
input.named_parameters.erase("auto_detect");
|
51
51
|
}
|
52
52
|
result->options.FromNamedParameters(input.named_parameters, context);
|
53
|
+
result->options.Verify();
|
53
54
|
// We want to return the whole CSV Configuration
|
54
55
|
// 1. Delimiter
|
55
56
|
return_types.emplace_back(LogicalType::VARCHAR);
|
@@ -107,13 +107,21 @@ void DuckDBSecretsFunction(ClientContext &context, TableFunctionInput &data_p, D
|
|
107
107
|
|
108
108
|
const auto &secret = *secret_entry.secret;
|
109
109
|
|
110
|
-
|
111
|
-
|
112
|
-
output.SetValue(
|
113
|
-
|
114
|
-
output.SetValue(
|
115
|
-
|
116
|
-
output.SetValue(
|
110
|
+
idx_t i = 0;
|
111
|
+
// name
|
112
|
+
output.SetValue(i++, count, secret.GetName());
|
113
|
+
// type
|
114
|
+
output.SetValue(i++, count, Value(secret.GetType()));
|
115
|
+
// provider
|
116
|
+
output.SetValue(i++, count, Value(secret.GetProvider()));
|
117
|
+
// persistent
|
118
|
+
output.SetValue(i++, count, Value(secret_entry.persist_type == SecretPersistType::PERSISTENT));
|
119
|
+
// storage
|
120
|
+
output.SetValue(i++, count, Value(secret_entry.storage_mode));
|
121
|
+
// scope
|
122
|
+
output.SetValue(i++, count, Value::LIST(LogicalType::VARCHAR, scope_value));
|
123
|
+
// secret_string
|
124
|
+
output.SetValue(i++, count, secret.ToString(bind_data.redact));
|
117
125
|
|
118
126
|
data.offset++;
|
119
127
|
count++;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
#ifndef DUCKDB_PATCH_VERSION
|
2
|
-
#define DUCKDB_PATCH_VERSION "
|
2
|
+
#define DUCKDB_PATCH_VERSION "3"
|
3
3
|
#endif
|
4
4
|
#ifndef DUCKDB_MINOR_VERSION
|
5
5
|
#define DUCKDB_MINOR_VERSION 1
|
@@ -8,10 +8,10 @@
|
|
8
8
|
#define DUCKDB_MAJOR_VERSION 1
|
9
9
|
#endif
|
10
10
|
#ifndef DUCKDB_VERSION
|
11
|
-
#define DUCKDB_VERSION "v1.1.
|
11
|
+
#define DUCKDB_VERSION "v1.1.3"
|
12
12
|
#endif
|
13
13
|
#ifndef DUCKDB_SOURCE_ID
|
14
|
-
#define DUCKDB_SOURCE_ID "
|
14
|
+
#define DUCKDB_SOURCE_ID "19864453f7"
|
15
15
|
#endif
|
16
16
|
#include "duckdb/function/table/system_functions.hpp"
|
17
17
|
#include "duckdb/main/database.hpp"
|
@@ -11,5 +11,17 @@
|
|
11
11
|
#include <atomic>
|
12
12
|
|
13
13
|
namespace duckdb {
|
14
|
+
|
14
15
|
using std::atomic;
|
15
|
-
|
16
|
+
|
17
|
+
//! NOTE: When repeatedly trying to atomically set a value in a loop, you can use as the loop condition:
|
18
|
+
//! * std::atomic_compare_exchange_weak
|
19
|
+
//! * std::atomic::compare_exchange_weak
|
20
|
+
//! If not used as a loop condition, use:
|
21
|
+
//! * std::atomic_compare_exchange_strong
|
22
|
+
//! * std::atomic::compare_exchange_strong
|
23
|
+
//! If this is not done correctly, we may get correctness issues when using older compiler versions (see: issue #14389)
|
24
|
+
//! Performance may be optimized using std::memory_order, but NOT at the cost of correctness.
|
25
|
+
//! For correct examples of this, see concurrentqueue.h
|
26
|
+
|
27
|
+
} // namespace duckdb
|
@@ -41,16 +41,15 @@ public:
|
|
41
41
|
}
|
42
42
|
} else {
|
43
43
|
idx_t misaligned_count = count % BITPACKING_ALGORITHM_GROUP_SIZE;
|
44
|
-
T tmp_buffer[BITPACKING_ALGORITHM_GROUP_SIZE]; // TODO maybe faster on the heap?
|
45
|
-
|
46
44
|
count -= misaligned_count;
|
47
|
-
|
48
45
|
for (idx_t i = 0; i < count; i += BITPACKING_ALGORITHM_GROUP_SIZE) {
|
49
46
|
PackGroup<T>(dst + (i * width) / 8, src + i, width);
|
50
47
|
}
|
51
48
|
|
52
|
-
//
|
49
|
+
// The input is not aligned to BITPACKING_ALGORITHM_GROUP_SIZE.
|
50
|
+
// Copy the unaligned count into a zero-initialized temporary group, and pack it.
|
53
51
|
if (misaligned_count) {
|
52
|
+
T tmp_buffer[BITPACKING_ALGORITHM_GROUP_SIZE] = {0};
|
54
53
|
memcpy(tmp_buffer, src + count, misaligned_count * sizeof(T));
|
55
54
|
PackGroup<T>(dst + (count * width) / 8, tmp_buffer, width);
|
56
55
|
}
|
@@ -278,6 +278,8 @@ enum class SecretDisplayType : uint8_t;
|
|
278
278
|
|
279
279
|
enum class SecretPersistType : uint8_t;
|
280
280
|
|
281
|
+
enum class SecretSerializationType : uint8_t;
|
282
|
+
|
281
283
|
enum class SequenceInfo : uint8_t;
|
282
284
|
|
283
285
|
enum class SetOperationType : uint8_t;
|
@@ -728,6 +730,9 @@ const char* EnumUtil::ToChars<SecretDisplayType>(SecretDisplayType value);
|
|
728
730
|
template<>
|
729
731
|
const char* EnumUtil::ToChars<SecretPersistType>(SecretPersistType value);
|
730
732
|
|
733
|
+
template<>
|
734
|
+
const char* EnumUtil::ToChars<SecretSerializationType>(SecretSerializationType value);
|
735
|
+
|
731
736
|
template<>
|
732
737
|
const char* EnumUtil::ToChars<SequenceInfo>(SequenceInfo value);
|
733
738
|
|
@@ -1218,6 +1223,9 @@ SecretDisplayType EnumUtil::FromString<SecretDisplayType>(const char *value);
|
|
1218
1223
|
template<>
|
1219
1224
|
SecretPersistType EnumUtil::FromString<SecretPersistType>(const char *value);
|
1220
1225
|
|
1226
|
+
template<>
|
1227
|
+
SecretSerializationType EnumUtil::FromString<SecretSerializationType>(const char *value);
|
1228
|
+
|
1221
1229
|
template<>
|
1222
1230
|
SequenceInfo EnumUtil::FromString<SequenceInfo>(const char *value);
|
1223
1231
|
|
@@ -329,6 +329,16 @@ public:
|
|
329
329
|
}
|
330
330
|
};
|
331
331
|
|
332
|
+
class ExecutorException : public Exception {
|
333
|
+
public:
|
334
|
+
DUCKDB_API explicit ExecutorException(const string &msg);
|
335
|
+
|
336
|
+
template <typename... ARGS>
|
337
|
+
explicit ExecutorException(const string &msg, ARGS... params)
|
338
|
+
: ExecutorException(ConstructMessage(msg, params...)) {
|
339
|
+
}
|
340
|
+
};
|
341
|
+
|
332
342
|
class InvalidConfigurationException : public Exception {
|
333
343
|
public:
|
334
344
|
DUCKDB_API explicit InvalidConfigurationException(const string &msg);
|