使用mysql catalog,mysql里面存的time类型,值是24:00:00吗,数据都不过来

Viewed 34

mysql里面存的time类型,值是24:00:00,报错CAUSED BY: SQLException: The value '24:00:00' is an invalid TIME value. JDBC Time objects represent a wall-clock time and not a duration as MySQL treats them. If you are treating this type as a duration, consider retrieving this value as a string and dealing with it according to your requirements.我在doris建表是用的string,查询转成string不行,替换成其他值也不行

driver用的mysql-connector-j-8.0.31.jar

image.png

1 Answers

MySQL 的 Time 类型代表持续时间,并不是一天中的某个时间,虽然在 Doris 将 MySQL Time 类型映射为 String,但是 Jdbc 在处理的时候,仍然会将其作为 Time 处理,只能支持一天内的时间,即 00:00:00-23:59:59,所以读取报错,这个问题短期内不会解决,如果后续解决,会同步在这里