diff --git a/cpp/src/arrow/flight/sql/odbc/odbc_impl/odbc_statement.cc b/cpp/src/arrow/flight/sql/odbc/odbc_impl/odbc_statement.cc index 159c58102c3..c77e97934ae 100644 --- a/cpp/src/arrow/flight/sql/odbc/odbc_impl/odbc_statement.cc +++ b/cpp/src/arrow/flight/sql/odbc/odbc_impl/odbc_statement.cc @@ -747,8 +747,8 @@ SQLRETURN ODBCStatement::GetData(SQLSMALLINT record_number, SQLSMALLINT c_type, // Get precision and scale from IRD (implementation row descriptor) as defaults. // These can be overridden by ARD (application row descriptor) if specified. const DescriptorRecord& ird_record = ird_->GetRecords()[record_number - 1]; - int precision = - ird_record.precision > 0 ? ird_record.precision : Decimal128Type::kMaxPrecision; + int precision = ird_record.precision > 0 ? ird_record.precision + : arrow::Decimal128Type::kMaxPrecision; int scale = ird_record.scale; if (c_type == SQL_ARD_TYPE) {