Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
2007cec
Update vendored DuckDB sources to 5657cbdc0b
duckdblabs-bot Oct 4, 2025
6a14da4
Update vendored DuckDB sources to b3c8acdc0e
duckdblabs-bot Oct 7, 2025
0b478d3
Update vendored DuckDB sources to f793ea27c6
duckdblabs-bot Oct 8, 2025
45e0299
Update vendored DuckDB sources to 353406bd7f
duckdblabs-bot Oct 9, 2025
0eda34b
Update vendored DuckDB sources to 9d77bcf518
duckdblabs-bot Oct 11, 2025
f10aea5
Update vendored DuckDB sources to 2762f1aa72
duckdblabs-bot Oct 12, 2025
2088ae4
Update vendored DuckDB sources to 7621d1bad9
duckdblabs-bot Oct 14, 2025
855724b
Update vendored DuckDB sources to 746404c6aa
duckdblabs-bot Oct 15, 2025
81d6e16
Update vendored DuckDB sources to 5d422e423e
duckdblabs-bot Oct 16, 2025
b3f1929
Update vendored DuckDB sources to f256271bbc
duckdblabs-bot Oct 17, 2025
498da86
Update vendored DuckDB sources to 50acc16a8d
duckdblabs-bot Oct 18, 2025
457acae
Update vendored DuckDB sources to d921f4d6ba
duckdblabs-bot Oct 19, 2025
f24aa46
Update vendored DuckDB sources to c8906e701e
duckdblabs-bot Oct 22, 2025
7565c88
Update vendored DuckDB sources to bfc1fc8800
duckdblabs-bot Oct 25, 2025
80341dc
Update vendored DuckDB sources to ee49c5b308
duckdblabs-bot Oct 28, 2025
a0eaba7
Update vendored DuckDB sources to 4ff549de0d
duckdblabs-bot Oct 29, 2025
d1c6fb9
Update vendored DuckDB sources to c8906e701e
duckdblabs-bot Oct 29, 2025
a476351
Update vendored DuckDB sources to 620e685c6d
duckdblabs-bot Nov 5, 2025
f320879
Update vendored DuckDB sources to 963000678a
duckdblabs-bot Nov 6, 2025
bdbfad9
Update vendored DuckDB sources to d573b275ce
duckdblabs-bot Nov 7, 2025
9989217
Update vendored DuckDB sources to 44b706b2b7
duckdblabs-bot Nov 8, 2025
b762a52
Update vendored DuckDB sources to 5511fb39ac
duckdblabs-bot Nov 11, 2025
4e7f155
Update vendored DuckDB sources to 39f5583f99
duckdblabs-bot Nov 12, 2025
05c4d7f
Update vendored DuckDB sources to f484208c27
duckdblabs-bot Nov 18, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update vendored DuckDB sources to bfc1fc8800
  • Loading branch information
duckdblabs-bot committed Nov 11, 2025
commit 7565c882267105890faec6dac601d5d63a694014
2 changes: 1 addition & 1 deletion src/duckdb/src/common/sort/sorted_run.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ void GetKeyAndPayload(SORT_KEY *const *const sort_keys, const idx_t &count, Data
template <class SORT_KEY>
void TemplatedReconstructSortKey(SORT_KEY *const *const sort_keys, const idx_t &count) {
for (idx_t i = 0; i < count; i++) {
sort_keys[i]->ByteSwap();
sort_keys[i]->Reconstruct();
}
}

Expand Down
28 changes: 0 additions & 28 deletions src/duckdb/src/common/sort/sorted_run_merger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -687,34 +687,6 @@ void SortedRunMergerLocalState::ScanPartition(SortedRunMergerGlobalState &gstate
}
}

template <class SORT_KEY, class PHYSICAL_TYPE>
void TemplatedGetKeyAndPayload(SORT_KEY *const merged_partition_keys, const idx_t count, DataChunk &key,
data_ptr_t *const payload_ptrs) {
const auto key_data = FlatVector::GetData<PHYSICAL_TYPE>(key.data[0]);
for (idx_t i = 0; i < count; i++) {
auto &merged_partition_key = merged_partition_keys[i];
merged_partition_key.Deconstruct(key_data[i]);
if (SORT_KEY::HAS_PAYLOAD) {
payload_ptrs[i] = merged_partition_key.GetPayload();
}
}
key.SetCardinality(count);
}

