-
Notifications
You must be signed in to change notification settings - Fork 322
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
docs(sql): update SQL syntax for WINDOW and JOIN #3555
docs(sql): update SQL syntax for WINDOW and JOIN #3555
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
SQL changes mainly from 4paradigm#3533 and 4paradigm#3554
bd277f9
to
59c36bc
Compare
- 右表 TableRef | ||
1. 仅支持`LAST JOIN`类型。 | ||
2. 至少有一个JOIN条件是形如`left_source.column=right_source.column`的EQUAL条件,**并且`right_source.column`列需要命中右表的索引(key 列)**。 | ||
3. 带排序LAST JOIN的情况下,`ORDER BY`只支持单列的列引用表达式,列类型为 int16, int32, int64 or timestamp, **并且列需要命中右表索引的时间列**。满足条件 2 和 3 的情况我们简单称做表能被 LAST JOIN 的 JOIN 条件优化 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ts column type should be bigint or timestamp? Can we order by
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the five types is supported in SQL engine, is there any difference in deployment ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, if you deploy, creating index will be failed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that's indeed index's restriction, anyway I've remove the two types in case confusing.
docs/zh/openmldb_sql/deployment_manage/ONLINE_REQUEST_REQUIREMENTS.md
Outdated
Show resolved
Hide resolved
- **Since OpenMLDB 0.8.0** 带 WHERE 条件过滤的简单列筛选 ( 例如 `select * from tb where id > 10`) | ||
- 窗口聚合子查询, 例如 `select id, count(val) over w as cnt from t1 window w as (...)`. | ||
- OpenMLDB 0.8.4 之前, LAST JOIN 的窗口聚合子查询需要和 LAST JOIN 的左边输入 source 有相同的主表 | ||
- [ALPHA] OpenMLDB >= 0.8.4, 允许 LAST JOIN 下的窗口聚合子查询不带主表. 详细见下面的例子 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
不带主表的例子是?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个例子不能体现?可否加一个不是主表的例子。也要和“没有主表”区别开,“不带主表”这个词有点歧义
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
79f4e4d
to
a1f6e6a
Compare
most SQL changes come from #3533, #3554, #3565, #3576