vikrantpuppala commented on code in PR #50853:
URL: https://github.com/apache/arrow/pull/50853#discussion_r3806561667


##########
cpp/src/arrow/flight/sql/odbc/odbc_impl/odbc_descriptor.cc:
##########
@@ -215,7 +215,7 @@ void ODBCDescriptor::SetField(SQLSMALLINT record_number, 
SQLSMALLINT field_ident
       has_bindings_changed_ = true;
       break;
     case SQL_DESC_NAME:
-      SetAttributeUTF8(value, buffer_length, record.name);
+      SetAttributeSQLWCHAR(value, buffer_length, record.name);

Review Comment:
   Good catch — added `ODBCDescriptorTest.SetGetNameWideRoundTrips` in 
`odbc_descriptor_test.cc`, a direct `SetField`/`GetField` round-trip on 
`SQL_DESC_NAME` with a multi-character wide name. It passes with the fix and 
fails without it (the byte-wise decode corrupts the stored UTF-16, which the 
wide getter then rejects). A black-box test isn't possible here since there's 
no `SQLSetDescField` entry point wired up, so the unit test on `ODBCDescriptor` 
covers it directly.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to