Skip to content

Commit 7e7622e

Browse files
committed
Add test
1 parent dde1b5f commit 7e7622e

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

enginetest/queries/alter_table_queries.go

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1006,6 +1006,29 @@ var AlterTableScripts = []ScriptTest{
10061006
},
10071007
},
10081008
},
1009+
{
1010+
// https://github.com/dolthub/dolt/issues/9178
1011+
Name: "alter modify column type float to bigint",
1012+
SetUpScript: []string{
1013+
"create table t1 (pk int primary key, c1 float);",
1014+
"insert into t1 values (1, 0.0)",
1015+
"insert into t1 values (2, 127.9)",
1016+
"insert into t1 values (3, 42.1)",
1017+
},
1018+
Assertions: []ScriptTestAssertion{
1019+
{
1020+
Query: "alter table t1 modify column c1 bigint",
1021+
},
1022+
{
1023+
Query: "select * from t1 order by pk",
1024+
Expected: []sql.Row{
1025+
{1, int64(0)},
1026+
{2, int64(128)},
1027+
{3, int64(42)},
1028+
},
1029+
},
1030+
},
1031+
},
10091032
}
10101033

10111034
var RenameTableScripts = []ScriptTest{

0 commit comments

Comments
 (0)