Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
404d074
Implement SQLGetInfo
rscales Jun 19, 2025
17417e1
Add build related directories to git ignore
rscales Jun 20, 2025
ddef36c
Update based on comments from draft review
rscales Jun 20, 2025
9b86d58
Add tests for DBMS Product Information
rscales Jun 20, 2025
14948b5
Move validation check to within ExecuteWithDiagnostics lambda
rscales Jun 20, 2025
50c6ae0
Move helper functions to top of file
rscales Jun 21, 2025
01aca6f
Add tests for Data Source Information
rscales Jun 21, 2025
6ee5e08
Add tests for Supported SQL
rscales Jun 23, 2025
0856fc4
Add tests for SQL Limits
rscales Jun 23, 2025
f532c12
Add tests for Scalar Function Information
rscales Jun 23, 2025
562057b
Add tests for Conversion Information
rscales Jun 23, 2025
f9e6f54
Move connection info test to be above connection test file
rscales Jun 23, 2025
27f5b5f
Change to use compact namespace inclusion
rscales Jun 23, 2025
e8747d3
Clean up comments
rscales Jun 23, 2025
7c5c27d
Allow validation of wchar string when truncation occurs
rscales Jun 23, 2025
74a406b
Fix comment for failing test case
rscales Jun 23, 2025
9026501
Add default values in get info cache for missing types
rscales Jun 25, 2025
824ec82
Reformat connection info test cases
rscales Jun 25, 2025
5311299
Update default value for SQL_TIMEDATE_FUNCTIONS to show support for a…
rscales Jun 25, 2025
dc767b2
Merge branch 'apache-odbc' into sql-get-info
rscales Jun 25, 2025
214f1a4
Empty commit to force running workflows
rscales Jun 25, 2025
44d9f86
Merge branch 'sql-get-info' of https://github.com/Bit-Quill/arrow int…
rscales Jun 25, 2025
4ad8ef8
Merge branch 'apache-odbc' into sql-get-info
rscales Jun 26, 2025
ce4b702
Use bitmasks to create value for SQL_AGGREGATE_FUNCTIONS
rscales Jun 26, 2025
e7f7493
Use bitmasks to create value for SQL_TIMEDATE_ADD_INTERVALS
rscales Jun 26, 2025
ca3137b
Use bitmask to create default value for SQL_TIMEDATE_DIFF_INTERVALS
rscales Jun 26, 2025
443f4dc
Use bitmask to create default value for SQL_GETDATA_EXTENSIONS
rscales Jun 26, 2025
070ec90
Use default value for SQL_CURSOR_SENSITIVITY
rscales Jun 26, 2025
bca7792
Add error code to default return for odbc connection get info
rscales Jun 26, 2025
8dbb6bd
Update connection info test to use arrow::flight::sql::odbc namespace
rscales Jun 26, 2025
5b3348e
Update to use defined values from sqlext.h
rscales Jun 27, 2025
e385eed
Return error code HY096 for invalid attributes in or out of expected …
rscales Jul 3, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions cpp/src/arrow/flight/sql/odbc/flight_sql/get_info_cache.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1173,6 +1173,7 @@ void GetInfoCache::LoadDefaultsForMissingEntries() {
SetDefaultIfMissing(info_, SQL_CONVERT_DECIMAL, static_cast<uint32_t>(0));
SetDefaultIfMissing(info_, SQL_CONVERT_DOUBLE, static_cast<uint32_t>(0));
SetDefaultIfMissing(info_, SQL_CONVERT_FLOAT, static_cast<uint32_t>(0));
SetDefaultIfMissing(info_, SQL_CONVERT_FUNCTIONS, static_cast<uint32_t>(0));
SetDefaultIfMissing(info_, SQL_CONVERT_GUID, static_cast<uint32_t>(0));
SetDefaultIfMissing(info_, SQL_CONVERT_INTEGER, static_cast<uint32_t>(0));
Comment thread
rscales marked this conversation as resolved.
SetDefaultIfMissing(info_, SQL_CONVERT_INTERVAL_YEAR_MONTH, static_cast<uint32_t>(0));
Expand Down Expand Up @@ -1251,6 +1252,7 @@ void GetInfoCache::LoadDefaultsForMissingEntries() {
SetDefaultIfMissing(info_, SQL_MAX_COLUMNS_IN_ORDER_BY, static_cast<uint16_t>(0));
SetDefaultIfMissing(info_, SQL_MAX_COLUMNS_IN_SELECT, static_cast<uint16_t>(0));
SetDefaultIfMissing(info_, SQL_MAX_COLUMNS_IN_TABLE, static_cast<uint16_t>(0));
SetDefaultIfMissing(info_, SQL_MAX_CONCURRENT_ACTIVITIES, static_cast<uint16_t>(0));
SetDefaultIfMissing(info_, SQL_MAX_CURSOR_NAME_LEN, static_cast<uint16_t>(0));
SetDefaultIfMissing(info_, SQL_MAX_DRIVER_CONNECTIONS, static_cast<uint16_t>(0));
SetDefaultIfMissing(info_, SQL_MAX_IDENTIFIER_LEN, static_cast<uint16_t>(65535));
Expand All @@ -1270,6 +1272,7 @@ void GetInfoCache::LoadDefaultsForMissingEntries() {
SetDefaultIfMissing(info_, SQL_OJ_CAPABILITIES,
static_cast<uint32_t>(SQL_OJ_LEFT | SQL_OJ_RIGHT | SQL_OJ_FULL));
SetDefaultIfMissing(info_, SQL_ORDER_BY_COLUMNS_IN_SELECT, "Y");
SetDefaultIfMissing(info_, SQL_OUTER_JOINS, "N");
SetDefaultIfMissing(info_, SQL_PROCEDURE_TERM, "");
SetDefaultIfMissing(info_, SQL_PROCEDURES, "N");
SetDefaultIfMissing(info_, SQL_QUOTED_IDENTIFIER_CASE,
Expand All @@ -1278,6 +1281,7 @@ void GetInfoCache::LoadDefaultsForMissingEntries() {
SetDefaultIfMissing(info_, SQL_SCHEMA_USAGE,
static_cast<uint32_t>(SQL_SU_DML_STATEMENTS));
SetDefaultIfMissing(info_, SQL_SEARCH_PATTERN_ESCAPE, "\\");
SetDefaultIfMissing(info_, SQL_SPECIAL_CHARACTERS, "");
SetDefaultIfMissing(
info_, SQL_SERVER_NAME,
"Arrow Flight SQL Server"); // This might actually need to be the hostname.
Expand Down Expand Up @@ -1332,6 +1336,7 @@ void GetInfoCache::LoadDefaultsForMissingEntries() {
SQL_FN_TSI_FRAC_SECOND | SQL_FN_TSI_SECOND | SQL_FN_TSI_MINUTE |
SQL_FN_TSI_HOUR | SQL_FN_TSI_DAY | SQL_FN_TSI_WEEK |
SQL_FN_TSI_MONTH | SQL_FN_TSI_QUARTER | SQL_FN_TSI_YEAR));
SetDefaultIfMissing(info_, SQL_TIMEDATE_FUNCTIONS, static_cast<uint32_t>(0));
Comment thread
rscales marked this conversation as resolved.
Outdated
Comment thread
rscales marked this conversation as resolved.
Outdated
SetDefaultIfMissing(info_, SQL_UNION,
static_cast<uint32_t>(SQL_U_UNION | SQL_U_UNION_ALL));
SetDefaultIfMissing(info_, SQL_XOPEN_CLI_YEAR, "1995");
Expand Down
23 changes: 6 additions & 17 deletions cpp/src/arrow/flight/sql/odbc/tests/connection_info_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -358,8 +358,6 @@ TYPED_TEST(FlightSQLODBCTestBase, Test_SQL_MAX_ASYNC_CONCURRENT_STATEMENTS) {
}

TYPED_TEST(FlightSQLODBCTestBase, Test_SQL_MAX_CONCURRENT_ACTIVITIES) {
// TODO Call to GetInfo returns SQL_ERROR
GTEST_SKIP();
this->connect();

validate(this->conn, SQL_MAX_CONCURRENT_ACTIVITIES, static_cast<SQLUSMALLINT>(0));
Expand Down Expand Up @@ -997,13 +995,10 @@ TEST_F(FlightSQLODBCMockTestBase, Test_SQL_ORDER_BY_COLUMNS_IN_SELECT) {
this->disconnect();
}

TYPED_TEST(FlightSQLODBCTestBase, Test_SQL_OUTER_JOINS) {
// Not documented in SQLGetInfo, but other drivers return Y/N
// TODO Call to GetInfo returns SQL_ERROR
GTEST_SKIP();
TEST_F(FlightSQLODBCMockTestBase, Test_SQL_OUTER_JOINS) {
this->connect();

validate(conn, SQL_OUTER_JOINS, L"Y");
validate(conn, SQL_OUTER_JOINS, L"N");

this->disconnect();
}
Expand Down Expand Up @@ -1033,8 +1028,6 @@ TEST_F(FlightSQLODBCMockTestBase, Test_SQL_SCHEMA_USAGE) {
}

TYPED_TEST(FlightSQLODBCTestBase, Test_SQL_SPECIAL_CHARACTERS) {
// TODO Call to GetInfo returns SQL_ERROR
GTEST_SKIP();
this->connect();

validate(conn, SQL_SPECIAL_CHARACTERS, L"");
Expand Down Expand Up @@ -1230,12 +1223,10 @@ TEST_F(FlightSQLODBCMockTestBase, Test_SQL_MAX_USER_NAME_LEN) {

// Scalar Function Information

TYPED_TEST(FlightSQLODBCTestBase, Test_SQL_CONVERT_FUNCTIONS) {
// TODO Call to GetInfo returns SQL_ERROR
GTEST_SKIP();
TEST_F(FlightSQLODBCMockTestBase, Test_SQL_CONVERT_FUNCTIONS) {
this->connect();

validate(conn, SQL_CONVERT_FUNCTIONS, static_cast<SQLUINTEGER>(3435973836));
validate(conn, SQL_CONVERT_FUNCTIONS, static_cast<SQLUINTEGER>(0));

this->disconnect();
}
Expand Down Expand Up @@ -1280,12 +1271,10 @@ TYPED_TEST(FlightSQLODBCTestBase, Test_SQL_TIMEDATE_DIFF_INTERVALS) {
this->disconnect();
}

TYPED_TEST(FlightSQLODBCTestBase, Test_SQL_TIMEDATE_FUNCTIONS) {
// TODO Call to GetInfo returns SQL_ERROR
GTEST_SKIP();
TEST_F(FlightSQLODBCMockTestBase, Test_SQL_TIMEDATE_FUNCTIONS) {
this->connect();

validate(conn, SQL_TIMEDATE_FUNCTIONS, static_cast<SQLUINTEGER>(3435973836));
validate(conn, SQL_TIMEDATE_FUNCTIONS, static_cast<SQLUINTEGER>(0));

this->disconnect();
}
Expand Down