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/10/18 08:44:53 UTC

[GitHub] [iotdb] CritasWang opened a new issue, #7644: 能否支持对不固定子节点的函数运算

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

   **Is your feature request related to a problem? Please describe.**
   当我查询一些最新数据时,比如查询最新的10条,可以通过order by time desc limit 10。
   但是有时候需要对查询回来的每一行的数据做运算,比如求和、取平均值等等。
   当子节点明确时 可以通过 select s1+s2+s3 from root.data.g_0.d_0 order by time desc limit 10;
   但现实的场景中子节点是不固定的,名称也是未知的。
   可以通过目前的group by对子节点进行聚合后进行函数运算,但是无法支持取最近10个时间序列每一个时间点的单独计算。
   
   **Describe the solution you'd like**
   是否可以增加一些函数用来对子节点的值进行计算。比如 增加 node_sum 函数
   比如 select node_sum(*) from root.data.g_0.d_0.* order by time desc limit 10;
   +-----------------------------+-------------------------------------------------------------------+
   |                                           Time|                                                               node_sum(root.data.g_0.d_0.*)|
   +-----------------------------+-------------------------------------------------------------------+
   |2022-10-18T16:41:24.195+08:00|                                                                                                         0.0|
   |2022-10-18T16:41:09.195+08:00|                                                                                                         0.0|
   |2022-10-18T16:40:54.195+08:00|                                                                                                        0.0|
   |2022-10-18T16:40:39.195+08:00|                                                                                                        0.0|
   |2022-10-18T16:40:24.195+08:00|                                                                                                        0.0|
   |2022-10-18T16:40:09.195+08:00|                                                                                                        0.0|
   |2022-10-18T16:39:54.195+08:00|                                                                                                 5.36E8|
   |2022-10-18T16:39:39.822+08:00|                                                                                                 5.82E8|
   |2022-10-18T16:39:24.195+08:00|                                                                                                        0.0|
   |2022-10-18T16:39:09.195+08:00|                                                                                                        0.0|
   +--------------------------------+----------------------------------------------------------------+
   **Describe alternatives you've considered**
   现有的方案只能查询出来后通过遍历每一行、每一个子节点来进行计算。
   
   **Additional context**
   


-- 
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] CritasWang closed issue #7644: 能否支持对不固定子节点的函数运算

Posted by GitBox <gi...@apache.org>.
CritasWang closed issue #7644: 能否支持对不固定子节点的函数运算
URL: https://github.com/apache/iotdb/issues/7644


-- 
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] zhangyf001 commented on issue #7644: 能否支持对不固定子节点的函数运算

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

   花里胡哨


-- 
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