Skip to content
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

order by ts desc returns incorrect results #25780

Closed
denzellin opened this issue May 14, 2024 · 1 comment
Closed

order by ts desc returns incorrect results #25780

denzellin opened this issue May 14, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@denzellin
Copy link

A clear and concise description of what the bug is.

Steps to reproduce the behavior:

  1. 创建表:CREATE STABLE if not exists vital_surface (ts timestamp, user_id bigint unsigned, body_temperature binary(20), step_count int, gateway binary(64)) TAGS (mac binary(64))

  2. 插入数据:INSERT INTO vital_surface_#{mac} USING vital_surface TAGS(#{mac})
    VALUES(#{timestamp}, #{userId}, #{bodyTemperature}, #{stepCount}, #{gatewayMac})

  3. 结果集按降序排序时, 结果集没有记录,查询语句:
    select ts from vital_inner where ts >= 1715232974000 and ts <= 1715234460000 and user_id = 1051 order by ts desc;

  4. 结果集升序或默认排序时, 结果集正常,查询语句:
    select ts from vital_inner where ts >= 1715232974000 and ts <= 1715234460000 and user_id = 1051 order by ts asc;

WechatIMG403

数据库版本号信息:

Welcome to the TDengine Command Line Interface, Client Version:3.0.1.4
Copyright (c) 2022 by TDengine, all rights reserved.

Server is Community Edition.

@denzellin denzellin added the bug Something isn't working label May 14, 2024
@danielclow danielclow changed the title order by ts desc查询结果异常 order by ts desc returns incorrect results May 21, 2024
@yu285
Copy link
Contributor

yu285 commented May 22, 2024

3.0早期版本的问题都已经都优化了,但是3.0.2.5 之前可能与现在的最新版(3.3.0.0)并不兼容,所以无法直接升级。因此建议重新部署一下最新的 3.3.0.0 ,后续升级都很方便,直接安装最新版软件即可。

开源版支持操作系统范围:https://docs.taosdata.com/reference/support-platform/

如果还有具体的使用问题,可以加微信:a15652223354

@yu285 yu285 closed this as completed May 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants