Skip to content

Commit

Permalink
Enabling tests for flightsql-odbc fix for Conversions to SQL_C_NUMERI…
Browse files Browse the repository at this point in the history
…C from any type fails

Enabling UT for conversion to SQL_C_NUMERIC from bigint, integer, float, double,decimal and numeric.

Enabling UT for conversion numeric and decimal to SQL_C_CHAR, SQL_C_WCHAR, SQL_C_NUMERIC, SQL_C_SBIGINT, QL_C_UBIGINT, SQL_C_SSHORT, SQL_C_USHORT, SQL_C_SLONG, SQL_C_ULONG, SQL_C_SLONG, SQL_C_ULONG, SQL_C_FLOAT, SQL_C_DOUBLE.

Also enabling UT for FloatingPointEdgeCombinations

Change-Id: I50825d9fd0a8a22046456cb85c63c6bfd97b1ade
  • Loading branch information
Eugene Roslikov committed Jun 28, 2022
1 parent 2f69460 commit 1353de4
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 26 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -573,7 +573,7 @@ if (NOT ODBCABSTRACTION_GIT_TAG)
if (DEFINED ENV{ODBCABSTRACTION_GIT_TAG})
set(ODBCABSTRACTION_GIT_TAG "$ENV{ODBCABSTRACTION_GIT_TAG}")
else()
set(ODBCABSTRACTION_GIT_TAG "c0ccf3535397d22c879cafb3dea0b28a144207b8")
set(ODBCABSTRACTION_GIT_TAG "da51457dbf7612eed336db06f1fca51f0b83e12a")
endif()
endif()

Expand Down
2 changes: 1 addition & 1 deletion build-debug.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ cd _build
ARROW_GIT_REPOSITORY="${ARROW_GIT_REPOSITORY:=https://github.com/apache/arrow}"
ARROW_GIT_TAG="${ARROW_GIT_TAG:=b050bd0d31db6412256cec3362c0d57c9732e1f2}"
ODBCABSTRACTION_REPO="${ODBCABSTRACTION_REPO:=/opt/flightsql-odbc}"
ODBCABSTRACTION_GIT_TAG="${ODBCABSTRACTION_GIT_TAG:=c0ccf3535397d22c879cafb3dea0b28a144207b8}"
ODBCABSTRACTION_GIT_TAG="${ODBCABSTRACTION_GIT_TAG:=da51457dbf7612eed336db06f1fca51f0b83e12a}"

cmake \
-GNinja \
Expand Down
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ cd _build
ARROW_GIT_REPOSITORY="${ARROW_GIT_REPOSITORY:=https://github.com/apache/arrow}"
ARROW_GIT_TAG="${ARROW_GIT_TAG:=b050bd0d31db6412256cec3362c0d57c9732e1f2}"
ODBCABSTRACTION_REPO="${ODBCABSTRACTION_REPO:=/opt/flightsql-odbc}"
ODBCABSTRACTION_GIT_TAG="${ODBCABSTRACTION_GIT_TAG:=c0ccf3535397d22c879cafb3dea0b28a144207b8}"
ODBCABSTRACTION_GIT_TAG="${ODBCABSTRACTION_GIT_TAG:=da51457dbf7612eed336db06f1fca51f0b83e12a}"

cmake \
-GNinja \
Expand Down
2 changes: 1 addition & 1 deletion build_osx.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ cd build
ARROW_GIT_REPOSITORY="${ARROW_GIT_REPOSITORY:=https://github.com/apache/arrow}"
ARROW_GIT_TAG="${ARROW_GIT_TAG:=b050bd0d31db6412256cec3362c0d57c9732e1f2}"
ODBCABSTRACTION_REPO="${ODBCABSTRACTION_REPO:=../flightsql-odbc}"
ODBCABSTRACTION_GIT_TAG="${ODBCABSTRACTION_GIT_TAG:=c0ccf3535397d22c879cafb3dea0b28a144207b8}"
ODBCABSTRACTION_GIT_TAG="${ODBCABSTRACTION_GIT_TAG:=da51457dbf7612eed336db06f1fca51f0b83e12a}"

cmake \
-DCMAKE_BUILD_TYPE=Release \
Expand Down
2 changes: 1 addition & 1 deletion build_win32.bat
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ SETLOCAL
if NOT DEFINED ARROW_GIT_REPOSITORY SET ARROW_GIT_REPOSITORY="https://github.com/apache/arrow"
if NOT DEFINED ARROW_GIT_TAG SET ARROW_GIT_TAG="b050bd0d31db6412256cec3362c0d57c9732e1f2"
if NOT DEFINED ODBCABSTRACTION_REPO SET ODBCABSTRACTION_REPO="../flightsql-odbc"
if NOT DEFINED ODBCABSTRACTION_GIT_TAG SET ODBCABSTRACTION_GIT_TAG="c0ccf3535397d22c879cafb3dea0b28a144207b8"
if NOT DEFINED ODBCABSTRACTION_GIT_TAG SET ODBCABSTRACTION_GIT_TAG="da51457dbf7612eed336db06f1fca51f0b83e12a"

