-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Description
Describe the enhancement requested
Current behavior:
flightsql-odbc
backend doesn't differentiate between SQL_PRED_CHAR
, SQL_PRED_BASIC
, and SQL_SEARCHABLE
. SQL_SEARCHABLE
is returned by default when the Arrow data type is searchable. This causes a problem because types like bit
is searchable, but it is generally not supported in LIKE
clause, so SQL_PRED_BASIC
is more appropriate compared to SQL_SEARCHABLE
.
This is a minor issue that's not impacting most BI tools.
arrow/cpp/src/arrow/flight/sql/odbc/flight_sql/flight_sql_statement_get_type_info.cc
Lines 117 to 118 in 596a60f
data.searchable = reader.GetSearchable() ? odbcabstraction::SEARCHABILITY_ALL | |
: odbcabstraction::SEARCHABILITY_NONE; |
SQLGetTypeInfo spec for reference on definitions of SQL_PRED_*
: https://learn.microsoft.com/en-us/sql/odbc/reference/syntax/SQLGetTypeInfo-function?view=sql-server-ver17
AC:
- When a data type is
searchable
, the ODBC should returnSQL_PRED_CHAR
orSQL_PRED_BASIC
for the appropriate data types
Parent issue: #30622
Component(s)
C++, FlightRPC