Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
7 changes: 4 additions & 3 deletions src/duckdb/src/common/arrow/appender/union_data.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ void ArrowUnionData::Append(ArrowAppendData &append_data, Vector &input, idx_t f
child_vectors.emplace_back(child.second, size);
}

for (idx_t input_idx = from; input_idx < to; input_idx++) {
for (idx_t i = 0; i < size; i++) {
auto input_idx = from + i;
const auto &val = input.GetValue(input_idx);

idx_t tag = 0;
Expand All @@ -40,15 +41,15 @@ void ArrowUnionData::Append(ArrowAppendData &append_data, Vector &input, idx_t f
}

for (idx_t child_idx = 0; child_idx < child_vectors.size(); child_idx++) {
child_vectors[child_idx].SetValue(input_idx, child_idx == tag ? resolved_value : Value(nullptr));
child_vectors[child_idx].SetValue(i, child_idx == tag ? resolved_value : Value(nullptr));
}
types_buffer.push_back<data_t>(NumericCast<data_t>(tag));
}

for (idx_t child_idx = 0; child_idx < child_vectors.size(); child_idx++) {
auto &child_buffer = append_data.child_data[child_idx];
auto &child = child_vectors[child_idx];
child_buffer->append_vector(*child_buffer, child, from, to, size);
child_buffer->append_vector(*child_buffer, child, 0, size, size);
}
append_data.row_count += size;
}
Expand Down
1 change: 1 addition & 0 deletions src/duckdb/src/function/cast/array_casts.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ static bool ArrayToArrayCast(Vector &source, Vector &result, idx_t count, CastPa

if (ConstantVector::IsNull(source)) {
ConstantVector::SetNull(result, true);
return true;
}

auto &source_cc = ArrayVector::GetEntry(source);
Expand Down
7 changes: 5 additions & 2 deletions src/duckdb/src/function/table/arrow_conversion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -685,7 +685,7 @@ void ArrowToDuckDBConversion::ColumnArrowToDuckDBRunEndEncoded(Vector &vector, c
FlattenRunEndsSwitch<int32_t>(vector, run_end_encoding, compressed_size, scan_offset, size);
break;
case PhysicalType::INT64:
FlattenRunEndsSwitch<int32_t>(vector, run_end_encoding, compressed_size, scan_offset, size);
FlattenRunEndsSwitch<int64_t>(vector, run_end_encoding, compressed_size, scan_offset, size);
break;
default:
throw NotImplementedException("Type '%s' not implemented for RunEndEncoding", TypeIdToString(physical_type));
Expand Down Expand Up @@ -1118,7 +1118,10 @@ void ArrowToDuckDBConversion::ColumnArrowToDuckDB(Vector &vector, ArrowArray &ar
break;
}
case LogicalTypeId::UNION: {
auto type_ids = ArrowBufferData<int8_t>(array, array.n_buffers == 1 ? 0 : 1);
auto type_ids_buffer_idx = array.n_buffers == 1 ? 0 : 1;
auto effective_offset =
GetEffectiveOffset(array, NumericCast<int64_t>(parent_offset), chunk_offset, nested_offset);
auto type_ids = ArrowBufferData<int8_t>(array, type_ids_buffer_idx) + effective_offset;
D_ASSERT(type_ids);
auto members = UnionType::CopyMemberTypes(vector.GetType());

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 "5-dev85"
#define DUCKDB_PATCH_VERSION "5-dev98"
#endif
#ifndef DUCKDB_MINOR_VERSION
#define DUCKDB_MINOR_VERSION 4
Expand All @@ -8,10 +8,10 @@
#define DUCKDB_MAJOR_VERSION 1
#endif
#ifndef DUCKDB_VERSION
#define DUCKDB_VERSION "v1.4.5-dev85"
#define DUCKDB_VERSION "v1.4.5-dev98"
#endif
#ifndef DUCKDB_SOURCE_ID
#define DUCKDB_SOURCE_ID "123e696a93"
#define DUCKDB_SOURCE_ID "3b4213a993"
#endif
#include "duckdb/function/table/system_functions.hpp"
#include "duckdb/main/database.hpp"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,11 @@ struct AlpRDScanState : public SegmentScanState {
uint8_t actual_dictionary_size =
Load<uint8_t>(segment_data + AlpRDConstants::METADATA_POINTER_SIZE + AlpRDConstants::RIGHT_BIT_WIDTH_SIZE +
AlpRDConstants::LEFT_BIT_WIDTH_SIZE);
uint8_t actual_dictionary_size_bytes = actual_dictionary_size * AlpRDConstants::DICTIONARY_ELEMENT_SIZE;
if (actual_dictionary_size > AlpRDConstants::MAX_DICTIONARY_SIZE) {
throw IOException("Corrupt database file: ALPRD dictionary size exceeds maximum");
}
idx_t actual_dictionary_size_bytes =
static_cast<idx_t>(actual_dictionary_size) * AlpRDConstants::DICTIONARY_ELEMENT_SIZE;

// Load the left parts dictionary which is after the segment header and is of a fixed size
memcpy(vector_state.left_parts_dict, (void *)(segment_data + AlpRDConstants::HEADER_SIZE),
Expand Down
11 changes: 5 additions & 6 deletions src/duckdb/src/main/connection_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,17 +38,16 @@ void ConnectionManager::AssignConnectionId(Connection &connection) {
vector<shared_ptr<ClientContext>> ConnectionManager::GetConnectionList() {
lock_guard<mutex> lock(connections_lock);
vector<shared_ptr<ClientContext>> result;
for (auto &it : connections) {
auto connection = it.second.lock();
for (auto it = connections.begin(); it != connections.end();) {
auto connection = it->second.lock();
if (!connection) {
connections.erase(it.first);
connection_count = connections.size();
continue;
it = connections.erase(it);
} else {
result.push_back(std::move(connection));
++it;
}
}

connection_count = connections.size();
return result;
}

Expand Down
5 changes: 4 additions & 1 deletion src/duckdb/src/main/secret/default_secrets.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,9 @@ unique_ptr<BaseSecret> CreateHTTPSecretFunctions::CreateHTTPSecretFromEnv(Client
secret->TrySetValue("extra_http_headers", input);
secret->TrySetValue("bearer_token", input);

//! Set redact keys
secret->redact_keys = {"http_proxy_password", "bearer_token"};

return std::move(secret);
}

Expand All @@ -100,7 +103,7 @@ unique_ptr<BaseSecret> CreateHTTPSecretFunctions::CreateHTTPSecretFromConfig(Cli
secret->TrySetValue("bearer_token", input);

//! Set redact keys
secret->redact_keys = {"http_proxy_password"};
secret->redact_keys = {"http_proxy_password", "bearer_token"};

return std::move(secret);
}
Expand Down
Loading