impl(bq_driver): Add impl for SQL_ATTR_ANSI_APP attribute - #1637
Open
NeerajDwivedii wants to merge 2 commits into
Open
impl(bq_driver): Add impl for SQL_ATTR_ANSI_APP attribute#1637NeerajDwivedii wants to merge 2 commits into
NeerajDwivedii wants to merge 2 commits into
Conversation
| {SQL_ATTR_LOGIN_TIMEOUT, | ||
| {"SQL_ATTR_LOGIN_TIMEOUT", ConnectionValidation::kBefore, | ||
| SupportedAttribute::kBoth, (SQLPOINTER)0}}, | ||
| {SQL_ATTR_ANSI_APP, |
Collaborator
There was a problem hiding this comment.
Please see how to write test case for this
Collaborator
Author
There was a problem hiding this comment.
existing test cases will be utilsied
NeerajDwivedii
force-pushed
the
add_sql_attr_ansi_impl
branch
from
August 19, 2026 07:21
592872c to
ed02db1
Compare
sachinpro
reviewed
Aug 19, 2026
| ToSqlPointer(timeout), 0); | ||
| CheckError(status, "SQLSetConnectAttr", conn, use_ansi); | ||
| #ifndef WIN32 | ||
| status = SQLSetConnectAttrA(conn->hdbc, SQL_ATTR_ANSI_APP, |
Collaborator
There was a problem hiding this comment.
Let's verify if driver manager is allowed to dynamically change the bahaviour by setting SQL_ATTR_ANSI_APP to true/false.
Collaborator
Author
There was a problem hiding this comment.
Added attribute value change after connection creation, driver has same behavior as Simba BQ driver and also same same behavior as official doc.
Collaborator
There was a problem hiding this comment.
I don't see where we are setting the attribute after making the connection. SetAttributes function is called before.
Collaborator
|
We need to verify the behaviour through unixODBC. There should be no change for windows. |
NeerajDwivedii
force-pushed
the
add_sql_attr_ansi_impl
branch
from
August 25, 2026 07:51
ed02db1 to
5fc0b2b
Compare
NeerajDwivedii
force-pushed
the
add_sql_attr_ansi_impl
branch
from
August 25, 2026 08:18
5fc0b2b to
7bb446a
Compare
sachinpro
marked this pull request as ready for review
August 26, 2026 09:32
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR implements support for the
SQL_ATTR_ANSI_APPattribute in the BQ driver. The attribute will be set before creating the connection.Note that on Windows, explicitly setting this attribute is not supported. The Driver Manager directly returns an HY092 (option value out of range) error.
** Observation:
The internal BigQuery ODBC driver and the existing Simba BigQuery ODBC driver both support setting
SQL_ATTR_ANSI_APPafter connection creation.The attribute allows the Driver Manager to inform the driver whether the application is using ANSI APIs (SQL_AA_TRUE) or Unicode APIs (SQL_AA_FALSE), so that the driver can provide different behavior depending on the application type. as mention in official [documentation ]( If the driver returns SQL_SUCCESS, the Driver Manager will separate ANSI and Unicode connections when Connection Pooling is used.)