fix: SQL select to honor limits properly for array queries (#13568)

added tests to cover the scenarios as well.
This commit is contained in:
Harshavardhana
2021-11-02 19:14:46 -07:00
committed by GitHub
parent 58934e5881
commit 34680c5ccf
4 changed files with 83 additions and 6 deletions

View File

@@ -548,6 +548,17 @@ OuterLoop:
}
outputQueue[len(outputQueue)-1] = outputRecord
if s3Select.statement.LimitReached() {
if !sendRecord() {
break
}
if err = writer.Finish(s3Select.getProgress()); err != nil {
// FIXME: log this error.
err = nil
}
return
}
if len(outputQueue) < cap(outputQueue) {
continue
}