(ctx context.Context, client plugin.Client, table *schema.Table)
| 137 | } |
| 138 | |
| 139 | func readAll(ctx context.Context, client plugin.Client, table *schema.Table) ([]arrow.RecordBatch, error) { |
| 140 | var err error |
| 141 | ch := make(chan arrow.RecordBatch) |
| 142 | go func() { |
| 143 | defer close(ch) |
| 144 | err = client.Read(ctx, table, ch) |
| 145 | }() |
| 146 | // nolint:prealloc |
| 147 | var records []arrow.RecordBatch |
| 148 | for record := range ch { |
| 149 | records = append(records, record) |
| 150 | } |
| 151 | return records, err |
| 152 | } |
no test coverage detected