Skip to content

Commit 582d99c

Browse files
authored
MINOR: [C++][FlightRPC] Clarify IsAutoUnique equivalence between ODBC 2.0 and 3.0+ (#48689)
### Rationale for this change Clarify that `IsAutoUnique()` correctly maps to both ODBC 2.0 (`AUTO_INCREMENT`) and ODBC 3.0+ (`AUTO_UNIQUE_VALUE`) concepts, resolving a TODO comment. Reference: https://learn.microsoft.com/en-us/sql/odbc/reference/syntax/sqlgettypeinfo-function?view=sql-server-ver17 ### What changes are included in this PR? Replace the todo to the explanation of the equivalence. ### Are these changes tested? No, I did not test. ### Are there any user-facing changes? No, dev-only. Authored-by: Hyukjin Kwon <[email protected]> Signed-off-by: David Li <[email protected]>
1 parent 29586f4 commit 582d99c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,9 @@ Updatability FlightSqlResultSetMetadata::GetUpdatable(int column_position) {
222222
bool FlightSqlResultSetMetadata::IsAutoUnique(int column_position) {
223223
ColumnMetadata metadata = GetMetadata(schema_->field(column_position - 1));
224224

225-
// TODO: Is AutoUnique equivalent to AutoIncrement?
225+
// AUTO_UNIQUE_VALUE (ODBC 3.0+) is equivalent to
226+
// AUTO_INCREMENT (ODBC 2.0). Both indicate columns
227+
// that automatically generate unique values.
226228
return metadata.GetIsAutoIncrement().ValueOrElse([] { return false; });
227229
}
228230

0 commit comments

Comments
 (0)