Skip to content

SQL: datetime functions not filtering correctly: ISO_WEEK_OF_YEAR, MINUTE_OF_DAY #67872

@bpintea

Description

@bpintea

With the following index data:

POST test/_doc
{
  "a": "2021-01-22T14:26:06.039Z"
}

the following functions fail to filter by the same value they return:

  1. SELECT ISO_WEEK_OF_YEAR(a) AS x FROM test WHERE x=4
    returns:
       x       
---------------
3
  1. SELECT MINUTE_OF_DAY(a) AS x FROM test WHERE x=866
    fails with:
    "type" : "unsupported_operation_exception",
    "reason" : "is there a format for it?"

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions