Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ESQL: "lt[e]": "now" in a range query filter erroneously returns nothing #103455

Closed
bpintea opened this issue Dec 14, 2023 · 2 comments · Fixed by #103474
Closed

ESQL: "lt[e]": "now" in a range query filter erroneously returns nothing #103455

bpintea opened this issue Dec 14, 2023 · 2 comments · Fixed by #103474
Assignees
Labels
:Analytics/ES|QL AKA ESQL >bug Team:QL (Deprecated) Meta label for query languages team

Comments

@bpintea
Copy link
Contributor

bpintea commented Dec 14, 2023

Description

This works:

POST _query
{
  "query": "from kibana_sample_data_logs | limit 10000",
  "filter": {
    "range": {
      "@timestamp": {
        "format": "strict_date_optional_time",
        "gte": "2023-12-12T13:00:00.000Z",
        "lt": "2023-12-12T14:00:00.000Z"
      }
    }
  }
}

But this returns empty values array:

POST _query
{
  "query": "from kibana_sample_data_logs | limit 10000",
  "filter": {
    "range": {
      "@timestamp": {
        "format": "strict_date_optional_time",
        "gte": "2023-12-12T13:00:00.000Z",
        "lt": "now"
      }
    }
  }
}
@elasticsearchmachine elasticsearchmachine added the Team:QL (Deprecated) Meta label for query languages team label Dec 14, 2023
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-ql (Team:QL)

@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/elasticsearch-esql (:Query Languages/ES|QL)

@bpintea bpintea changed the title ESQL: "now" in a range query filter erroneously returns nothing ESQL: "lt[e]": "now" in a range query filter erroneously returns nothing Dec 14, 2023
@dnhatn dnhatn self-assigned this Dec 14, 2023
dnhatn added a commit that referenced this issue Dec 14, 2023
Currently, ESQL search contexts do not have the correct actual 'now' in 
milliseconds. Ideally, we should use a consistent 'now' in millis for
all nodes participating in the execution of a search request. I will
follow up with a PR to deserialize that value between nodes for version
8.13 and later.

Closes #103455
dnhatn added a commit to dnhatn/elasticsearch that referenced this issue Dec 14, 2023
Currently, ESQL search contexts do not have the correct actual 'now' in 
milliseconds. Ideally, we should use a consistent 'now' in millis for
all nodes participating in the execution of a search request. I will
follow up with a PR to deserialize that value between nodes for version
8.13 and later.

Closes elastic#103455
elasticsearchmachine pushed a commit that referenced this issue Dec 14, 2023
Currently, ESQL search contexts do not have the correct actual 'now' in 
milliseconds. Ideally, we should use a consistent 'now' in millis for
all nodes participating in the execution of a search request. I will
follow up with a PR to deserialize that value between nodes for version
8.13 and later.

Closes #103455
dnhatn added a commit to dnhatn/elasticsearch that referenced this issue Dec 30, 2023
…103480)

Currently, ESQL search contexts do not have the correct actual 'now' in
milliseconds. Ideally, we should use a consistent 'now' in millis for
all nodes participating in the execution of a search request. I will
follow up with a PR to deserialize that value between nodes for version
8.13 and later.

Closes elastic#103455
elasticsearchmachine pushed a commit that referenced this issue Dec 30, 2023
Currently, ESQL search contexts do not have the correct actual 'now' in
milliseconds. Ideally, we should use a consistent 'now' in millis for
all nodes participating in the execution of a search request. I will
follow up with a PR to deserialize that value between nodes for version
8.13 and later.

Closes #103455
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Analytics/ES|QL AKA ESQL >bug Team:QL (Deprecated) Meta label for query languages team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants