You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@iotdb.apache.org by GitBox <gi...@apache.org> on 2022/05/05 13:40:41 UTC

[GitHub] [iotdb] guoxiaodonggit opened a new issue, #5809: 0.12.5 升级到0.13.0后,聚合查询求和时没有数据的行不会补零,而是返回了“null”

guoxiaodonggit opened a new issue, #5809:
URL: https://github.com/apache/iotdb/issues/5809

   select sum(jiangyuliang) from root.disaster.sd.* where time>=2022-05-01T08:00:00 and time<=2022-05-01T23:00:00 align by device
   ![image](https://user-images.githubusercontent.com/22020430/166934870-9fcabd76-1ac0-4329-913e-e15a2878e56d.png)
   
   使用group by 聚合分组查询也是一样返回了null,不过group by查询时,可以使用 fill(0) 来兼容之前的代码,而非group by 查询时,结果使用fill(0)报错:411: Error occurred in query process: The condition of WHERE clause must be like time=constant


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [iotdb] Alima777 commented on issue #5809: 0.12.5 升级到0.13.0后,聚合查询求和时没有数据的行不会补零,而是返回了“null”

Posted by GitBox <gi...@apache.org>.
Alima777 commented on issue #5809:
URL: https://github.com/apache/iotdb/issues/5809#issuecomment-1119195823

   I'm sorry about that. The result will show null when there is no data. Why we don't show 0 any more is that we can't know it's no data or the true sum value is 0. Therefore, it's bug actually in 0.12.5, but it's fixed in 0.13.0. It will be fixed in 0.12.6 too. You may have to modify your code before.
   
   聚合结果在时间序列没有数据时会返回 null,因为此时如果返回0的话就不知道是因为没有数据还是真正的sum值就是0。
   因此0.12.5返回 0 其实是个bug,0.13.0 修复了这一bug,后续 0.12.6也会修复这个bug。因此可能需要您对之前的代码判断做一些修改。


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [iotdb] jixuan1989 commented on issue #5809: 0.12.5 升级到0.13.0后,聚合查询求和时没有数据的行不会补零,而是返回了“null”

Posted by GitBox <gi...@apache.org>.
jixuan1989 commented on issue #5809:
URL: https://github.com/apache/iotdb/issues/5809#issuecomment-1120402934

   > 聚合结果在时间序列没有数据时会返回 null,因为此时如果返回0的话就不知道是因为没有数据还是真正的sum值就是0。
   因此0.12.5返回 0 其实是个bug,0.13.0 修复了这一bug,后续 0.12.6也会修复这个bug。因此可能需要您对之前的代码判断做一些修改。
   
   hm... 
   if we have a time series `root.a.b`, but the series has no data. How about the following 4 sqls:
   1. select max(b) from root.*;
   2. select max(b) from root.* group by ([t1, t2], 5m);
   3. select max(b) from root.a;
   4. select max(b) from root.* group by ([t1, t2], 5m);
   5. 
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [iotdb] github-actions[bot] commented on issue #5809: 0.12.5 升级到0.13.0后,聚合查询求和时没有数据的行不会补零,而是返回了“null”

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on issue #5809:
URL: https://github.com/apache/iotdb/issues/5809#issuecomment-1118568594

   Hi, this is your first issue in IoTDB project. Thanks for your report. Welcome to join the community!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [iotdb] jixuan1989 commented on issue #5809: 0.12.5 升级到0.13.0后,聚合查询求和时没有数据的行不会补零,而是返回了“null”

Posted by GitBox <gi...@apache.org>.
jixuan1989 commented on issue #5809:
URL: https://github.com/apache/iotdb/issues/5809#issuecomment-1120515159

   so,  the common rule is: raw data query will return empty while aggregation-based query will return null if there is no data?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [iotdb] jixuan1989 commented on issue #5809: 0.12.5 升级到0.13.0后,聚合查询求和时没有数据的行不会补零,而是返回了“null”

Posted by GitBox <gi...@apache.org>.
jixuan1989 commented on issue #5809:
URL: https://github.com/apache/iotdb/issues/5809#issuecomment-1120426455

   and how about raw data query? ` select b from root.*`?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [iotdb] Alima777 commented on issue #5809: 0.12.5 升级到0.13.0后,聚合查询求和时没有数据的行不会补零,而是返回了“null”

Posted by GitBox <gi...@apache.org>.
Alima777 commented on issue #5809:
URL: https://github.com/apache/iotdb/issues/5809#issuecomment-1124483064

   > so, the common rule is: raw data query will return empty while aggregation-based query will return null if there is no data?
   
   Hi, I found that count is an expection. Count will return 0 when there is no data, while others will return null.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [iotdb] Alima777 closed issue #5809: 0.12.5 升级到0.13.0后,聚合查询求和时没有数据的行不会补零,而是返回了“null”

Posted by GitBox <gi...@apache.org>.
Alima777 closed issue #5809: 0.12.5 升级到0.13.0后,聚合查询求和时没有数据的行不会补零,而是返回了“null”
URL: https://github.com/apache/iotdb/issues/5809


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [iotdb] Alima777 commented on issue #5809: 0.12.5 升级到0.13.0后,聚合查询求和时没有数据的行不会补零,而是返回了“null”

Posted by GitBox <gi...@apache.org>.
Alima777 commented on issue #5809:
URL: https://github.com/apache/iotdb/issues/5809#issuecomment-1126041901

   This issue is fixed in #5812 . I will close this issue.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [iotdb] Alima777 commented on issue #5809: 0.12.5 升级到0.13.0后,聚合查询求和时没有数据的行不会补零,而是返回了“null”

Posted by GitBox <gi...@apache.org>.
Alima777 commented on issue #5809:
URL: https://github.com/apache/iotdb/issues/5809#issuecomment-1120426876

   Just result header without data, like this:
   
   <img width="239" alt="image" src="https://user-images.githubusercontent.com/34242296/167300437-151de700-9d0e-4cb8-976a-98eaf84024db.png">
   
   
   > and how about raw data query? ` select b from root.*`?
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [iotdb] Alima777 commented on issue #5809: 0.12.5 升级到0.13.0后,聚合查询求和时没有数据的行不会补零,而是返回了“null”

Posted by GitBox <gi...@apache.org>.
Alima777 commented on issue #5809:
URL: https://github.com/apache/iotdb/issues/5809#issuecomment-1120424249

   All 4 sqls will return null, multi null while using group by interval.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org