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

Are temporary result sets supported for nested queries? #25482

Closed
foow123 opened this issue Apr 25, 2024 · 5 comments
Closed

Are temporary result sets supported for nested queries? #25482

foow123 opened this issue Apr 25, 2024 · 5 comments
Labels
help wanted Extra attention is needed question Further information is requested

Comments

@foow123
Copy link

foow123 commented Apr 25, 2024

例如如下SQL语法:
SELECT * FROM ( VALUES ( 1 ), ( 2 ) ) AS temp(col1) ........
TDEngine中似乎找不到对应的语法,请问TDEngine中是否有对应构建临时结果集的方法,或者以后有没有计划添加?

@foow123 foow123 added help wanted Extra attention is needed question Further information is requested labels Apr 25, 2024
@danielclow danielclow changed the title 嵌套查询是否支持构造临时结果集? Are temporary result sets supported for nested queries? Apr 26, 2024
@yu285
Copy link
Contributor

yu285 commented May 9, 2024

可以看下嵌套查询是否满足。

@foow123
Copy link
Author

foow123 commented May 13, 2024

是,嵌套查询可以完成,我现在就是这么处理的,但这需要先创建一个临时表,然后将数据写入,再进行嵌套查询,最后再将临时表删除,而我仅仅只需要生成一个结果集进行数据处理而已,现在这种处理方式感觉太麻烦了

@yu285
Copy link
Contributor

yu285 commented May 17, 2024

不好意思,没有太理解哈。嵌套查询不会创建临时表,再删除呢。不可以直接用select xxx from (select xxx ) 直接返回最终结果集吗?

@foow123
Copy link
Author

foow123 commented May 20, 2024

中间查询的那部分临时数据并不保存在TDEngine中,只是其它模块请求时使用的参数,查询语句是从postgresql移植过来的,所以向问下是否有相应的查询方法

@yu285 yu285 closed this as completed May 22, 2024
@yu285
Copy link
Contributor

yu285 commented May 22, 2024

这个确实没有

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants