From c96198d80adf8d376490385f449fc0c14d322ee4 Mon Sep 17 00:00:00 2001 From: DuckDB Labs GitHub Bot Date: Tue, 31 Mar 2026 05:23:23 +0000 Subject: [PATCH] Update vendored DuckDB sources to ddba343762 --- src/duckdb/src/common/types.cpp | 1 + .../function/scalar/geometry/geometry_functions.cpp | 7 +++---- .../src/function/table/arrow/arrow_duck_schema.cpp | 12 ++++++++++-- .../src/function/table/version/pragma_version.cpp | 6 +++--- src/duckdb/src/storage/table/geo_column_data.cpp | 9 ++++----- 5 files changed, 21 insertions(+), 14 deletions(-) diff --git a/src/duckdb/src/common/types.cpp b/src/duckdb/src/common/types.cpp index b7b245370..765590a13 100644 --- a/src/duckdb/src/common/types.cpp +++ b/src/duckdb/src/common/types.cpp @@ -710,6 +710,7 @@ bool LogicalType::SupportsRegularUpdate() const { case LogicalTypeId::MAP: case LogicalTypeId::UNION: case LogicalTypeId::VARIANT: + case LogicalTypeId::GEOMETRY: // If geometry is shredded, its parts (lists/structs) can't be regularly updated. return false; case LogicalTypeId::STRUCT: { auto &child_types = StructType::GetChildTypes(*this); diff --git a/src/duckdb/src/function/scalar/geometry/geometry_functions.cpp b/src/duckdb/src/function/scalar/geometry/geometry_functions.cpp index 8a19c129d..c824ffd46 100644 --- a/src/duckdb/src/function/scalar/geometry/geometry_functions.cpp +++ b/src/duckdb/src/function/scalar/geometry/geometry_functions.cpp @@ -81,7 +81,7 @@ static void CRSFunction(DataChunk &args, ExpressionState &state, Vector &result) static unique_ptr BindCRSFunctionExpression(FunctionBindExpressionInput &input) { const auto &return_type = input.children[0]->return_type; - if (return_type.id() == LogicalTypeId::UNKNOWN || return_type.id() == LogicalTypeId::SQLNULL) { + if (return_type.id() != LogicalTypeId::GEOMETRY) { // parameter - unknown return type return nullptr; } @@ -91,12 +91,11 @@ static unique_ptr BindCRSFunctionExpression(FunctionBindExpressionIn static unique_ptr BindCRSFunction(ClientContext &context, ScalarFunction &bound_function, vector> &arguments) { - if (arguments[0]->HasParameter() || arguments[0]->return_type.id() == LogicalTypeId::SQLNULL) { - // parameter - unknown return type + if (arguments[0]->return_type.id() != LogicalTypeId::GEOMETRY) { return nullptr; } - // Check if the CRS is set in the first argument + // Propagate the CRS from the input argument to the parameter type bound_function.arguments[0] = arguments[0]->return_type; return nullptr; } diff --git a/src/duckdb/src/function/table/arrow/arrow_duck_schema.cpp b/src/duckdb/src/function/table/arrow/arrow_duck_schema.cpp index 1f44379df..c4cb16718 100644 --- a/src/duckdb/src/function/table/arrow/arrow_duck_schema.cpp +++ b/src/duckdb/src/function/table/arrow/arrow_duck_schema.cpp @@ -188,7 +188,11 @@ unique_ptr ArrowType::GetTypeFromFormat(string &format) { auto type_info = make_uniq(ArrowVariableSizeType::VIEW); return make_uniq(LogicalType::BLOB, std::move(type_info)); } else if (format[0] == 'w') { - string parameters = format.substr(format.find(':') + 1); + // Arrow C Data Interface spec: fixed-size binary is "w:NN", colon always at position 1 + if (format.size() <= 2 || format[1] != ':') { + throw InvalidInputException("Invalid Arrow fixed-size binary format string: \"%s\"", format); + } + string parameters = format.substr(2); auto fixed_size = NumericCast(std::stoi(parameters)); auto type_info = make_uniq(fixed_size); return make_uniq(LogicalType::BLOB, std::move(type_info)); @@ -227,7 +231,11 @@ unique_ptr ArrowType::GetTypeFromFormat(ClientContext &context, Arrow } else if (format == "+vL") { return CreateListType(context, *schema.children[0], ArrowVariableSizeType::SUPER_SIZE, true); } else if (format[0] == '+' && format[1] == 'w') { - std::string parameters = format.substr(format.find(':') + 1); + // Arrow C Data Interface spec: fixed-size list is "+w:NN", colon always at position 2 + if (format.size() <= 3 || format[2] != ':') { + throw InvalidInputException("Invalid Arrow fixed-size list format string: \"%s\"", format); + } + std::string parameters = format.substr(3); auto fixed_size = NumericCast(std::stoi(parameters)); auto child_type = GetArrowLogicalType(context, *schema.children[0]); diff --git a/src/duckdb/src/function/table/version/pragma_version.cpp b/src/duckdb/src/function/table/version/pragma_version.cpp index 3eab46eb5..c0fb8585e 100644 --- a/src/duckdb/src/function/table/version/pragma_version.cpp +++ b/src/duckdb/src/function/table/version/pragma_version.cpp @@ -1,5 +1,5 @@ #ifndef DUCKDB_PATCH_VERSION -#define DUCKDB_PATCH_VERSION "2-dev291" +#define DUCKDB_PATCH_VERSION "2-dev302" #endif #ifndef DUCKDB_MINOR_VERSION #define DUCKDB_MINOR_VERSION 5 @@ -8,10 +8,10 @@ #define DUCKDB_MAJOR_VERSION 1 #endif #ifndef DUCKDB_VERSION -#define DUCKDB_VERSION "v1.5.2-dev291" +#define DUCKDB_VERSION "v1.5.2-dev302" #endif #ifndef DUCKDB_SOURCE_ID -#define DUCKDB_SOURCE_ID "4b7b860448" +#define DUCKDB_SOURCE_ID "ddba343762" #endif #include "duckdb/function/table/system_functions.hpp" #include "duckdb/main/database.hpp" diff --git a/src/duckdb/src/storage/table/geo_column_data.cpp b/src/duckdb/src/storage/table/geo_column_data.cpp index 913e09908..2a5e936d1 100644 --- a/src/duckdb/src/storage/table/geo_column_data.cpp +++ b/src/duckdb/src/storage/table/geo_column_data.cpp @@ -154,18 +154,17 @@ void GeoColumnData::FetchRow(TransactionData transaction, ColumnFetchState &stat void GeoColumnData::Update(TransactionData transaction, DataTable &data_table, idx_t column_index, Vector &update_vector, row_t *row_ids, idx_t update_count, idx_t row_group_start) { - return base_column->Update(transaction, data_table, column_index, update_vector, row_ids, update_count, - row_group_start); + throw NotImplementedException("GEOMETRY Update is not supported"); } + void GeoColumnData::UpdateColumn(TransactionData transaction, DataTable &data_table, const vector &column_path, Vector &update_vector, row_t *row_ids, idx_t update_count, idx_t depth, idx_t row_group_start) { - return base_column->UpdateColumn(transaction, data_table, column_path, update_vector, row_ids, update_count, depth, - row_group_start); + throw NotImplementedException("GEOMETRY Update is not supported"); } unique_ptr GeoColumnData::GetUpdateStatistics() { - return base_column->GetUpdateStatistics(); + return nullptr; } //----------------------------------------------------------------------------------------------------------------------