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

TDengine分页查询时,报错Encountered unexpected token: "interval #5827

Open
sywshu opened this issue Dec 5, 2023 · 1 comment
Open

Comments

@sywshu
Copy link

sywshu commented Dec 5, 2023

当前使用版本(必填,否则不予处理)

v3.5.3

该问题是如何引起的?(确定最新版也有问题再提!!!)

c.b.m.e.p.i.PaginationInnerInterceptor : optimize this sql to a count sql has exception, sql:"SELECT _wstart as ts ,avg(water_level) as water_level ,avg(water_level_elevation) as water_level_elevation,avg(battery) as battery
from db_cellar_platform.t_cellar_history_data
WHERE
1=1

		and ts  >=   ?
	  
	 
		and ts <=   ?
	 
	 
		and device_id in
		 (  
		?
	 ) 
	   
	 interval(1d) fill(prev)", exception:

net.sf.jsqlparser.parser.ParseException: Encountered unexpected token: "interval" "INTERVAL"
at line 17, column 4.

Was expecting one of:

";"
"CONNECT"
"EMIT"
"GROUP"
"HAVING"
"START"
<EOF>

重现步骤(如果有就写完整)

报错信息

c.b.m.e.p.i.PaginationInnerInterceptor : optimize this sql to a count sql has exception, sql:"SELECT _wstart as ts ,avg(water_level) as water_level ,avg(water_level_elevation) as water_level_elevation,avg(battery) as battery
from db_cellar_platform.t_cellar_history_data
WHERE
1=1

		and ts  >=   ?
	  
	 
		and ts <=   ?
	 
	 
		and device_id in
		 (  
		?
	 ) 
	   
	 interval(1d) fill(prev)", exception:

net.sf.jsqlparser.parser.ParseException: Encountered unexpected token: "interval" "INTERVAL"
at line 17, column 4.

Was expecting one of:

";"
"CONNECT"
"EMIT"
"GROUP"
"HAVING"
"START"
<EOF>
@springbootyp
Copy link

我也出现如上错误,请问解决了吗?
Caused by: net.sf.jsqlparser.parser.ParseException: Encountered unexpected token: "?" "?"
at line 2, column 36.

Was expecting one of:

";"
"ACTION"
"ACTIVE"
"ALGORITHM"
"ARCHIVE"
"ARRAY"
"AS"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants