You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"CREATE TABLE horses (id int primary key, name varchar(10));",
1583
+
"CREATE INDEX horses_name_idx ON horses(name);",
1584
+
"insert into horses select x, 'Steve' from (with recursive inputs(x) as (select 1 union select x+1 from inputs where x < 1000) select * from inputs) dt;",
1585
+
},
1586
+
Assertions: []ScriptTestAssertion{
1587
+
{
1588
+
Query: `ANALYZE horses;`,
1589
+
Expected: []sql.Row{},
1590
+
},
1591
+
{
1592
+
Query: `SELECT database_name, table_name, index_name, row_count, distinct_count, columns, upper_bound, upper_bound_cnt FROM dolt_statistics ORDER BY index_name`,
Query: "CREATE TABLE horses2 (id int primary key, name varchar(10));",
1635
+
Expected: []sql.Row{},
1636
+
},
1637
+
{
1638
+
Query: "CREATE INDEX horses2_name_idx ON horses2(name);",
1639
+
Expected: []sql.Row{},
1640
+
},
1641
+
{
1642
+
Query: "insert into horses2 select x, 'Steve' from (with recursive inputs(x) as (select 1 union select x+1 from inputs where x < 1000) select * from inputs) dt;",
1643
+
Expected: []sql.Row{},
1644
+
},
1645
+
{
1646
+
Query: `ANALYZE horses2;`,
1647
+
Expected: []sql.Row{},
1648
+
},
1649
+
{
1650
+
Query: `SELECT dolt_statistics.index_name FROM dolt_statistics GROUP BY index_name ORDER BY index_name`,
Query: "CREATE TABLE horses (id int primary key, name varchar(10));",
1664
+
Expected: []sql.Row{},
1665
+
},
1666
+
{
1667
+
Query: "CREATE INDEX horses3_name_idx ON horses(name);",
1668
+
Expected: []sql.Row{},
1669
+
},
1670
+
{
1671
+
Query: "insert into horses select x, 'Steve' from (with recursive inputs(x) as (select 1 union select x+1 from inputs where x < 1000) select * from inputs) dt;",
1672
+
Expected: []sql.Row{},
1673
+
},
1674
+
{
1675
+
Query: `ANALYZE horses;`,
1676
+
Expected: []sql.Row{},
1677
+
},
1678
+
{
1679
+
Skip: true, // TODO: dolt_statistics can't distinguish tables with the same name in different schemas
1680
+
Query: `SELECT table_name, index_name FROM dolt_statistics GROUP BY index_name ORDER BY index_name`,
1681
+
Expected: []sql.Row{
1682
+
{"horses2", "horses2_name_idx"},
1683
+
{"horses", "horses3_name_idx"},
1684
+
{"horses2", "primary"},
1685
+
{"horses", "primary"},
1686
+
},
1687
+
},
1688
+
{
1689
+
Skip: true, // TODO: dolt_statistics can't distinguish tables with the same name in different schemas
1690
+
Query: `SELECT table_name, index_name FROM newschema.dolt_statistics GROUP BY index_name ORDER BY index_name`,
1691
+
Expected: []sql.Row{
1692
+
{"horses2", "horses2_name_idx"},
1693
+
{"horses", "horses3_name_idx"},
1694
+
{"horses2", "primary"},
1695
+
{"horses", "primary"},
1696
+
},
1697
+
},
1698
+
{
1699
+
Skip: true, // TODO: dolt_statistics can't distinguish tables with the same name in different schemas
1700
+
Query: `SELECT table_name, index_name FROM public.dolt_statistics GROUP BY index_name ORDER BY index_name`,
0 commit comments