| 387 | } |
| 388 | |
| 389 | func (s Select) prepareTask(ctx context.Context, client *storage.S3, url *url.URL, resultCh chan<- json.RawMessage) func() error { |
| 390 | return func() error { |
| 391 | query := &storage.SelectQuery{ |
| 392 | ExpressionType: "SQL", |
| 393 | Expression: s.query, |
| 394 | InputFormat: s.inputFormat, |
| 395 | InputContentStructure: s.inputStructure, |
| 396 | FileHeaderInfo: s.fileHeaderInfo, |
| 397 | OutputFormat: s.outputFormat, |
| 398 | CompressionType: s.compressionType, |
| 399 | } |
| 400 | |
| 401 | return client.Select(ctx, url, query, resultCh) |
| 402 | } |
| 403 | } |
| 404 | |
| 405 | func validateSelectCommand(c *cli.Context) error { |
| 406 | if c.Args().Len() != 1 { |