apache / apache/iotdb-client-csharp

ALIGN BY DEVICE 查询结果错误

オープン
#3 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
C#
スター
24
フォーク
6
PR マージ指標
30日以内にマージされた PR はありません

説明

版本:Apache.IoTDB.Data 1.0.0.3

查询这样的语句,第2行获取不到数据。
sql:select FIRST_VALUE(ctwingCmdBody) as ctwingCmdBody ,MIN_TIME(ctwingCmdBody) as ts from root.beijingheat.commandCreate.IOT16810103.T10495873.P16810103.* where Time >= 2012-05-22T21:51:48.929 and Time < 2023-10-19T13:51:48.929 ALIGN BY DEVICE

cli的执行有结果:

![1697696411896](https://github.com/apache/iotdb-client-csharp/assets/10105646/aaaf2ee6-c525-451a-b780-d3223b3730a7)

测试代码如下:

using System.Data;
using Apache.IoTDB.Data;
using Microsoft.Extensions.Logging;

namespace ConsoleApp2
{
internal class Program
{
static void Main(string[] args)
{
string sql = "select FIRST_VALUE(ctwingCmdBody) as ctwingCmdBody ,MIN_TIME(ctwingCmdBody) as ts from root.beijingheat.commandCreate.IOT16810103.T10495873.P16810103.* where Time >= 2012-05-22T21:51:48.929 and Time < 2023-10-19T13:51:48.929 ALIGN BY DEVICE ";

IoTDBConnection _ioTDB= new IoTDBConnection("DataSource=192.168.1.101;Port=6667;Username=root;Password=root;Compression=false"); ;

Apache.IoTDB.SessionPool _session= _ioTDB.SessionPool;

Task.Run(async () =>
{
_session.Open();

var query =await _session.ExecuteQueryStatementAsync(sql);
while (query.HasNext())
{
var next = query.Next();
var values = next.Values;
var time = next.GetDateTime();
foreach (var item in values)
{
Console.WriteLine($"{item}");
}

}

});
Console.ReadLine();
}
}
}

执行结果如下:
![image](https://github.com/apache/iotdb-client-csharp/assets/10105646/c080d514-ff55-47e5-9473-99e2bd312e6d)

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

調査の方向性

Start with the supplied C# console reproduction and the ExecuteQueryStatementAsync entry point, then inspect how the returned query rows and Values are iterated for the ALIGN BY DEVICE statement. Compare the client output with the CLI result, focusing on why the second row is missing. Done means the C# client returns the same rows as the CLI for this SQL.

索引モデルが issue の本文から書いたものです。

評価

技術スタック
csharp
領域
databases
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。