anykhub opened a new issue, #8682:
URL: https://github.com/apache/iotdb/issues/8682

   ### Search before asking
   
   - [X] I searched in the [issues](https://github.com/apache/iotdb/issues) and 
found nothing similar.
   
   
   ### Version
   
   V1.0.0
   
   ### Describe the bug and provide the minimal reproduce step
   
   1. sql语句:
   ` select last inv_I_dispersion_level from 
root.DZ00000001.WZXB000001.WZHL000003.WZNB000002,root.DZ00000001.WZXB000001.WZHL000003.WZNB000003,root.DZ00000001.WZXB000001.WZHL000003.WZNB000004`
   
   2. 以上sql语句查询,任意两个设备组合使用last查询都没问题。
   
   
   ### What did you expect to see?
   
   
![1672392305123](https://user-images.githubusercontent.com/29217894/210054809-d7b884af-da77-450c-9c17-790760b04877.jpg)
   
   
   ### What did you see instead?
   
   服务端报错:`2022-12-30 13:31:51,424 [pool-36-IoTDB-ClientRPC-Processor-2377] WARN 
 o.a.i.d.u.ErrorHandlingUtils:90 - Status code: 301, Query Statement: "SELECT 
last inv_I_dispersion_level from 
   root.DZ00000001.WZXB000001.WZHL000003.WZNB000002,
   root.DZ00000001.WZXB000001.WZHL000003.WZNB000003,
   root.DZ00000001.WZXB000001.WZHL000003.WZNB000004". executeStatement failed 
   org.apache.iotdb.commons.exception.IoTDBException: 
java.lang.NullPointerException
        at 
org.apache.iotdb.db.mpp.plan.execution.QueryExecution.dealWithException(QueryExecution.java:430)
        at 
org.apache.iotdb.db.mpp.plan.execution.QueryExecution.getResult(QueryExecution.java:413)
        at 
org.apache.iotdb.db.mpp.plan.execution.QueryExecution.getBatchResult(QueryExecution.java:439)
        at 
org.apache.iotdb.db.utils.QueryDataSetUtils.convertTsBlockByFetchSize(QueryDataSetUtils.java:204)
        at 
org.apache.iotdb.db.service.thrift.impl.ClientRPCServiceImpl.lambda$static$1(ClientRPCServiceImpl.java:168)
        at 
org.apache.iotdb.db.service.thrift.impl.ClientRPCServiceImpl.executeStatementInternal(ClientRPCServiceImpl.java:236)
        at 
org.apache.iotdb.db.service.thrift.impl.ClientRPCServiceImpl.executeStatement(ClientRPCServiceImpl.java:825)
        at 
org.apache.iotdb.service.rpc.thrift.IClientRPCService$Processor$executeStatement.getResult(IClientRPCService.java:3603)
        at 
org.apache.iotdb.service.rpc.thrift.IClientRPCService$Processor$executeStatement.getResult(IClientRPCService.java:3583)
        at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:38)
        at 
org.apache.iotdb.db.service.thrift.ProcessorWithMetrics.process(ProcessorWithMetrics.java:64)
        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:750)
   Caused by: java.lang.NullPointerException: null
        at 
org.apache.iotdb.db.mpp.execution.operator.process.last.LastQueryUtil.appendLastValue(LastQueryUtil.java:108)
        at 
org.apache.iotdb.db.mpp.execution.operator.process.last.LastQueryMergeOperator.next(LastQueryMergeOperator.java:171)
        at 
org.apache.iotdb.db.mpp.execution.driver.Driver.processInternal(Driver.java:186)
        at 
org.apache.iotdb.db.mpp.execution.driver.Driver.lambda$processFor$1(Driver.java:125)
        at 
org.apache.iotdb.db.mpp.execution.driver.Driver.tryWithLock(Driver.java:270)
        at 
org.apache.iotdb.db.mpp.execution.driver.Driver.processFor(Driver.java:118)
        at 
org.apache.iotdb.db.mpp.execution.schedule.DriverTaskThread.execute(DriverTaskThread.java:64)
        at 
org.apache.iotdb.db.mpp.execution.schedule.AbstractDriverThread.run(AbstractDriverThread.java:74)`
   
   ### Anything else?
   
   服务端的data数据
   [data.zip](https://github.com/apache/iotdb/files/10323877/data.zip)
   
   
   ### Are you willing to submit a PR?
   
   - [X] I'm willing to submit a PR!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscr...@iotdb.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to