cmake ..^
-DARROW_GIT_REPOSITORY=%ARROW_GIT_REPOSITORY%^
Expand Down
2 changes: 1 addition & 1 deletion build_win64.bat
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ SETLOCAL
if NOT DEFINED ARROW_GIT_REPOSITORY SET ARROW_GIT_REPOSITORY="https://github.com/apache/arrow"
if NOT DEFINED ARROW_GIT_TAG SET ARROW_GIT_TAG="b050bd0d31db6412256cec3362c0d57c9732e1f2"
if NOT DEFINED ODBCABSTRACTION_REPO SET ODBCABSTRACTION_REPO="../flightsql-odbc"
if NOT DEFINED ODBCABSTRACTION_GIT_TAG SET ODBCABSTRACTION_GIT_TAG="c0ccf3535397d22c879cafb3dea0b28a144207b8"
if NOT DEFINED ODBCABSTRACTION_GIT_TAG SET ODBCABSTRACTION_GIT_TAG="da51457dbf7612eed336db06f1fca51f0b83e12a"

cmake ..^
-DARROW_GIT_REPOSITORY=%ARROW_GIT_REPOSITORY%^
Expand Down
40 changes: 20 additions & 20 deletions src/test/src/result-conversions-test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1463,7 +1463,7 @@ INSTANTIATE_TEST_SUITE_P(Integers, ResultConversionsTest,
std::pair<int, std::string>(SQL_C_CHAR, "SQL_C_CHAR"),
std::pair<int, std::string>(SQL_C_WCHAR, "SQL_C_WCHAR"),
std::pair<int, std::string>(SQL_C_BIT, "SQL_C_BIT"),
// std::pair<int, std::string>(SQL_C_NUMERIC, "SQL_C_NUMERIC"), // TODO: Fix Integer to Numeric conversions
std::pair<int, std::string>(SQL_C_NUMERIC, "SQL_C_NUMERIC"),
// std::pair<int, std::string>(SQL_C_STINYINT, "SQL_C_STINYINT"),
// std::pair<int, std::string>(SQL_C_UTINYINT, "SQL_C_UTINYINT"),
std::pair<int, std::string>(SQL_C_SBIGINT, "SQL_C_SBIGINT"),
Expand All @@ -1472,7 +1472,7 @@ INSTANTIATE_TEST_SUITE_P(Integers, ResultConversionsTest,
// std::pair<int, std::string>(SQL_C_USHORT, "SQL_C_USHORT"),
std::pair<int, std::string>(SQL_C_SLONG, "SQL_C_SLONG"),
std::pair<int, std::string>(SQL_C_ULONG, "SQL_C_ULONG"),
// std::pair<int, std::string>(SQL_C_FLOAT, "SQL_C_FLOAT"), // TODO: Fix Integer to Float conversions
// std::pair<int, std::string>(SQL_C_FLOAT, "SQL_C_FLOAT"),
std::pair<int, std::string>(SQL_C_DOUBLE, "SQL_C_DOUBLE"),
// std::pair<int, std::string>(SQL_C_BINARY, "SQL_C_BINARY"), // TODO: Fix Integer to Binary conversions
std::pair<int, std::string>(SQL_C_BOOKMARK, "SQL_C_BOOKMARK"),
Expand All @@ -1482,7 +1482,7 @@ INSTANTIATE_TEST_SUITE_P(Integers, ResultConversionsTest,
)
);

INSTANTIATE_TEST_SUITE_P(DISABLED_FloatingPoint, ResultConversionsTest,
INSTANTIATE_TEST_SUITE_P(FloatingPoint, ResultConversionsTest,
::testing::Combine(
::testing::ValuesIn(
std::vector {
Expand All @@ -1494,20 +1494,20 @@ INSTANTIATE_TEST_SUITE_P(DISABLED_FloatingPoint, ResultConversionsTest,
std::vector {
std::pair<int, std::string>(SQL_C_CHAR, "SQL_C_CHAR"),
std::pair<int, std::string>(SQL_C_WCHAR, "SQL_C_WCHAR"),
std::pair<int, std::string>(SQL_C_BIT, "SQL_C_BIT"),
// std::pair<int, std::string>(SQL_C_NUMERIC, "SQL_C_NUMERIC"),
std::pair<int, std::string>(SQL_C_STINYINT, "SQL_C_STINYINT"),
std::pair<int, std::string>(SQL_C_UTINYINT, "SQL_C_UTINYINT"),
std::pair<int, std::string>(SQL_C_SBIGINT, "SQL_C_SBIGINT"),
std::pair<int, std::string>(SQL_C_UBIGINT, "SQL_C_UBIGINT"),
std::pair<int, std::string>(SQL_C_SSHORT, "SQL_C_SSHORT"),
std::pair<int, std::string>(SQL_C_USHORT, "SQL_C_USHORT"),
std::pair<int, std::string>(SQL_C_SLONG, "SQL_C_SLONG"),
std::pair<int, std::string>(SQL_C_ULONG, "SQL_C_ULONG"),
// std::pair<int, std::string>(SQL_C_BIT, "SQL_C_BIT"),
std::pair<int, std::string>(SQL_C_NUMERIC, "SQL_C_NUMERIC"),
// std::pair<int, std::string>(SQL_C_STINYINT, "SQL_C_STINYINT"),
// std::pair<int, std::string>(SQL_C_UTINYINT, "SQL_C_UTINYINT"),
// std::pair<int, std::string>(SQL_C_SBIGINT, "SQL_C_SBIGINT"),
// std::pair<int, std::string>(SQL_C_UBIGINT, "SQL_C_UBIGINT"),
// std::pair<int, std::string>(SQL_C_SSHORT, "SQL_C_SSHORT"),
// std::pair<int, std::string>(SQL_C_USHORT, "SQL_C_USHORT"),
// std::pair<int, std::string>(SQL_C_SLONG, "SQL_C_SLONG"),
// std::pair<int, std::string>(SQL_C_ULONG, "SQL_C_ULONG"),
std::pair<int, std::string>(SQL_C_FLOAT, "SQL_C_FLOAT"),
std::pair<int, std::string>(SQL_C_DOUBLE, "SQL_C_DOUBLE"),
// std::pair<int, std::string>(SQL_C_BINARY, "SQL_C_BINARY"),
std::pair<int, std::string>(SQL_C_BOOKMARK, "SQL_C_BOOKMARK"),
// std::pair<int, std::string>(SQL_C_BOOKMARK, "SQL_C_BOOKMARK"),
// std::pair<int, std::string>(SQL_C_VARBOOKMARK, "SQL_C_VARBOOKMARK"),
}
)
Expand Down Expand Up @@ -1618,7 +1618,7 @@ INSTANTIATE_TEST_SUITE_P(Timestamp, ResultConversionsTest,
)
);

INSTANTIATE_TEST_SUITE_P(DISABLED_NumericAndDecimal, ResultConversionsTest,
INSTANTIATE_TEST_SUITE_P(NumericAndDecimal, ResultConversionsTest,
::testing::Combine(
::testing::ValuesIn(
std::vector {
Expand All @@ -1630,10 +1630,10 @@ INSTANTIATE_TEST_SUITE_P(DISABLED_NumericAndDecimal, ResultConversionsTest,
std::vector {
std::pair<int, std::string>(SQL_C_CHAR, "SQL_C_CHAR"),
std::pair<int, std::string>(SQL_C_WCHAR, "SQL_C_WCHAR"),
std::pair<int, std::string>(SQL_C_BIT, "SQL_C_BIT"),
// std::pair<int, std::string>(SQL_C_BIT, "SQL_C_BIT"),
std::pair<int, std::string>(SQL_C_NUMERIC, "SQL_C_NUMERIC"),
std::pair<int, std::string>(SQL_C_STINYINT, "SQL_C_STINYINT"),
std::pair<int, std::string>(SQL_C_UTINYINT, "SQL_C_UTINYINT"),
// std::pair<int, std::string>(SQL_C_STINYINT, "SQL_C_STINYINT"),
// std::pair<int, std::string>(SQL_C_UTINYINT, "SQL_C_UTINYINT"),
std::pair<int, std::string>(SQL_C_SBIGINT, "SQL_C_SBIGINT"),
std::pair<int, std::string>(SQL_C_UBIGINT, "SQL_C_UBIGINT"),
std::pair<int, std::string>(SQL_C_SSHORT, "SQL_C_SSHORT"),
Expand All @@ -1642,13 +1642,13 @@ INSTANTIATE_TEST_SUITE_P(DISABLED_NumericAndDecimal, ResultConversionsTest,
std::pair<int, std::string>(SQL_C_ULONG, "SQL_C_ULONG"),
std::pair<int, std::string>(SQL_C_FLOAT, "SQL_C_FLOAT"),
std::pair<int, std::string>(SQL_C_DOUBLE, "SQL_C_DOUBLE"),
std::pair<int, std::string>(SQL_C_BINARY, "SQL_C_BINARY"),
// std::pair<int, std::string>(SQL_C_BINARY, "SQL_C_BINARY"),
}
)
)
);

INSTANTIATE_TEST_SUITE_P(DISABLED_FloatingPointEdgeCombinations, ResultConversionsTest,
INSTANTIATE_TEST_SUITE_P(FloatingPointEdgeCombinations, ResultConversionsTest,
::testing::Combine(
::testing::ValuesIn(floating_point_edge_cases),
::testing::ValuesIn(
Expand Down

0 comments on commit 1353de4

Please sign in to comment.