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

STDDEV 函数计算结果随机出现结果为0 #26484

Open
chenkline opened this issue Jul 9, 2024 · 2 comments
Open

STDDEV 函数计算结果随机出现结果为0 #26484

chenkline opened this issue Jul 9, 2024 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@chenkline
Copy link

Bug Description
STDDEV 函数计算结果随机出现结果为0

To Reproduce
数据库&表结构:
CREATE DATABASE IF NOT EXISTS ue_ping KEEP 365 DURATION 3d BUFFER 96 VGROUPS 12 WAL_LEVEL 1;
CREATE STABLE IF NOT EXISTS ue_ping.s_ue_ping (ts timestamp, delay bigint) TAGS (imsi binary(36));
子表预创建,以001010000000084为例,子表建表语句:
CREATE TABLE IF NOT EXISTS ue_ping.t_ue_ping_001010000000084 USING ue_ping.s_ue_ping TAGS ("001010000000084");

SQL 查询语句:
SELECT
MAX(CASE WHEN delay != 0 THEN delay ELSE NULL END) AS maxDelay,
MIN(CASE WHEN delay != 0 THEN delay ELSE NULL END) AS minDelay,
AVG(CASE WHEN delay != 0 THEN delay ELSE NULL END) AS avgDelay,
STDDEV(CASE WHEN delay != 0 THEN delay ELSE NULL END) AS jitter,
COUNT(CASE WHEN delay = 0 THEN 1 ELSE NULL END) AS timeoutCount,
COUNT(*) AS totalCount
FROM ue_ping.s_ue_ping
WHERE ts between '2024-07-08 11:0:35' and '2024-07-09 11:0:35';

Expected Behavior
查询结果的jitter值每次查询都相同

Screenshots
3320

Environment (please complete the following information):

  • OS: Ubuntu 20.04.3 LTS
  • 16C32GB, 剩余磁盘空间709GB
  • TDengine Version 3.3.0.0 / 3.3.2.0

Additional Context

  • 容器化单节点部署环境说明, Docker version 20.10.13, Docker Compose version v2.3.3
  • Docker Compose 配置文件
    version: "3.7"
    name: ailink-aiums
    services:
    ailink-tdengine:
    image: tdengine/tdengine:3.3.2.0
    build:
    #容器构建相对路径/绝对路径
    context: /opt/OMC/aiums/dockfile
    #指定构建的Dockerfile
    dockerfile: Dockerfile_tdengine
    network_mode: "host"
    environment:
    AIUMS_TAOS_USER_NAME: root
    AIUMS_TAOS_PASSWORD: AIUMSDB@123456
    volumes:
    - /opt/OMC/var/lib/taos:/var/lib/taos
    - /opt/OMC/var/log/taos:/var/log/taos
    - /opt/OMC/aiums/tdengine/initdb:/var/initdb
    - /opt/OMC/aiums/tdengine/config/taos.cfg:/etc/taos/taos.cfg
    container_name: ailink-tdengine
    restart: always

/opt/OMC/aiums/tdengine/config/taos.cfg 配置内容:

fqdn buildkitsandbox
supportVnodes 80
monitor 1
monitorFQDN buildkitsandbox
audit 1
timezone Hongkong

@chenkline chenkline added the bug Something isn't working label Jul 9, 2024
@yu285
Copy link
Contributor

yu285 commented Jul 9, 2024

收到我们处理一下

@yu285
Copy link
Contributor

yu285 commented Jul 16, 2024

下个版本会修复,请到时候升级验证

@yu285 yu285 self-assigned this Jul 19, 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
2 participants