Open GaoYusong opened 2 months ago
another return type mismatch issue
--- FAIL: TestQueriesSimple/SELECT_pk1,_SUM(c1)_FROM_two_pk_GROUP_BY_pk1_ORDER_BY_pk1; (0.04s)
/Users/shannon/code/myduckserver/evaluation.go:726:
Error Trace: /Users/shannon/go/pkg/mod/github.com/dolthub/go-mysql-server@v0.18.2-0.20240815142344-761713e36043/enginetest/evaluation.go:726
/Users/shannon/go/pkg/mod/github.com/dolthub/go-mysql-server@v0.18.2-0.20240815142344-761713e36043/enginetest/evaluation.go:357
Error: Not equal:
expected: []sql.Row{sql.Row{0, 10}, sql.Row{1, 50}}
actual : []sql.Row{sql.Row{0, 10}, sql.Row{1, 50}}
Diff:
--- Expected
+++ Actual
@@ -3,3 +3,8 @@
(int64) 0,
- (float64) 10
+ (*big.Int)({
+ neg: (bool) false,
+ abs: (big.nat) (len=1) {
+ (big.Word) 10
+ }
+ })
},
@@ -7,3 +12,8 @@
(int64) 1,
- (float64) 50
+ (*big.Int)({
+ neg: (bool) false,
+ abs: (big.nat) (len=1) {
+ (big.Word) 50
+ }
+ })
}
Test: TestQueriesSimple/SELECT_pk1,_SUM(c1)_FROM_two_pk_GROUP_BY_pk1_ORDER_BY_pk1;
Messages: Unexpected result for query SELECT pk1, SUM(c1) FROM two_pk GROUP BY pk1 ORDER BY pk1
--- FAIL: TestQueriesSimple (8.77s)
--- FAIL: TestQueriesSimple/select_sum(10)_from_mytable (0.01s)
/Users/ysg/code/myduckserver/evaluation.go:726:
Error Trace: /Users/ysg/.gopath/pkg/mod/github.com/dolthub/go-mysql-server@v0.18.2-0.20240815142344-761713e36043/enginetest/evaluation.go:726
/Users/ysg/.gopath/pkg/mod/github.com/dolthub/go-mysql-server@v0.18.2-0.20240815142344-761713e36043/enginetest/evaluation.go:357
Error: Not equal:
expected: []sql.Row{sql.Row{30}}
actual : []sql.Row{sql.Row{30}}
Diff:
--- Expected
+++ Actual
@@ -2,3 +2,8 @@
(sql.Row) (len=1) {
- (float64) 30
+ (*big.Int)({
+ neg: (bool) false,
+ abs: (big.nat) (len=1) {
+ (big.Word) 30
+ }
+ })
}
Test: TestQueriesSimple/select_sum(10)_from_mytable
Messages: Unexpected result for query select sum(10) from mytable
“DuckDB and MySQL’s SUM and FLOOR functions have different return rules for different types, as follows:” duckdb: sum(DECIMAL) -> DECIMAL sum(SMALLINT) -> HUGEINT sum(INTEGER) -> HUGEINT sum(BIGINT) -> HUGEINT sum(HUGEINT) -> HUGEINT sum(DOUBLE) -> DOUBLE floor(FLOAT) -> FLOAT floor(DOUBLE) -> DOUBLE floor(DECIMAL) -> DECIMAL
mysql: sum(integer/DECIMAL) -> DECIMAL sum(float/double) -> double floor() -> int
i have already changed hugeint to int64. may we need to make any other modifications, and is it acceptable to tolerate some incompatibilities?”
“DuckDB and MySQL’s SUM and FLOOR functions have different return rules for different types, as follows:” duckdb: sum(DECIMAL) -> DECIMAL sum(SMALLINT) -> HUGEINT sum(INTEGER) -> HUGEINT sum(BIGINT) -> HUGEINT sum(HUGEINT) -> HUGEINT sum(DOUBLE) -> DOUBLE floor(FLOAT) -> FLOAT floor(DOUBLE) -> DOUBLE floor(DECIMAL) -> DECIMAL
mysql: sum(integer/DECIMAL) -> DECIMAL sum(float/double) -> double floor() -> int
i have already changed hugeint to int64. may we need to make any other modifications, and is it acceptable to tolerate some incompatibilities?”
welcome back!