-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Closed
Labels
BugIncorrect or unexpected behaviorIncorrect or unexpected behaviorSQLIssues or changes relating to SQL executionIssues or changes relating to SQL executionhacktoberfestA good issue for Hacktoberfest 2025 contributors. No AI-driven commits, pleaseA good issue for Hacktoberfest 2025 contributors. No AI-driven commits, pleaseinternalopen source
Description
To reproduce
This query is wrong because it is using DECLARE for each variable, rather than using it just once and comma separate all the variables. However, the SQL parser is not complaining about DECLARE not expected there, or being duplicate, but instead it is complaining that the variable @from_time is not being used, so it seems it is ignoring whatever it is before the last DECLARE.
DECLARE
@from_time := dateadd('h',-1,now()),
DECLARE @to_time := now()
WITH t as (
select now() as ts
)
select * from t where ts between @from_time and @to_time;
QuestDB version:
9.0.3
OS, in case of Docker specify Docker and the Host OS:
ubuntu, mac, demo instance
File System, in case of Docker specify Host File System:
ext4
Full Name:
javier
Affiliation:
questdb
Have you followed Linux, MacOs kernel configuration steps to increase Maximum open files and Maximum virtual memory areas limit?
- Yes, I have
Additional context
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
BugIncorrect or unexpected behaviorIncorrect or unexpected behaviorSQLIssues or changes relating to SQL executionIssues or changes relating to SQL executionhacktoberfestA good issue for Hacktoberfest 2025 contributors. No AI-driven commits, pleaseA good issue for Hacktoberfest 2025 contributors. No AI-driven commits, pleaseinternalopen source