(ctx context.Context, client *Client, table *schema.Table)
| 74 | } |
| 75 | |
| 76 | func countAllRows(ctx context.Context, client *Client, table *schema.Table) (int64, error) { |
| 77 | var err error |
| 78 | ch := make(chan arrow.RecordBatch) |
| 79 | go func() { |
| 80 | defer close(ch) |
| 81 | err = client.Read(ctx, table, ch) |
| 82 | }() |
| 83 | count := int64(0) |
| 84 | for record := range ch { |
| 85 | count += record.NumRows() |
| 86 | } |
| 87 | return count, err |
| 88 | } |
| 89 | |
| 90 | func withPluginClient(ctx context.Context, r *require.Assertions) *Client { |
| 91 | s := &Spec{ConnectionString: ":memory:"} |