iotdb icon indicating copy to clipboard operation
iotdb copied to clipboard

count聚合出错0.13版本

Open 786744873 opened this issue 2 years ago • 5 comments

查询可以,聚合出错

IoTDB> select * from root.sg.JIN_TNC order by Time desc limit 10
+-----------------------------+--------------------+-------------------+-------------------+-------------------+-------------------+-------------------+-------------------+-------------------+-------------------+-------------------+-------------------------+
|                         Time|root.sg.JIN_TNC.IO10|root.sg.JIN_TNC.IO1|root.sg.JIN_TNC.IO3|root.sg.JIN_TNC.IO2|root.sg.JIN_TNC.IO5|root.sg.JIN_TNC.IO4|root.sg.JIN_TNC.IO7|root.sg.JIN_TNC.IO6|root.sg.JIN_TNC.IO9|root.sg.JIN_TNC.IO8|       root.sg.JIN_TNC.tm|
+-----------------------------+--------------------+-------------------+-------------------+-------------------+-------------------+-------------------+-------------------+-------------------+-------------------+-------------------+-------------------------+
|2022-06-25T13:20:35.183+08:00|                1.00|               0.00|               1.00|               1.00|               1.00|               1.00|               1.00|               1.00|               1.00|               1.00|2022-06-25T13:20:34+08:00|
|2022-06-25T13:20:35.026+08:00|                1.00|               0.00|               1.00|               1.00|               1.00|               1.00|               1.00|               1.00|               1.00|               1.00|2022-06-25T13:20:33+08:00|
|2022-06-25T13:20:34.558+08:00|                1.00|               0.00|               1.00|               1.00|               1.00|               1.00|               1.00|               1.00|               1.00|               1.00|2022-06-25T13:20:33+08:00|
|2022-06-25T13:20:34.417+08:00|                1.00|               0.00|               1.00|               1.00|               1.00|               1.00|               1.00|               1.00|               1.00|               1.00|2022-06-25T13:20:33+08:00|
|2022-06-25T13:20:34.292+08:00|                1.00|               0.00|               1.00|               1.00|               1.00|               1.00|               1.00|               1.00|               1.00|               1.00|2022-06-25T13:20:33+08:00|
|2022-06-25T13:20:34.151+08:00|                1.00|               0.00|               1.00|               1.00|               1.00|               1.00|               1.00|               1.00|               1.00|               1.00|2022-06-25T13:20:33+08:00|
|2022-06-25T13:20:33.933+08:00|                1.00|               0.00|               1.00|               1.00|               1.00|               1.00|               1.00|               1.00|               1.00|               1.00|2022-06-25T13:20:32+08:00|
|2022-06-25T13:20:33.776+08:00|                1.00|               0.00|               1.00|               1.00|               1.00|               1.00|               1.00|               1.00|               1.00|               1.00|2022-06-25T13:20:32+08:00|
|2022-06-25T13:20:33.323+08:00|                1.00|               0.00|               1.00|               1.00|               1.00|               1.00|               1.00|               1.00|               1.00|               1.00|2022-06-25T13:20:32+08:00|
|2022-06-25T13:20:33.183+08:00|                1.00|               0.00|               1.00|               1.00|               1.00|               1.00|               1.00|               1.00|               1.00|               1.00|2022-06-25T13:20:32+08:00|
+-----------------------------+--------------------+-------------------+-------------------+-------------------+-------------------+-------------------+-------------------+-------------------+-------------------+-------------------+-------------------------+
Total line number = 10
It costs 0.025s
IoTDB> select count(*) from root.sg.JIN_TNC
Msg: 500: [INTERNAL_SERVER_ERROR(500)] Exception occurred: "select count(*) from root.sg.JIN_TNC". executeStatement failed. java.nio.BufferUnderflowException

IOTDB中的报错信息

2022-06-25 13:20:50,547 [pool-15-IoTDB-RPC-Client-1] WARN  o.a.i.d.u.ErrorHandlingUtils:61 - Status code: INTERNAL_SERVER_ERROR(500), operation: "select count(*) from root.sg.JIN_TNC". executeStatement failed
java.util.concurrent.ExecutionException: java.nio.BufferUnderflowException
        at java.util.concurrent.FutureTask.report(FutureTask.java:122)
        at java.util.concurrent.FutureTask.get(FutureTask.java:192)
        at org.apache.iotdb.db.service.thrift.impl.TSServiceImpl.submitQueryTask(TSServiceImpl.java:785)
        at org.apache.iotdb.db.service.thrift.impl.TSServiceImpl.executeStatement(TSServiceImpl.java:619)
        at org.apache.iotdb.service.rpc.thrift.TSIService$Processor$executeStatement.getResult(TSIService.java:2853)
        at org.apache.iotdb.service.rpc.thrift.TSIService$Processor$executeStatement.getResult(TSIService.java:2833)
        at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:38)
        at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:38)
        at org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:248)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)
