Details
-
Bug
-
Resolution: Fixed
-
Major
-
4.6.0, 5.0.0
-
None
-
Untriaged
-
No
Description
It looks like DATE_TRUNC* does not work at all for the part 'week'.
SELECT DATE_TRUNC_MILLIS(1463284740000, 'day') as day,
|
DATE_TRUNC_MILLIS(1463284740000, 'month') as month,
|
DATE_TRUNC_MILLIS(1463284740000, 'week') as week,
|
DATE_TRUNC_MILLIS(1463284740000, 'year') as year
|
|
{
|
"requestID": "d98651d3-b011-4a4e-992a-25c8ff9450ed",
|
"clientContextID": "cdb5de72-9855-4e21-bb30-b32b20a942a4",
|
"signature": {
|
"day": "number",
|
"month": "number",
|
"week": "number",
|
"year": "number"
|
},
|
"results": [
|
{
|
"day": 1463270400000,
|
"month": 1462147200000,
|
"week": null,
|
"year": 1451696400000
|
}
|
],
|
"status": "success",
|
"metrics": {
|
"elapsedTime": "1.253668ms",
|
"executionTime": "1.222896ms",
|
"resultCount": 1,
|
"resultSize": 141
|
}
|
}
|
No matter what value I specify for the input date, it always returns null.
Similarly for DATE_TRUNC_STR():
SELECT DATE_TRUNC_STR('2016-05-18T03:59:00Z', 'week')
|
{
|
"requestID": "b71ca571-13fb-49b0-a531-1d093fdb9241",
|
"clientContextID": "0b7f987a-2b46-4d48-9f94-d55d452c1535",
|
"signature": {
|
"$1": "string"
|
},
|
"results": [
|
{
|
"$1": null
|
}
|
],
|
"status": "success",
|
"metrics": {
|
"elapsedTime": "631.406µs",
|
"executionTime": "595.632µs",
|
"resultCount": 1,
|
"resultSize": 34
|
}
|
}
|
Attachments
Issue Links
- relates to
-
MB-22570 Date functions should return NULL on errors
- Closed