(t *testing.T)
| 1370 | "select any_value(id), any_value(team) from members order by id", |
| 1371 | // These newer GMS assertions expose the same DuckDB grouping boundaries on |
| 1372 | // the exact parent: alias rewriting introduces nested ANY_VALUE aggregates, |
| 1373 | // and unprojected ORDER BY columns remain subject to strict grouping rules. |
| 1374 | "select if(t0.c0 = 123, TRUE, t0.c0) AS ref0, min(t0.c0) as ref1 from t0 group by ref0", |
| 1375 | "select t0.c0 = t0.c1 as ref0, sum(1) as ref1 from t0 group by ref0", |
| 1376 | "select t1.c0 = t1.c1 as ref0, sum(1) as ref1 from t1 group by ref0", |
| 1377 | "select c1 from t0 group by c0 order by c2", |
| 1378 | "select c1 from t0 where c2 = 3 group by c1 order by c2", |
| 1379 | ) |
| 1380 | for _, script := range queries.OrderByGroupByScriptTests { |
| 1381 | enginetest.TestScript(t, harness, script) |
| 1382 | } |
| 1383 | t.Run("non-deterministic group by", func(t *testing.T) { |
| 1384 | t.Skip("DuckDB ANY_VALUE and non-strict GROUP BY semantics differ from MySQL") |
| 1385 | }) |
| 1386 | } |
| 1387 | |
| 1388 | func TestAmbiguousColumnResolution(t *testing.T) { |
| 1389 | enginetest.TestAmbiguousColumnResolution(t, NewDefaultDuckHarness()) |
| 1390 | } |
| 1391 | |
| 1392 | func TestInsertInto(t *testing.T) { |
| 1393 | harness := NewDefaultDuckHarness() |
| 1394 | // First enablement of #64: run the suite, skip cases that still need |
| 1395 | // MySQL-identical errors, ON DUPLICATE KEY, AUTO_INCREMENT, or FK. |
| 1396 | harness.QueriesToSkip( |
| 1397 | // insert_queries |
| 1398 | "INSERT_INTO_auto_increment_tbl_VALUES_('4',_44)", |
| 1399 | "INSERT_INTO_auto_increment_tbl_values_(0,_44)", |
| 1400 | "INSERT_INTO_auto_increment_tbl_values_(5,_44)", |
| 1401 | "INSERT_INTO_auto_increment_tbl_values_(NULL,_44),_(NULL,_55),_(9,_99),_(NULL,_110),_(NULL,_121)", |
| 1402 | "INSERT_INTO_keyless_()_VALUES_();", |
| 1403 | "INSERT_INTO_keyless_VALUES_();", |
| 1404 | "INSERT_INTO_mytable_(i,s)_values_(1,'hi')_ON_DUPLICATE_KEY_UPDATE_s=VALUES(s)", |
| 1405 | "INSERT_INTO_mytable_(i,s)_values_(1,'mar'),_(2,'par')_ON_DUPLICATE_KEY_UPDATE_s=CONCAT(VALUES(s),_'tial')", |
| 1406 | "INSERT_INTO_mytable_(i,s)_values_(1,'maybe')_ON_DUPLICATE_KEY_UPDATE_i=VALUES(i)+8000,_s=VALUES(s)", |
| 1407 | "INSERT_INTO_mytable_(i,s)_values_(1,_'hello')_ON_DUPLICATE_KEY_UPDATE_i=10", |
| 1408 | "INSERT_INTO_mytable_(i,s)_values_(1,_'hello')_ON_DUPLICATE_KEY_UPDATE_s='hello'", |
| 1409 | "INSERT_INTO_mytable_(i,s)_values_(1,_'hello2'),_(2,_'hello3'),_(4,_'no_conflict')_ON_DUPLICATE_KEY_UPDATE_s='hello4'", |
| 1410 | "INSERT_INTO_mytable_(i,s)_values_(1,_'hello2')_ON_DUPLICATE_KEY_UPDATE_s='hello3'", |
| 1411 | "INSERT_INTO_mytable_(i,s)_values_(1,_'hello2')_ON_DUPLICATE_KEY_UPDATE_s='hello3'#01", |
| 1412 | "INSERT_INTO_mytable_(i,s)_values_(10,_'hello')_ON_DUPLICATE_KEY_UPDATE_s='hello'", |
| 1413 | "INSERT_INTO_mytable_(s,i)_values_('dup',1)_ON_DUPLICATE_KEY_UPDATE_s=CONCAT(VALUES(s),_'licate')", |
| 1414 | |
| 1415 | "INSERT_INTO_othertable_VALUES_(\"fourth\",_1)_ON_DUPLICATE_KEY_UPDATE_s2=\"fourth\"", |
| 1416 | "INSERT_INTO_typestable_SET____id_=_999,_i8_=_-128,_i16_=_-32768,_i32_=_-2147483648,_i64_=_-9223372036854775808,____u8_=_0,_u16_=_0,_u32_=_0,_u64_=_0,____f32_=_1.401298464324817070923729583289916131280e-45,_f64_=_4.940656458412465441765687928682213723651e-324,____ti_=_'0000-00-00_00:00:00',_da_=_'0000-00-00',____te_=_'',_bo_=_false,_js_=_'\"\"',_bl_=_'',_e1_=_'v1',_s1_=_'v2'____;", |
| 1417 | "INSERT_INTO_typestable_SET____id_=_999,_i8_=_-128,_i16_=_-32768,_i32_=_-2147483648,_i64_=_-9223372036854775808,____u8_=_0,_u16_=_0,_u32_=_0,_u64_=_0,____f32_=_1.401298464324817070923729583289916131280e-45,_f64_=_4.940656458412465441765687928682213723651e-324,____ti_=_'2037-04-05_12:51:36_-0000_UTC',_da_=_'0000-00-00',____te_=_'',_bo_=_false,_js_=_'\"\"',_bl_=_'',_e1_=_'v1',_s1_=_'v2'____;", |
| 1418 | "INSERT_INTO_typestable_VALUES_(____999,_-128,_-32768,_-2147483648,_-9223372036854775808,____0,_0,_0,_0,____1.401298464324817070923729583289916131280e-45,_4.940656458412465441765687928682213723651e-324,____'0000-00-00_00:00:00',_'0000-00-00',____'',_false,_'\"\"',_'',_'',_''____);", |
| 1419 | "with_recursive_t_(i,f)_as_(select_4,4_from_dual_union_all_select_i_+_1,_i_+_1_from_t_where_i_<_5)_insert_into_mytable_select_i,f_from_t", |
| 1420 | // insert_scripts (skipped by script name) |
| 1421 | "Explicit_default_with_column_reference", |
| 1422 | "INSERT_Accumulator_tests", |
| 1423 | "INSERT_IGNORE_works_with_FK_Violations", |
| 1424 | "INSERT_INTO_..._SELECT_with_TEXT_types", |
| 1425 | "Insert_into_unique_key_that_overlaps_with_primary_key", |
| 1426 | "Insert_on_duplicate_key", |
| 1427 | "Insert_on_duplicate_key_references_table_in_aliased_subquery", |
| 1428 | "Insert_on_duplicate_key_references_table_in_cte", |
| 1429 | "Insert_on_duplicate_key_references_table_in_subquery", |
nothing calls this directly
no test coverage detected