File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed
Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -2023,6 +2023,12 @@ func TestInsertInto(t *testing.T) {
20232023 "SELECT i FROM mytable WHERE s = 'x';" ,
20242024 []sql.Row {{int64 (999 )}},
20252025 },
2026+ {
2027+ "INSERT INTO niltable (f) VALUES (10.0), (12.0);" ,
2028+ []sql.Row {{int64 (2 )}},
2029+ "SELECT f FROM niltable WHERE f in (10.0, 12.0) order by f;" ,
2030+ []sql.Row {{10.0 }, {12.0 }},
2031+ },
20262032 {
20272033 "INSERT INTO mytable SET s = 'x', i = 999;" ,
20282034 []sql.Row {{int64 (1 )}},
Original file line number Diff line number Diff line change @@ -241,11 +241,7 @@ func (p *InsertInto) validateValueCount(ctx *sql.Context) error {
241241 return ErrInsertIntoMismatchValueCount .New ()
242242 }
243243 }
244- case * ResolvedTable :
245- return p .assertColumnCountsMatch (node .Schema ())
246- case * Project :
247- return p .assertColumnCountsMatch (node .Schema ())
248- case * InnerJoin :
244+ case * ResolvedTable , * Project , * InnerJoin :
249245 return p .assertColumnCountsMatch (node .Schema ())
250246 default :
251247 return ErrInsertIntoUnsupportedValues .New (node )
You can’t perform that action at this time.
0 commit comments