Modify fill(null) to fill(none) in SELECT INTO queries

Fixes #5116.
pull/6028/head
Jonathan A. Sternberg 2016-03-16 11:14:41 -04:00
parent 0703b85589
commit eab6ac3871
1 changed files with 6 additions and 0 deletions

View File

@ -653,6 +653,12 @@ func newIteratorOptionsStmt(stmt *SelectStatement, sopt *SelectOptions) (opt Ite
opt.Dedupe = stmt.Dedupe
opt.Fill, opt.FillValue = stmt.Fill, stmt.FillValue
if opt.Fill == NullFill && stmt.Target != nil {
// Set the fill option to none if a target has been given.
// Null values will get ignored when being written to the target
// so fill(null) wouldn't write any null values to begin with.
opt.Fill = NoFill
}
opt.Limit, opt.Offset = stmt.Limit, stmt.Offset
opt.SLimit, opt.SOffset = stmt.SLimit, stmt.SOffset