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

[BUG] timestamp comparison using "INTERVAL" literal doesn't work against ingested data #763

Open
A-Gray-Cat opened this issue Oct 10, 2024 · 1 comment
Labels
bug Something isn't working Core:MV

Comments

@A-Gray-Cat
Copy link

A-Gray-Cat commented Oct 10, 2024

What is the bug?
When running a direct query, the following query would work and return results

SELECT *
FROM table1
WHERE time_dt BETWEEN CURRENT_TIMESTAMP - INTERVAL '7' DAY AND CURRENT_TIMESTAMP
LIMIT 10

However, when running the same query against a materialized view, covering index, or ingested data, it would error out. After removing the timestamp where clause, the query would go through:
Bad Request, this query is not runnable.

How can one reproduce the bug?
Steps to reproduce the behavior:

  1. Add WHERE timestamp BETWEEN CURRENT_TIMESTAMP - INTERVAL '7' DAY AND CURRENT_TIMESTAMP to any query, and run it against a flint table.
  2. Create a materialized view from the same flint table.
  3. Run the same query against the materialized view you just created, and the timestamp filter will make the query error out.

What is the expected behavior?
The timestamp comparison should work for both flint and local index.

What is your host/environment?

  • OS: [e.g. iOS]
  • Version 2.13, and I also ran the query in future.playground against ingested data.
  • Plugins

Do you have any screenshots?
If applicable, add screenshots to help explain your problem.

Do you have any additional context?
Add any other context about the problem.

@A-Gray-Cat A-Gray-Cat added bug Something isn't working untriaged labels Oct 10, 2024
@YANG-DB
Copy link
Member

YANG-DB commented Oct 10, 2024

@penghuo @dai-chen could u plz take a look ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Core:MV
Projects
None yet
Development

No branches or pull requests

2 participants