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) {
2023
2023
"SELECT i FROM mytable WHERE s = 'x';" ,
2024
2024
[]sql.Row {{int64 (999 )}},
2025
2025
},
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
+ },
2026
2032
{
2027
2033
"INSERT INTO mytable SET s = 'x', i = 999;" ,
2028
2034
[]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 {
241
241
return ErrInsertIntoMismatchValueCount .New ()
242
242
}
243
243
}
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 :
249
245
return p .assertColumnCountsMatch (node .Schema ())
250
246
default :
251
247
return ErrInsertIntoUnsupportedValues .New (node )
You can’t perform that action at this time.
0 commit comments