Skip to content

Commit bc97bd2

Browse files
committed
Fix comments and use ARROW_UNUSED
1 parent f270f85 commit bc97bd2

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

cpp/src/arrow/flight/sql/odbc/odbc_api.cc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -851,10 +851,13 @@ SQLRETURN SQLFetchScroll(SQLHSTMT stmt, SQLSMALLINT fetch_orientation,
851851
using ODBC::ODBCDescriptor;
852852
using ODBC::ODBCStatement;
853853
return ODBCStatement::ExecuteWithDiagnostics(stmt, SQL_ERROR, [=]() {
854+
// Only SQL_FETCH_NEXT forward-only fetching orientation is supported,
855+
// meaning the behavior of SQLExtendedFetch is same as SQLFetch.
854856
if (fetch_orientation != SQL_FETCH_NEXT) {
855857
throw DriverException("Optional feature not supported.", "HYC00");
856858
}
857-
// fetch_offset is ignored as only SQL_FETCH_NEXT is supported
859+
// Ignore fetch_offset as it's not applicable to SQL_FETCH_NEXT
860+
ARROW_UNUSED(fetch_offset);
858861

859862
ODBCStatement* statement = reinterpret_cast<ODBCStatement*>(stmt);
860863

0 commit comments

Comments
 (0)