Skip to content

Conversation

@justing-bq
Copy link

Rationale for this change

Changes need to be made to get the tests passing on MacOS.

What changes are included in this PR?

Adjusted tests so they will pass on MacOS.
Rewrote some sqlite logic so it will work on both Windows and Mac.

Are these changes tested?

Yes.

Are there any user-facing changes?

No.

Comment on lines +70 to +71
// Test disabled until we resolve bus error on MacOS
#ifdef DISABLE_TEST

Choose a reason for hiding this comment

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

Could you raise an internal Jira for this? If we plan to export this change to the Arrow repo, we need to raise a GitHub issue for this as well.

Copy link
Author

Choose a reason for hiding this comment

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

sqlite3_column_text(schema_statement->GetSqlite3Stmt(), 0)));

if (table_columns_map.contains(table_name)) {
const char* column_name = reinterpret_cast<const char*>(

Choose a reason for hiding this comment

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

Just curious, is this a bug that only occurs on mac and not Windows?

Copy link
Author

Choose a reason for hiding this comment

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

The logic for iterating through all the columns happens inside the while (sqlite3_step(schema_statement->GetSqlite3Stmt()) == SQLITE_ROW) loop. On Windows we can go through this loop multiple times which is why the loop was nested inside another loop iterating through the tables. But on MacOS, this loop will only run all the way through once. So I rewrote this logic to only go through the loop once using a map to sort out which columns belong to which table. This new logic works for both Windows and MacOS.

@justing-bq justing-bq force-pushed the macOsFix branch 2 times, most recently from b250272 to 52cc4b1 Compare January 15, 2026 20:35
@justing-bq justing-bq force-pushed the macOsFix branch 8 times, most recently from e48c57a to 0ccab8d Compare January 15, 2026 23:33
Copy link

@alinaliBQ alinaliBQ left a comment

Choose a reason for hiding this comment

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

LGTM

@justing-bq justing-bq merged commit 4aee809 into apache-odbc Jan 16, 2026
32 of 42 checks passed
@justing-bq justing-bq deleted the macOsFix branch January 16, 2026 18:23
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