doris version:2.1.7
sql1:
mysql> desc table_hashh;
+-------+---------+------+-------+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------+---------+------+-------+---------+-------+
| k1 | tinyint | Yes | true | NULL | |
| k2 | float | Yes | false | NULL | NONE |
+-------+---------+------+-------+---------+-------+
sql2:
mysql> select * from table_hashh order by k1;
+------+------+
| k1 | k2 |
+------+------+
| 1 | 1 |
| 2 | NULL |
| 3 | NULL |
+------+------+
sql3:
mysql> select k1, ifnull(k2, 10) from table_hashh order by k1;
+------+-------------------------------+
| k1 | ifnull(k2, cast(10 as FLOAT)) |
+------+-------------------------------+
| 1 | 1 |
| 2 | NULL |
| 3 | 10 |
+------+-------------------------------+
预想sql3中k2的NULL应该转换为10
补充插入数据: