opensearch-project / sql

Query your data using familiar SQL or intuitive Piped Processing Language (PPL)
https://opensearch.org/docs/latest/search-plugins/sql/index/
Apache License 2.0
120 stars 139 forks source link

[BUG] Fix the PPL time Zone #3019

Open SricharanSundar opened 1 month ago

SricharanSundar commented 1 month ago

Describe the bug

The PPL query is always giving the results as per the UTC time zone. While i cross check the results with OpenSearch discover those results are mis matching. The discover of OpenSearch is working as per the time zone selected on the dashboard management.

If i select america/newyork as time zone in dashboard management. And checking with ppl the results are mismatching.

If i use UTC as timezone in dashboard management. And checking with ppl the results are matching.

Related component

Search:Aggregations

To Reproduce

  1. Go to '..OpenSearch and select a America/New York time zone in dashboard management.'
  2. Click on 'PPL'
  3. Scroll down to 'query place and write small query like the same filter used in OpenSearch discover and the count'
  4. See error the results are mismatching

Expected behavior

What time we are picking in dashboard management the PPL and discover as per that time. we are using 2.13 version.

Additional Details

Plugins Please list all plugins currently enabled.

Screenshots If applicable, add screenshots to help explain your problem.

Host/Environment (please complete the following information):

Additional context Add any other context about the problem here.

msfroh commented 1 month ago

[Search Triage] @opensearch-project/admin -- Can we please move this to the SQL plugin? That's where PPL is implemented.