Skip to content

Commit 54e8e86

Browse files
committed
Remove changes added from rebase
1 parent 2e4e45e commit 54e8e86

File tree

2 files changed

+4
-25
lines changed

2 files changed

+4
-25
lines changed

cpp/src/arrow/flight/sql/odbc/odbc_impl/util.h

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -29,20 +29,6 @@
2929
#include "arrow/flight/types.h"
3030
#include "arrow/util/utf8.h"
3131

32-
#define CONVERT_WIDE_STR(wstring_var, utf8_target) \
33-
wstring_var = [&] { \
34-
arrow::Result<std::wstring> res = arrow::util::UTF8ToWideString(utf8_target); \
35-
arrow::flight::sql::odbc::util::ThrowIfNotOK(res.status()); \
36-
return res.ValueOrDie(); \
37-
}()
38-
39-
#define CONVERT_UTF8_STR(string_var, wide_str_target) \
40-
string_var = [&] { \
41-
arrow::Result<std::string> res = arrow::util::WideStringToUTF8(wide_str_target); \
42-
arrow::flight::sql::odbc::util::ThrowIfNotOK(res.status()); \
43-
return res.ValueOrDie(); \
44-
}()
45-
4632
#define CONVERT_WIDE_STR(wstring_var, utf8_target) \
4733
wstring_var = [&] { \
4834
arrow::Result<std::wstring> res = arrow::util::UTF8ToWideString(utf8_target); \

cpp/src/arrow/flight/sql/odbc/odbc_impl/util_test.cc

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,6 @@ namespace arrow::flight::sql::odbc {
3131
using util::ConvertSqlPatternToRegexString;
3232
using util::ConvertToDBMSVer;
3333

34-
class UtilTestsWithCompute : public ::testing::Test {
35-
public:
36-
// This must be done before using the compute kernels in order to
37-
// register them to the FunctionRegistry.
38-
void SetUp() override { ASSERT_OK(arrow::compute::Initialize()); }
39-
};
40-
4134
// A global test "environment", to ensure Arrow compute kernel functions are registered
4235

4336
class ComputeKernelEnvironment : public ::testing::Environment {
@@ -95,7 +88,7 @@ void TestTime64ArrayConversion(const std::vector<int64_t>& input,
9588
AssertConvertedArray(expected_array, converted_array, input.size(), arrow_type);
9689
}
9790

98-
TEST_F(UtilTestsWithCompute, Time32ToTimeStampArray) {
91+
TEST(Utils, Time32ToTimeStampArray) {
9992
std::vector<int32_t> input_data = {14896, 17820};
10093

10194
const auto seconds_from_epoch = GetTodayTimeFromEpoch();
@@ -114,7 +107,7 @@ TEST_F(UtilTestsWithCompute, Time32ToTimeStampArray) {
114107
TestTime32ArrayConversion(input_data, expected, CDataType_TIMESTAMP, Type::TIMESTAMP);
115108
}
116109

117-
TEST_F(UtilTestsWithCompute, Time64ToTimeStampArray) {
110+
TEST(Utils, Time64ToTimeStampArray) {
118111
std::vector<int64_t> input_data = {1579489200000, 1646881200000};
119112

120113
const auto seconds_from_epoch = GetTodayTimeFromEpoch();
@@ -133,15 +126,15 @@ TEST_F(UtilTestsWithCompute, Time64ToTimeStampArray) {
133126
TestTime64ArrayConversion(input_data, expected, CDataType_TIMESTAMP, Type::TIMESTAMP);
134127
}
135128

136-
TEST_F(UtilTestsWithCompute, StringToDateArray) {
129+
TEST(Utils, StringToDateArray) {
137130
std::shared_ptr<Array> expected;
138131
ArrayFromVector<Date64Type, int64_t>({1579489200000, 1646881200000}, &expected);
139132

140133
TestArrayConversion({"2020-01-20", "2022-03-10"}, expected, CDataType_DATE,
141134
Type::DATE64);
142135
}
143136

144-
TEST_F(UtilTestsWithCompute, StringToTimeArray) {
137+
TEST(Utils, StringToTimeArray) {
145138
std::shared_ptr<Array> expected;
146139
ArrayFromVector<Time64Type, int64_t>(time64(TimeUnit::MICRO),
147140
{36000000000, 43200000000}, &expected);

0 commit comments

Comments
 (0)