Skip to content

fix(bq_driver): Fix encoding for SAP HANA#1506

Open
shivamd-gpartner wants to merge 32 commits into
mainfrom
test_hana
Open

fix(bq_driver): Fix encoding for SAP HANA#1506
shivamd-gpartner wants to merge 32 commits into
mainfrom
test_hana

Conversation

@shivamd-gpartner

@shivamd-gpartner shivamd-gpartner commented Apr 27, 2026

Copy link
Copy Markdown
Collaborator

Fixed the encoding which was causing the issue on SAP HANA and had a different size of SQLWCHAR that the one it was built with . Another issue was the usage of std::regex crashing the driver due conflicting ABI with SAP HANA and moved to use RE2 regex now. PR size is bigger as had to change the usage of SQLWCHAR vector wherever we were creating earlier. Windows and linux checks are run here. Have verified on windows third party tools , seems working fine

std::regex named_pattern(R"([:@]\w+)");

// Check for positional parameters
if (std::regex_search(query, positional_pattern)) {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's deep dive into the reason this was crashing.

Let's print query and positional_pattern. Let's write a small c++ application to verify that it crashes independently.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have verified and independently it works, issue is due to SAP HANA interfering with std::regex ABI , using re2 regex instead

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants