Skip to content

Conversation

@HyukjinKwon
Copy link
Member

@HyukjinKwon HyukjinKwon commented Dec 31, 2025

Rationale for this change

968e6ea added incorrect bitmask examples for SQL_SUPPORTED_TRANSACTIONS_ISOLATION_LEVELS.

* - return 2 (\b10) => [SQL_TRANSACTION_READ_UNCOMMITTED];
* - return 3 (\b11) => [SQL_TRANSACTION_NONE, SQL_TRANSACTION_READ_UNCOMMITTED];
* - return 4 (\b100) => [SQL_TRANSACTION_REPEATABLE_READ];

The bitmask incorrectly mapped bit 2 (value 4 = \b100) to SQL_TRANSACTION_REPEATABLE_READ instead of SQL_TRANSACTION_READ_COMMITTED, and omitted SQL_TRANSACTION_READ_COMMITTED entirely. According to the enum definition:

enum SqlTransactionIsolationLevel {
SQL_TRANSACTION_NONE = 0;
SQL_TRANSACTION_READ_UNCOMMITTED = 1;
SQL_TRANSACTION_READ_COMMITTED = 2;
SQL_TRANSACTION_REPEATABLE_READ = 3;
SQL_TRANSACTION_SERIALIZABLE = 4;
}

The correct bit-to-enum mapping should be:

  • Bit 0 (value 1) = SQL_TRANSACTION_NONE (enum value 0)
  • Bit 1 (value 2) = SQL_TRANSACTION_READ_UNCOMMITTED (enum value 1)
  • Bit 2 (value 4) = SQL_TRANSACTION_READ_COMMITTED (enum value 2)
  • Bit 3 (value 8) = SQL_TRANSACTION_REPEATABLE_READ (enum value 3)
  • Bit 4 (value 16) = SQL_TRANSACTION_SERIALIZABLE (enum value 4)

What changes are included in this PR?

  • Added SQL_TRANSACTION_READ_COMMITTED properly in the comments.
  • SQL positioned commands (presumably copied and pasted from other places) -> SQL transaction isolation levels for SQL_SUPPORTED_TRANSACTIONS_ISOLATION_LEVELS
  • SQL positioned commands (presumably copied and pasted from other places) -> SQL UNIONs for SQL_SUPPORTED_UNIONS
  • ... and a lot of other similar typo fixes.

Are these changes tested?

No, I did not test as they are comment-only.

Are there any user-facing changes?

No, dev-only.

@github-actions github-actions bot added the awaiting review Awaiting review label Dec 31, 2025
@HyukjinKwon HyukjinKwon changed the title MINOR: [Format] Fix incorrect bitmask examples and typos in Flight SQL and format documentation MINOR: [Format] Fix incorrect bitmask examples and typos in Flight SQL and format Dec 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting review Awaiting review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant