Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.2.6, 10.2.7, 10.2(EOL)
-
None
-
tested on 10.2.7 Ubuntu and 10.2.6 Docker (official container)
Description
To reproduce:
CREATE TABLE IF NOT EXISTS `fv_test` ( |
`SOME_DATE` datetime NOT NULL |
) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
|
INSERT INTO `aa`.`fv_test` (`SOME_DATE`) VALUES ('2017-07-20 12:47:56'); |
create table fv_result |
SELECT |
FIRST_VALUE(SOME_DATE) OVER(ORDER BY SOME_DATE DESC) AS somedate |
FROM fv_test; |
SQL Fehler (1292): Incorrect datetime value: '' for column 'somedate' |
The select (without create table) throw only a warning.
It will caused by FIRST_VALUE, the error persists if the datatype in the over clause will be changed to non-datetime, but vanished if the datatype/column in the first_value will be changed to non-datetime.