iotdb icon indicating copy to clipboard operation
iotdb copied to clipboard

Discrepancy in Count Query Results Between Grafana-Plugins and IoTDB CLI

Open SeanGaluzzi opened this issue 2 years ago • 5 comments

Search before asking

  • [X] I searched in the issues and found nothing similar.

Version

  • IoTDB 1.2.2 Standalone
  • IoTDB Grafana Plugin 1.0 (Grafana interface)
  • Grafana 10.2.2

Describe the bug and provide the minimal reproduce step

Problem Description

When executing a SELECT COUNT(DISTINCT()) query, there's an observed inconsistency in the returned count value between Grafana-Plugins and the IoTDB CLI. While the IoTDB CLI returns the expected and accurate count, the Grafana-Plugins display an incorrect count number.

IoTDB CLI Result (Correct Count)

IoTDB CLI Result IoTDB CLI Query

Grafana Explore Query (Incorrect Count)

Grafana Explore Query Grafana Explore Result

Steps to Reproduce

  1. Execute the SELECT COUNT(DISTINCT()) query using IoTDB CLI.
  2. Execute the same query using Grafana-Plugins within the Grafana Explore interface.
  3. Compare the returned count values.

What did you expect to see?

Expected Behavior

The count value returned by Grafana-Plugins should align with the count value retrieved using IoTDB CLI for the same COUNT(DISTINCT()) query.

What did you see instead?

Actual Behavior

During the execution of the SELECT COUNT(DISTINCT()) query using Grafana-Plugins, the returned count value deviates from the expected count. Specifically, the count value displayed in Grafana-Plugins is 0, whereas the accurate count obtained through IoTDB CLI is 2.

Anything else?

The blurried part of the path are just for obscure sensitive data.

Are you willing to submit a PR?

  • [ ] I'm willing to submit a PR!

SeanGaluzzi avatar Dec 13 '23 14:12 SeanGaluzzi

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

github-actions[bot] avatar Dec 13 '23 14:12 github-actions[bot]

@CloudWise-Lukemiao PTAL?

HTHou avatar Dec 14 '23 02:12 HTHou

Grafana queries may include time conditions, which may be the reason for this.

CritasWang avatar Dec 25 '23 08:12 CritasWang

while use the COUNT(DISTINCT()) function the timestamp changed from (for example) 2023-01-10 to 1754-08-30

SeanGaluzzi avatar Jan 10 '24 08:01 SeanGaluzzi

any updates?

SeanGaluzzi avatar Feb 22 '24 09:02 SeanGaluzzi