template <class SORT_KEY>
void GetKeyAndPayload(SORT_KEY *const merged_partition_keys, const idx_t count, DataChunk &key,
data_ptr_t *const payload_ptrs) {
const auto type_id = key.data[0].GetType().id();
switch (type_id) {
case LogicalTypeId::BLOB:
return TemplatedGetKeyAndPayload<SORT_KEY, string_t>(merged_partition_keys, count, key, payload_ptrs);
case LogicalTypeId::BIGINT:
return TemplatedGetKeyAndPayload<SORT_KEY, int64_t>(merged_partition_keys, count, key, payload_ptrs);
default:
throw NotImplementedException("GetKeyAndPayload for %s", EnumUtil::ToString(type_id));
}
}

template <SortKeyType SORT_KEY_TYPE>
void SortedRunMergerLocalState::TemplatedScanPartition(SortedRunMergerGlobalState &gstate, DataChunk &chunk) {
using SORT_KEY = SortKey<SORT_KEY_TYPE>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ AsOfGlobalSourceState::AsOfGlobalSourceState(ClientContext &client, const Physic
auto &rhs_groups = hashed_groups[1];
right_outers.reserve(rhs_groups.size());
for (const auto &hash_group : rhs_groups) {
right_outers.emplace_back(OuterJoinMarker(is_right_outer));
right_outers.emplace_back(is_right_outer);
right_outers.back().Initialize(hash_group ? hash_group->Count() : 0);
}
}
Expand Down
6 changes: 3 additions & 3 deletions src/duckdb/src/function/table/version/pragma_version.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef DUCKDB_PATCH_VERSION
#define DUCKDB_PATCH_VERSION "0-dev1372"
#define DUCKDB_PATCH_VERSION "0-dev1378"
#endif
#ifndef DUCKDB_MINOR_VERSION
#define DUCKDB_MINOR_VERSION 5
Expand All @@ -8,10 +8,10 @@
#define DUCKDB_MAJOR_VERSION 1
#endif
#ifndef DUCKDB_VERSION
#define DUCKDB_VERSION "v1.5.0-dev1372"
#define DUCKDB_VERSION "v1.5.0-dev1378"
#endif
#ifndef DUCKDB_SOURCE_ID
#define DUCKDB_SOURCE_ID "c8906e701e"
#define DUCKDB_SOURCE_ID "bfc1fc8800"
#endif
#include "duckdb/function/table/system_functions.hpp"
#include "duckdb/main/database.hpp"
Expand Down
104 changes: 104 additions & 0 deletions src/duckdb/src/include/duckdb.h
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,21 @@ typedef enum duckdb_file_flag {
DUCKDB_FILE_FLAG_APPEND = 5,
} duckdb_file_flag;

//! An enum over DuckDB's configuration option scopes.
//! This enum can be used to specify the default scope when creating a custom configuration option,
//! but it is also be used to determine the scope in which a configuration option is set when it is
//! changed or retrieved.
typedef enum duckdb_config_option_scope {
DUCKDB_CONFIG_OPTION_SCOPE_INVALID = 0,
// The option is set for the duration of the current transaction only.
// !! CURRENTLY NOT IMPLEMENTED !!
DUCKDB_CONFIG_OPTION_SCOPE_LOCAL = 1,
// The option is set for the current session/connection only.
DUCKDB_CONFIG_OPTION_SCOPE_SESSION = 2,
// Set the option globally for all sessions/connections.
DUCKDB_CONFIG_OPTION_SCOPE_GLOBAL = 3,
} duckdb_config_option_scope;

//===--------------------------------------------------------------------===//
// General type definitions
//===--------------------------------------------------------------------===//
Expand Down Expand Up @@ -548,6 +563,12 @@ typedef struct _duckdb_config {
void *internal_ptr;
} * duckdb_config;

//! A custom configuration option instance. Used to register custom options that can be set on a duckdb_config.
//! or by the user in SQL using `SET <option_name> = <value>`.
typedef struct _duckdb_config_option {
void *internal_ptr;
} * duckdb_config_option;

//! A logical type.
//! Must be destroyed with `duckdb_destroy_logical_type`.
typedef struct _duckdb_logical_type {
Expand Down Expand Up @@ -5352,6 +5373,89 @@ Closes the given file handle.
*/
DUCKDB_C_API duckdb_state duckdb_file_handle_close(duckdb_file_handle file_handle);

//===--------------------------------------------------------------------===//
// Config Options Interface
//===--------------------------------------------------------------------===//

/*!
Creates a configuration option instance.

* @return The resulting configuration option instance. Must be destroyed with `duckdb_destroy_config_option`.
*/
DUCKDB_C_API duckdb_config_option duckdb_create_config_option();

/*!
Destroys the given configuration option instance.
* @param option The configuration option instance to destroy.
*/
DUCKDB_C_API void duckdb_destroy_config_option(duckdb_config_option *option);

/*!
Sets the name of the configuration option.

* @param option The configuration option instance.
* @param name The name to set.
*/
DUCKDB_C_API void duckdb_config_option_set_name(duckdb_config_option option, const char *name);

/*!
Sets the type of the configuration option.

* @param option The configuration option instance.
* @param type The type to set.
*/
DUCKDB_C_API void duckdb_config_option_set_type(duckdb_config_option option, duckdb_logical_type type);

/*!
Sets the default value of the configuration option.
If the type of this option has already been set with `duckdb_config_option_set_type`, the value is cast to the type.
Otherwise, the type is inferred from the value.

* @param option The configuration option instance.
* @param default_value The default value to set.
*/
DUCKDB_C_API void duckdb_config_option_set_default_value(duckdb_config_option option, duckdb_value default_value);

/*!
Sets the default scope of the configuration option.
If not set, this defaults to `DUCKDB_CONFIG_OPTION_SCOPE_SESSION`.

* @param option The configuration option instance.
* @param default_scope The default scope to set.
*/
DUCKDB_C_API void duckdb_config_option_set_default_scope(duckdb_config_option option,
duckdb_config_option_scope default_scope);

/*!
Sets the description of the configuration option.

* @param option The configuration option instance.
* @param description The description to set.
*/
DUCKDB_C_API void duckdb_config_option_set_description(duckdb_config_option option, const char *description);

/*!
Registers the given configuration option on the specified connection.

* @param connection The connection to register the option on.
* @param option The configuration option instance to register.
* @return A duckdb_state indicating success or failure.
*/
DUCKDB_C_API duckdb_state duckdb_register_config_option(duckdb_connection connection, duckdb_config_option option);

/*!
Retrieves the value of a configuration option by name from the given client context.

* @param context The client context.
* @param name The name of the configuration option to retrieve.
* @param out_scope Output parameter to optionally store the scope that the configuration option was retrieved from.
If this is `nullptr`, the scope is not returned.
If the requested option does not exist the scope is set to `DUCKDB_CONFIG_OPTION_SCOPE_INVALID`.
* @return The value of the configuration option. Returns `nullptr` if the option does not exist.
*/
DUCKDB_C_API duckdb_value duckdb_client_context_get_config_option(duckdb_client_context context, const char *name,
duckdb_config_option_scope *out_scope);

#endif

#ifdef __cplusplus
Expand Down
19 changes: 15 additions & 4 deletions src/duckdb/src/include/duckdb/common/sorting/sort_key.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ struct SortKey;
template <class SORT_KEY>
struct SortKeyNoPayload {
protected:
SortKeyNoPayload() = default;
SortKeyNoPayload() = default; // NOLINT
friend SORT_KEY;

public:
Expand All @@ -63,7 +63,7 @@ struct SortKeyNoPayload {
template <class SORT_KEY>
struct SortKeyPayload {
protected:
SortKeyPayload() = default;
SortKeyPayload() = default; // NOLINT
friend SORT_KEY;

public:
Expand Down Expand Up @@ -93,7 +93,7 @@ inline bool SortKeyLessThan<1>(const uint64_t *const &lhs, const uint64_t *const
template <class SORT_KEY, bool HAS_PAYLOAD>
struct FixedSortKey : std::conditional<HAS_PAYLOAD, SortKeyPayload<SORT_KEY>, SortKeyNoPayload<SORT_KEY>>::type {
protected:
FixedSortKey() = default;
FixedSortKey() = default; // NOLINT
friend SORT_KEY;

public:
Expand Down Expand Up @@ -143,6 +143,10 @@ struct FixedSortKey : std::conditional<HAS_PAYLOAD, SortKeyPayload<SORT_KEY>, So
val = static_cast<int64_t>(sort_key.part0); // NOLINT: unsafe cast on purpose
}

void Reconstruct() {
ByteSwap();
}

data_ptr_t GetData() const {
throw InternalException("GetData() called on a FixedSortKey");
}
Expand All @@ -163,7 +167,7 @@ struct FixedSortKey : std::conditional<HAS_PAYLOAD, SortKeyPayload<SORT_KEY>, So
template <class SORT_KEY, bool HAS_PAYLOAD>
struct VariableSortKey : std::conditional<HAS_PAYLOAD, SortKeyPayload<SORT_KEY>, SortKeyNoPayload<SORT_KEY>>::type {
protected:
VariableSortKey() = default;
VariableSortKey() = default; // NOLINT
friend SORT_KEY;

public:
Expand Down Expand Up @@ -215,6 +219,13 @@ struct VariableSortKey : std::conditional<HAS_PAYLOAD, SortKeyPayload<SORT_KEY>,
throw InternalException("VariableSortKey::Deconstruct() called with an int64_t");
}

void Reconstruct() {
auto &sort_key = static_cast<SORT_KEY &>(*this);
if (sort_key.size <= SORT_KEY::INLINE_LENGTH) {
ByteSwap();
}
}

data_ptr_t GetData() const {
auto &sort_key = static_cast<const SORT_KEY &>(*this);
return sort_key.data.u.ptr;
Expand Down
22 changes: 22 additions & 0 deletions src/duckdb/src/include/duckdb/main/capi/extension_api.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -487,6 +487,19 @@ typedef struct {
duckdb_arrow_converted_schema converted_schema,
duckdb_data_chunk *out_chunk);
void (*duckdb_destroy_arrow_converted_schema)(duckdb_arrow_converted_schema *arrow_converted_schema);
// New configuration options functions

duckdb_config_option (*duckdb_create_config_option)();
void (*duckdb_destroy_config_option)(duckdb_config_option *option);
void (*duckdb_config_option_set_name)(duckdb_config_option option, const char *name);
void (*duckdb_config_option_set_type)(duckdb_config_option option, duckdb_logical_type type);
void (*duckdb_config_option_set_default_value)(duckdb_config_option option, duckdb_value default_value);
void (*duckdb_config_option_set_default_scope)(duckdb_config_option option,
duckdb_config_option_scope default_scope);
void (*duckdb_config_option_set_description)(duckdb_config_option option, const char *description);
duckdb_state (*duckdb_register_config_option)(duckdb_connection connection, duckdb_config_option option);
duckdb_value (*duckdb_client_context_get_config_option)(duckdb_client_context context, const char *name,
duckdb_config_option_scope *out_scope);
// New functions for duckdb error data

duckdb_error_data (*duckdb_create_error_data)(duckdb_error_type type, const char *message);
Expand Down Expand Up @@ -1003,6 +1016,15 @@ inline duckdb_ext_api_v1 CreateAPIv1() {
result.duckdb_schema_from_arrow = duckdb_schema_from_arrow;
result.duckdb_data_chunk_from_arrow = duckdb_data_chunk_from_arrow;
result.duckdb_destroy_arrow_converted_schema = duckdb_destroy_arrow_converted_schema;
result.duckdb_create_config_option = duckdb_create_config_option;
result.duckdb_destroy_config_option = duckdb_destroy_config_option;
result.duckdb_config_option_set_name = duckdb_config_option_set_name;
result.duckdb_config_option_set_type = duckdb_config_option_set_type;
result.duckdb_config_option_set_default_value = duckdb_config_option_set_default_value;
result.duckdb_config_option_set_default_scope = duckdb_config_option_set_default_scope;
result.duckdb_config_option_set_description = duckdb_config_option_set_description;
result.duckdb_register_config_option = duckdb_register_config_option;
result.duckdb_client_context_get_config_option = duckdb_client_context_get_config_option;
result.duckdb_create_error_data = duckdb_create_error_data;
result.duckdb_destroy_error_data = duckdb_destroy_error_data;
result.duckdb_error_data_error_type = duckdb_error_data_error_type;
Expand Down
1 change: 1 addition & 0 deletions src/duckdb/src/include/duckdb/main/config.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,7 @@ struct DBConfig {
DUCKDB_API void AddExtensionOption(const string &name, string description, LogicalType parameter,
const Value &default_value = Value(), set_option_callback_t function = nullptr,
SetScope default_scope = SetScope::SESSION);
DUCKDB_API bool HasExtensionOption(const string &name);
//! Fetch an option by index. Returns a pointer to the option, or nullptr if out of range
DUCKDB_API static optional_ptr<const ConfigurationOption> GetOptionByIndex(idx_t index);
//! Fetcha n alias by index, or nullptr if out of range
Expand Down
26 changes: 26 additions & 0 deletions src/duckdb/src/include/duckdb_extension.h
Original file line number Diff line number Diff line change
Expand Up @@ -560,6 +560,21 @@ typedef struct {
void (*duckdb_destroy_arrow_converted_schema)(duckdb_arrow_converted_schema *arrow_converted_schema);
#endif

// New configuration options functions
#ifdef DUCKDB_EXTENSION_API_VERSION_UNSTABLE
duckdb_config_option (*duckdb_create_config_option)();
void (*duckdb_destroy_config_option)(duckdb_config_option *option);
void (*duckdb_config_option_set_name)(duckdb_config_option option, const char *name);
void (*duckdb_config_option_set_type)(duckdb_config_option option, duckdb_logical_type type);
void (*duckdb_config_option_set_default_value)(duckdb_config_option option, duckdb_value default_value);
void (*duckdb_config_option_set_default_scope)(duckdb_config_option option,
duckdb_config_option_scope default_scope);
void (*duckdb_config_option_set_description)(duckdb_config_option option, const char *description);
duckdb_state (*duckdb_register_config_option)(duckdb_connection connection, duckdb_config_option option);
duckdb_value (*duckdb_client_context_get_config_option)(duckdb_client_context context, const char *name,
duckdb_config_option_scope *out_scope);
#endif

// New functions for duckdb error data
#ifdef DUCKDB_EXTENSION_API_VERSION_UNSTABLE
duckdb_error_data (*duckdb_create_error_data)(duckdb_error_type type, const char *message);
Expand Down Expand Up @@ -1109,6 +1124,17 @@ typedef struct {
#define duckdb_data_chunk_from_arrow duckdb_ext_api.duckdb_data_chunk_from_arrow
#define duckdb_destroy_arrow_converted_schema duckdb_ext_api.duckdb_destroy_arrow_converted_schema

// Version unstable_new_config_options_functions
#define duckdb_create_config_option duckdb_ext_api.duckdb_create_config_option
#define duckdb_destroy_config_option duckdb_ext_api.duckdb_destroy_config_option
#define duckdb_config_option_set_name duckdb_ext_api.duckdb_config_option_set_name
#define duckdb_config_option_set_type duckdb_ext_api.duckdb_config_option_set_type
#define duckdb_config_option_set_default_value duckdb_ext_api.duckdb_config_option_set_default_value
#define duckdb_config_option_set_default_scope duckdb_ext_api.duckdb_config_option_set_default_scope
#define duckdb_config_option_set_description duckdb_ext_api.duckdb_config_option_set_description
#define duckdb_register_config_option duckdb_ext_api.duckdb_register_config_option
#define duckdb_client_context_get_config_option duckdb_ext_api.duckdb_client_context_get_config_option

// Version unstable_new_error_data_functions
#define duckdb_create_error_data duckdb_ext_api.duckdb_create_error_data
#define duckdb_destroy_error_data duckdb_ext_api.duckdb_destroy_error_data
Expand Down
Loading