apache / apache/arrow

[C++][Arrow Flight SQL ODBC] Create different SQLGetInfo properties in `GetSqlInfo`

Open
#47,855 0 comments 0 reactions 0 assignees View on GitHub
Component: C++ Component: FlightRPC Type: enhancement
Dominant language
C++
Stars
17.1k
Forks
4.3k
Avg merge
3d 13h
Merged PRs (30d)
88

Description

### Describe the enhancement requested

This issue is an optional one to consider.
Currently, `GetSqlInfo` doesn't have any additional properties. One can create custom properties in `GetSqlInfo` so that the ODBC can use these properties directly. The goals is to have 1 property per `case` statement For example, instead of:
```
case SqlInfoOptions::FLIGHT_SQL_SERVER_NAME: {
std::string server_name(
reinterpret_cast(scalar->child_value().get())->view());

info_[SQL_SERVER_NAME] = server_name;
info_[SQL_DBMS_NAME] = server_name;
info_[SQL_DATABASE_NAME] = server_name;
break;
}
```
we have:
```
case SqlInfoOptions::FLIGHT_SQL_SERVER_NAME: {
info_[SQL_SERVER_NAME] = server_name;
break;
}
case SQL_DBMS_NAME: {
info_[SQL_DBMS_NAME] = dbms_name;
break;
}
case SQL_DATABASE_NAME: {
info_[SQL_DATABASE_NAME] = database_name;
break;
}
```

`GetSqlInfo` current definition:
https://github.com/apache/arrow/blob/bab558061696ddc1841148d6210424b12923d48e/cpp/src/arrow/flight/sql/client.cc#L558-L564

Parent issue: https://github.com/apache/arrow/issues/30622
### Component(s)

FlightRPC, C++

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.