From 70af65f7b32919c7d6565cb981507ffd1d28c73f Mon Sep 17 00:00:00 2001 From: Pedro Holanda Date: Fri, 21 Jul 2023 13:08:09 +0200 Subject: [PATCH] Updating to get arrow appender options from the client context --- src/arrow_to_ipc.cpp | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/arrow_to_ipc.cpp b/src/arrow_to_ipc.cpp index e1e70e0..b03773c 100644 --- a/src/arrow_to_ipc.cpp +++ b/src/arrow_to_ipc.cpp @@ -22,7 +22,7 @@ #include "duckdb/common/arrow/arrow_converter.hpp" #include "duckdb/parser/parsed_data/create_table_function_info.hpp" #include "duckdb/function/table/arrow.hpp" -#include "duckdb/common/arrow/arrow_options.hpp" +#include "duckdb/main/client_properties.hpp" #endif namespace duckdb { @@ -72,10 +72,7 @@ unique_ptr ToArrowIPCFunction::Bind(ClientContext &context, TableF // Create the Arrow schema ArrowSchema schema; - ArrowOptions options; - options.time_zone = context.GetClientProperties().time_zone; - options.offset_size = ArrowOffsetSize::REGULAR; - ArrowConverter::ToArrowSchema(&schema, input.input_table_types, input.input_table_names, options); + ArrowConverter::ToArrowSchema(&schema, input.input_table_types, input.input_table_names, context.GetClientProperties()); result->schema = arrow::ImportSchema(&schema).ValueOrDie(); return std::move(result); @@ -91,9 +88,6 @@ OperatorResultType ToArrowIPCFunction::Function(ExecutionContext &context, Table bool sending_schema = false; bool caching_disabled = context.pipeline && !context.pipeline->GetSink(); - ArrowOptions options; - options.offset_size = ArrowOffsetSize::REGULAR; -// bool caching_disabled = true; if (!local_state.checked_schema) { if (!global_state.sent_schema) { @@ -113,7 +107,7 @@ OperatorResultType ToArrowIPCFunction::Function(ExecutionContext &context, Table output.data[1].SetValue(0, Value::BOOLEAN(1)); } else { if (!local_state.appender) { - local_state.appender = make_uniq(input.GetTypes(), data.chunk_size, options); + local_state.appender = make_uniq(input.GetTypes(), data.chunk_size, context.client.GetClientProperties()); } // Append input chunk