We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
from sqlglot.executor import execute output = execute( "select id from orders where timestamp>Date('now', '-1 day')", tables={"orders": [ {"id": 1, "timestamp": "2023-01-02"}, {"id": 2, "timestamp": "2023-01-02"}, ]})
Error message
sqlglot.errors.ExecuteError: Step 'Scan: orders (1460336550880)' failed: name 'DATE' is not defined
The text was updated successfully, but these errors were encountered:
72c5995
you need to transpile it to interval form
from sqlglot.executor import execute execute( "select id from orders where CAST(timestamp AS DATETIME)> currenttime() - interval '1' day", tables={"orders": [ {"id": 1, "timestamp": "2023-05-18"}, {"id": 2, "timestamp": "2023-01-02"}, ]})
Sorry, something went wrong.
Fix: interval execution closes tobymao#1650
b7a64a5
tobymao
No branches or pull requests
Error message
The text was updated successfully, but these errors were encountered: