-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
interval 时间划分有问题 #27897
Comments
SQL 不完整,请补充一下 |
select _WSTART AS ts,17581 AS id,19 as station,11 as unit,6 as db,0 AS ord, LAST(result) AS result from mydb_unit6.normal_point_17581_19_11_6 where ts >= '2024-09-12 00:00:00.000' and ts <= '2024-09-12 09:39:01.999' interval(3h) fill(PREV) limit 0 ,300000 ; 这个是我的 sql 仅用了_start 伪劣 分别进行了 3h 和 4h 间隔 然后间隔得到的 ts 没有理解 为啥不是都是从 0 点开始间隔 而有一个是从 23 点开始的 麻烦了 主要想知道这个时间间隔的规律是怎样的 方便我们这边处理数据
On September 18, 2024 at 9:27:41 AM, Yu Chen ***@***.***) wrote:
SQL 不完整,请补充一下
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.
|
规律是从UTC-0时区,1970年1月1日 0点0分开始切分窗口,所以不是从你指���的时间开始切分的,如果想自定义,需要自己控制偏移量:参考文章https://mp.weixin.qq.com/s/Kc7wzzRiK4XhAsL48rD6dg |
我想说明的是,不管是哪个时区进行 我的两个 sql 分别是 3h 和 4h 去进行时间间隔 这两个时间间隔都是可以被 24h 整除的 也就是说即使是 1970年1月1日 0点0分 0 秒开始进行切分 不应该每次都有 0 点 0 分 0 秒吗
On September 24, 2024 at 2:35:04 PM, Yu Chen ***@***.***) wrote:
规律是从UTC-0时区,1970年1月1日 0点0分开始切分窗口,所以不是从你指定的时间开始切分的,如果想自定义,需要自己控制偏移量:参考文章https://mp.weixin.qq.com/s/Kc7wzzRiK4XhAsL48rD6dg
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.
|
对呀,你没发现你两个查询都有8吗,这就是对齐时候的时间点 0 ���上东八区的 8 小时。 |
一个 3h 和 4h 间隔 为啥时间起始不一样��� 不是都从 0 点开始 我使用了伪劣 请仔细看下我的结果 时间间隔的规则是什么
Bug Description
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior:
Expected Behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Environment (please complete the following information):
Additional Context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: