@@ -29,6 +29,7 @@ namespace {
2929
3030 bool const strings_as_strings = false ;
3131 bool const strings_as_dictionaries = true ;
32+ bool const truncate_timestamps = true ;
3233
3334 bool const plain_integers = false ;
3435 bool const compressed_integers = true ;
@@ -129,7 +130,7 @@ class ArrowResultSetTest : public ::testing::Test {
129130 auto schema = std::make_shared<arrow::Schema>(expected_fields);
130131 std::shared_ptr<arrow::Table> expected_table = arrow::Table::Make (schema, expected_arrays);
131132
132- turbodbc_arrow::arrow_result_set ars (rs, strings_as_dictionary, adaptive_integers);
133+ turbodbc_arrow::arrow_result_set ars (rs, strings_as_dictionary, adaptive_integers, truncate_timestamps );
133134 std::shared_ptr<arrow::Table> table;
134135 ASSERT_OK (ars.fetch_all_native (&table, false ));
135136 ASSERT_TRUE (expected_table->Equals (*table));
@@ -151,7 +152,7 @@ TEST_F(ArrowResultSetTest, SimpleSchemaConversion)
151152 " int_column" , turbodbc::type_code::integer, size_unimportant, true }};
152153 EXPECT_CALL (rs, do_get_column_info ()).WillRepeatedly (testing::Return (expected));
153154
154- turbodbc_arrow::arrow_result_set ars (rs, strings_as_strings, plain_integers);
155+ turbodbc_arrow::arrow_result_set ars (rs, strings_as_strings, plain_integers, truncate_timestamps );
155156 auto schema = ars.schema ();
156157 ASSERT_EQ (schema->num_fields (), 1 );
157158 auto field = schema->field (0 );
@@ -191,7 +192,7 @@ TEST_F(ArrowResultSetTest, AllTypesSchemaConversion)
191192 std::make_shared<arrow::Field>(" nonnull_int_column" , arrow::int64 (), false )
192193 };
193194
194- turbodbc_arrow::arrow_result_set ars (rs, strings_as_strings, plain_integers);
195+ turbodbc_arrow::arrow_result_set ars (rs, strings_as_strings, plain_integers, truncate_timestamps );
195196 auto schema = ars.schema ();
196197
197198 ASSERT_EQ (schema->num_fields (), 12 );
@@ -225,7 +226,7 @@ TEST_F(ArrowResultSetTest, SingleBatchSingleColumnResultSetConversion)
225226 EXPECT_CALL (rs, do_get_buffers ()).WillOnce (testing::Return (expected_buffers));
226227 EXPECT_CALL (rs, do_fetch_next_batch ()).WillOnce (testing::Return (OUTPUT_SIZE)).WillOnce (testing::Return (0 ));
227228
228- turbodbc_arrow::arrow_result_set ars (rs, strings_as_strings, plain_integers);
229+ turbodbc_arrow::arrow_result_set ars (rs, strings_as_strings, plain_integers, truncate_timestamps );
229230 std::shared_ptr<arrow::Table> table;
230231 ASSERT_OK (ars.fetch_all_native (&table, false ));
231232 ASSERT_TRUE (expected_table->Equals (*table));
0 commit comments