sub-select not implemented in exec yet
(t *testing.T)
| 495 | |
| 496 | // sub-select not implemented in exec yet |
| 497 | func testSubselect(t *testing.T) { |
| 498 | sqlText := ` |
| 499 | select |
| 500 | user_id, email |
| 501 | FROM users |
| 502 | WHERE user_id in |
| 503 | (select user_id from orders) |
| 504 | ` |
| 505 | ctx := td.TestContext(sqlText) |
| 506 | job, err := exec.BuildSqlJob(ctx) |
| 507 | assert.True(t, err == nil, "no error %v", err) |
| 508 | |
| 509 | //writeCtx := NewContextSimple() |
| 510 | msgs := make([]schema.Message, 0) |
| 511 | go func() { |
| 512 | outChan := job.DrainChan() |
| 513 | for msg := range outChan { |
| 514 | u.Infof("msg: %v", msg) |
| 515 | msgs = append(msgs, msg) |
| 516 | } |
| 517 | }() |
| 518 | err = job.Run() |
| 519 | time.Sleep(time.Millisecond * 30) |
| 520 | assert.True(t, err == nil, "no error %v", err) |
| 521 | assert.True(t, len(msgs) == 1, "should have filtered out 2 messages") |
| 522 | } |
nothing calls this directly
no test coverage detected