apache / apache/arrow-go

[Flight SQL] Add client-side tests for Substrait prepared statements

Open
#1,267 0 comments 0 reactions 0 assignees View on GitHub
good-first-issue
Dominant language
Assembly
Stars
404
Forks
145
Avg merge
2d 4h
Merged PRs (30d)
87

Description

### Describe the enhancement requested

Add client-side test coverage for Substrait prepared statements in `arrow/flight/flightsql/client_test.go`.

PR #732 added server-side coverage for `CreatePreparedSubstraitPlan`, but the [review discussion](https://github.com/apache/arrow-go/pull/732#discussion_r3733066313) identified that the corresponding client path has no dedicated tests.

The tests should cover:

- `Client.PrepareSubstrait` constructing a `CreatePreparedSubstraitPlan` action with the supplied plan bytes and Substrait version.
- Parsing the returned prepared-statement handle and schemas.
- Preserving all three `is_update` states: absent, `false`, and `true`.
- `Txn.PrepareSubstrait` request construction, including the transaction ID, if it is not already covered through shared helpers.

Query and update execution do not need duplicate coverage here: after prepared-statement creation, Substrait and SQL use the same Flight SQL execution paths.

### Component(s)

Integration

Contributor guide

Open the contributing guide

Research direction

Start in arrow/flight/flightsql/client_test.go by reading the existing client tests and the server-side coverage added in PR #732. Exercise Client.PrepareSubstrait and Txn.PrepareSubstrait, including the transaction ID, returned handle and schemas, supplied plan bytes and Substrait version. Done means the absent, false, and true is_update states and request construction are covered without duplicating execution tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
testing
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
76/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.