Caused by: java.nio.BufferUnderflowException: null
        at java.nio.HeapByteBuffer.get(HeapByteBuffer.java:154)
        at org.apache.iotdb.tsfile.utils.ReadWriteIOUtils.readVarIntString(ReadWriteIOUtils.java:601)
        at org.apache.iotdb.tsfile.file.metadata.MetadataIndexEntry.deserializeFrom(MetadataIndexEntry.java:66)
        at org.apache.iotdb.tsfile.file.metadata.MetadataIndexNode.deserializeFrom(MetadataIndexNode.java:103)
        at org.apache.iotdb.tsfile.read.TsFileSequenceReader.getLeafMetadataIndexPair(TsFileSequenceReader.java:480)
        at org.apache.iotdb.tsfile.read.TsFileSequenceReader.readTimeseriesMetadata(TsFileSequenceReader.java:444)
        at org.apache.iotdb.db.engine.cache.TimeSeriesMetadataCache.get(TimeSeriesMetadataCache.java:199)
        at org.apache.iotdb.db.utils.FileLoaderUtils.loadTimeSeriesMetadata(FileLoaderUtils.java:104)
        at org.apache.iotdb.db.query.reader.series.SeriesReader.loadTimeSeriesMetadata(SeriesReader.java:1125)
        at org.apache.iotdb.db.query.reader.series.SeriesReader.unpackSeqTsFileResource(SeriesReader.java:1091)
        at org.apache.iotdb.db.query.reader.series.SeriesReader.tryToUnpackAllOverlappedFilesToTimeSeriesMetadata(SeriesReader.java:1014)
        at org.apache.iotdb.db.query.reader.series.SeriesReader.hasNextFile(SeriesReader.java:263)
        at org.apache.iotdb.db.query.reader.series.SeriesAggregateReader.hasNextFile(SeriesAggregateReader.java:93)
        at org.apache.iotdb.db.query.executor.AggregationExecutor.aggregateFromReader(AggregationExecutor.java:390)
        at org.apache.iotdb.db.query.executor.AggregationExecutor.aggregateOneSeries(AggregationExecutor.java:304)
        at org.apache.iotdb.db.query.executor.AggregationExecutor.aggregateOneSeries(AggregationExecutor.java:195)
        at org.apache.iotdb.db.query.executor.AggregationExecutor.executeWithoutValueFilter(AggregationExecutor.java:149)
        at org.apache.iotdb.db.query.executor.QueryRouter.aggregate(QueryRouter.java:123)
        at org.apache.iotdb.db.qp.executor.PlanExecutor.processDataQuery(PlanExecutor.java:630)
        at org.apache.iotdb.db.qp.executor.PlanExecutor.processQuery(PlanExecutor.java:258)
        at org.apache.iotdb.db.service.basic.ServiceProvider.createQueryDataSet(ServiceProvider.java:264)
        at org.apache.iotdb.db.service.thrift.impl.TSServiceImpl.executeQueryPlan(TSServiceImpl.java:821)
        at org.apache.iotdb.db.service.thrift.impl.TSServiceImpl.access$000(TSServiceImpl.java:163)
        at org.apache.iotdb.db.service.thrift.impl.TSServiceImpl$QueryTask.call(TSServiceImpl.java:221)
        at org.apache.iotdb.db.service.thrift.impl.TSServiceImpl$QueryTask.call(TSServiceImpl.java:165)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        ... 3 common frames omitted

786744873 avatar Jun 25 '22 05:06 786744873

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

github-actions[bot] avatar Jun 25 '22 05:06 github-actions[bot]

初步判断了下,是因为之前的部分数据中有数据为null,但是作为聚合来说,有null的数据也应该可以聚合才合理。还请您指点一下

786744873 avatar Jun 25 '22 05:06 786744873

你好,麻烦关注下这个issue,可以提供远程访问环境

786744873 avatar Jun 28 '22 03:06 786744873

加个微信吧:qiaojialin1993

qiaojialin avatar Jun 28 '22 03:06 qiaojialin

好的,谢谢

786744873 avatar Jul 01 '22 09:07 786744873