You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@iotdb.apache.org by "Xingyu Liu (Jira)" <ji...@apache.org> on 2022/10/12 02:07:00 UTC

[jira] [Commented] (IOTDB-4592) go client "select last_value()" timestamp get 0

    [ https://issues.apache.org/jira/browse/IOTDB-4592?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17616123#comment-17616123 ] 

Xingyu Liu commented on IOTDB-4592:
-----------------------------------

{{LAST_VALUE}} is an aggregate function. It finds the value with the largest timestamp and its return contains *NO* timestamp column.

Please note that mixed use of {{Aggregate Query}} and {{Timeseries Query}} is not allowed.
For more details of aggregate functions, please take a look at [https://iotdb.apache.org/UserGuide/Master/Query-Data/Aggregate-Query.html]

 

Here is an example:

{{!image-2022-10-12-09-59-52-239.png!}}

The query results contain no timestamp column. In this case, the return value of function "GetTimestamp()" is always 0.

 

For Chinese version:

{{LAST_VALUE}} 是一个聚合查询函数,它能找到有最大时间戳的值,并且返回值中{*}不包含{*}时间戳列。

请注意不要混用聚合查询和时间序列查询,这是不被允许的。

想要了解更多和聚合函数相关的内容,请参考[https://iotdb.apache.org/zh/UserGuide/Master/Query-Data/Aggregate-Query.html|https://iotdb.apache.org/zh/UserGuide/Master/Query-Data/Aggregate-Query.html#%E5%86%85%E7%BD%AE%E8%81%9A%E5%90%88%E5%87%BD%E6%95%B0]

图中是一个查询的示例,可以看到使用了 {{LAST_VALUE}} 的查询结果中不包含时间戳列。此时,函数"GetTimestamp()"的返回值始终为0.

 

> go client "select last_value()" timestamp get 0
> -----------------------------------------------
>
>                 Key: IOTDB-4592
>                 URL: https://issues.apache.org/jira/browse/IOTDB-4592
>             Project: Apache IoTDB
>          Issue Type: Bug
>            Reporter: mxz
>            Assignee: Xingyu Liu
>            Priority: Major
>         Attachments: WechatIMG2.jpeg, image-2022-10-12-09-59-52-239.png
>
>
> go client
> The timestamp obtained through the interface is 0
> !WechatIMG2.jpeg!



--
This message was sent by Atlassian Jira
(v8.20.10#820010)