S3 select: flush when reaching limit (#8279)

Add missing flush when reaching select limit.
This commit is contained in:
Klaus Post
2019-09-20 11:00:17 -07:00
committed by Harshavardhana
parent b823d6d7bd
commit 520552ffa9
2 changed files with 27 additions and 0 deletions

View File

@@ -416,6 +416,9 @@ func (s3Select *S3Select) Evaluate(w http.ResponseWriter) {
var rec sql.Record
for {
if s3Select.statement.LimitReached() {
if !sendRecord() {
break
}
if err = writer.Finish(s3Select.getProgress()); err != nil {
// FIXME: log this error.
err = nil