(ctx context.Context, client plugin.Client, table *schema.Table)
| 225 | } |
| 226 | |
| 227 | func readAll(ctx context.Context, client plugin.Client, table *schema.Table) ([]arrow.RecordBatch, error) { |
| 228 | var err error |
| 229 | ch := make(chan arrow.RecordBatch) |
| 230 | go func() { |
| 231 | defer close(ch) |
| 232 | err = client.Read(ctx, table, ch) |
| 233 | }() |
| 234 | // nolint:prealloc |
| 235 | var records []arrow.RecordBatch |
| 236 | for record := range ch { |
| 237 | records = append(records, record) |
| 238 | } |
| 239 | return records, err |
| 240 | } |
no test coverage detected