Skip to content

[ES|QL] Equal predicate on datetime field may return inconsistent results #107900

@fang-xing-esql

Description

@fang-xing-esql

Problem Description

Datetime field == literal returns correct results when run CsvTests in IntelliJ, however it returns empty resultset if run within grade single-node check.

Steps to Reproduce

Add the query below in date.csv-spec to reproduce it.

ImplicitCastingEqual
from employees
| where birth_date == "1957-05-23T00:00:00Z" --  to_datetime("1957-05-23T00:00:00Z") has the same issue
| keep emp_no, birth_date
| sort emp_no;

emp_no:integer | birth_date:datetime
10007          | 1957-05-23T00:00:00Z
;

Here is the gradle command to reproduce it.
REPRODUCE WITH: ./gradlew ':x-pack:plugin:esql:qa:server:single-node:javaRestTest' --tests "org.elasticsearch.xpack.esql.qa.single_node.EsqlSpecIT" -Dtests.method="test {date.ImplicitCastingEqual SYNC}" -Dtests.seed=C78D8F95DBC63930 -Dtests.locale=sr -Dtests.timezone=Australia/Melbourne -Druntime.java=21

Metadata

Metadata

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions