Skip to content

Commit

Permalink
Properly pass down ClientContext to ClientProperties, to be used in A…
Browse files Browse the repository at this point in the history
…rrow conversion
  • Loading branch information
carlopi committed Feb 5, 2025
1 parent 23d7340 commit d21c223
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 82 deletions.
6 changes: 3 additions & 3 deletions lib/src/webdb.cc
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ arrow::Result<std::shared_ptr<arrow::Buffer>> WebDB::Connection::MaterializeQuer

// Configure the output writer
ArrowSchema raw_schema;
ClientProperties options;
ClientProperties options("UTC", ArrowOffsetSize::REGULAR, false, false, false, connection_.context);
unordered_map<idx_t, const shared_ptr<ArrowTypeExtensionData>> extension_type_cast;
options.arrow_offset_size = ArrowOffsetSize::REGULAR;
ArrowConverter::ToArrowSchema(&raw_schema, result->types, result->names, options);
Expand Down Expand Up @@ -139,7 +139,7 @@ arrow::Result<std::shared_ptr<arrow::Buffer>> WebDB::Connection::StreamQueryResu

// Import the schema
ArrowSchema raw_schema;
ClientProperties options;
ClientProperties options("UTC", ArrowOffsetSize::REGULAR, false, false, false, connection_.context);
options.arrow_offset_size = ArrowOffsetSize::REGULAR;
ArrowConverter::ToArrowSchema(&raw_schema, current_query_result_->types, current_query_result_->names, options);
ARROW_ASSIGN_OR_RAISE(current_schema_, arrow::ImportSchema(&raw_schema));
Expand Down Expand Up @@ -251,7 +251,7 @@ arrow::Result<std::shared_ptr<arrow::Buffer>> WebDB::Connection::FetchQueryResul

// Serialize the record batch
ArrowArray array;
ClientProperties arrow_options;
ClientProperties arrow_options("UTC", ArrowOffsetSize::REGULAR, false, false, false, connection_.context);
unordered_map<idx_t, const shared_ptr<ArrowTypeExtensionData>> extension_type_cast;
arrow_options.arrow_offset_size = ArrowOffsetSize::REGULAR;
ArrowConverter::ToArrowArray(*chunk, &array, arrow_options, extension_type_cast);
Expand Down
12 changes: 0 additions & 12 deletions patches/duckdb/add_constructor_client_properties.patch

This file was deleted.

15 changes: 0 additions & 15 deletions patches/duckdb/arrow_appender_opt_client_context.patch

This file was deleted.

52 changes: 0 additions & 52 deletions patches/duckdb/arrow_converter_opt_client_context.patch

This file was deleted.

0 comments on commit d21c223

Please sign in to comment.