string like "1900-01-00" in func datediff,unix_timestamp will make tablet crash #3194
Labels
bug
Something isn't working
cant-reproduce
enhancement
New feature or request
execute-engine
hybridse sql engine
storage-engine
openmldb storage engine. nameserver & tablet
Bug Description
datediff and unix_timestamp func that convert string to date extract "1900-01-00" fail
Expected Behavior
Relation Case
inputs:
- columns: ["id int64", "c1 string", "c2 string", "c3 date", "c4 date", "c5 timestamp"]
indexs: ["index1: id: c5"]
rows:
- [5, "1900-01-01", "1900-01-00", "9999-12-31", "1900-01-01", 1590738991300]
sql: select id ,datediff(c1,c2) as svs,datediff(c1,c3) as svd,datediff(c3,c1) as dvs,datediff(c3,c4) as dvd from {0};
inputs:
- columns: ["id int64", "c1 string", "c2 timestamp"]
indexs: ["index1: id: c2"]
rows:
- [1, 1900-01-00, 1590738991000]
sql: select id ,unix_timestamp(c1) as unix_timestamp from {0};
This is a example problem of #926, null value returned by e.g
timestamp(-1)
becomeUndefValue
fortimestamp_to_date
The text was updated successfully, but these errors were encountered: