wjywbs opened a new pull request, #692:
URL: https://github.com/apache/arrow-go/pull/692

   I used GPT-5.3-Codex to generate this patch to fix #667. I have reviewed the 
outputs.
   
   ---
   
   ### Rationale for this change
   `database/sql` queries executed via `tx.QueryContext`/`tx.QueryRowContext` 
were not consistently bound to the active Flight SQL transaction when no query 
arguments were provided. The driver always used `c.client.Execute(...)`, which 
bypassed transaction context and could not see uncommitted transactional state 
(e.g., tables created inside the transaction).
   
   ### What changes are included in this PR?
   - Updated `Connection.QueryContext` in the Flight SQL Go driver to use:
     - `c.txn.Execute(...)` when `c.txn` is active and valid.
     - `c.client.Execute(...)` otherwise.
   - This aligns zero-argument query execution semantics with transactional 
expectations in `database/sql`.
   
   ### Are these changes tested?
   Yes.
   - Added/used regression coverage in driver tests:
     - `TestTxQueryContextUsesTransaction`
   - Validation confirms:
     - test fails when the fix is removed (cannot see tx-local table),
     - test passes when the fix is applied.
   
   ### Are there any user-facing changes?
   Yes, behavior is corrected for users of the Go Flight SQL `database/sql` 
driver:
   - `tx.QueryContext` / `tx.QueryRowContext` (including zero-arg queries) now 
execute within the active transaction as expected.
   - No API or configuration changes.


-- 
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