query PPP
SELECT to_timestamp(1.1) as c1, ...
----
1970-01-01T00:00:01.100 ...
> SELECT to_timestamp(1.1);
+----------------------------+
| to_timestamp(Float64(1.1)) |
+----------------------------+
| 1970-01-01T00:00:01.100 |
+----------------------------+
> SELECT to_timestamp(x) FROM (VALUES (1.1), (NULL)) t(x);
+-------------------------------+
| to_timestamp(t.x) |
+-------------------------------+
| 1970-01-01T00:00:00.000000001 |
| NULL |
+-------------------------------+
Describe the bug
We have this in SLT tests
and indeed it works in CLI
unless the value is not result of constant folding
To Reproduce
No response
Expected behavior
Same result
Additional context
to_timestampbehaves consistently with PostgreSQL #13351