You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@iotdb.apache.org by "changxue (Jira)" <ji...@apache.org> on 2022/11/11 06:09:00 UTC

[jira] [Created] (IOTDB-4913) [write] instert null to timeseries throws NPE

changxue created IOTDB-4913:
-------------------------------

             Summary: [write] instert null to timeseries throws NPE
                 Key: IOTDB-4913
                 URL: https://issues.apache.org/jira/browse/IOTDB-4913
             Project: Apache IoTDB
          Issue Type: Bug
          Components: Core/Server
    Affects Versions: 0.14.0-SNAPSHOT
            Reporter: changxue
            Assignee: Haonan Hou


 [write] instert null to timeseries throws NPE

environment:
3C3D cluster, Nov.11 master source codes

reproduction:
{code}
CREATE TIMESERIES root.sg1.d1.s1 WITH DATATYPE=double, ENCODING=PLAIN;
INSERT INTO root.sg1.d1(timestamp, s1) VALUES (6, 10),(7,12),(8,14),(9,160),(10,null),(11,58);

SQLSTATE : 500: [INTERNAL_SERVER_ERROR(500)] Exception occurred: "INSERT INTO root.sg1.d1(timestamp, s1) VALUES (6, 10),(7,12),(8,14),(9,160),(10,null),(11,58)". executeStatement failed. null

{code}

{code:java}
2022-11-11 13:51:03,628 [pool-25-IoTDB-ClientRPC-Processor-3] ERROR o.a.i.d.u.ErrorHandlingUtils:60 - Status code: INTERNAL_SERVER_ERROR(500), operation: "INSERT INTO root.sg1.d1(timestamp, s1) VALUES (6, 10),(7,12),(8,14),(9,160),(10,null),(11,58)". executeStatement failed 
java.lang.NullPointerException: null
    at java.util.HashMap.merge(HashMap.java:1225)
    at java.util.stream.Collectors.lambda$toMap$58(Collectors.java:1320)
    at java.util.stream.ReduceOps$3ReducingSink.accept(ReduceOps.java:169)
    at java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:948)
    at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
    at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
    at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
    at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
    at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499)
    at org.apache.iotdb.db.mpp.plan.planner.plan.node.write.InsertRowsOfOneDeviceNode.storeMeasurementsAndDataType(InsertRowsOfOneDeviceNode.java:212)
    at org.apache.iotdb.db.mpp.plan.planner.plan.node.write.InsertRowsOfOneDeviceNode.setInsertRowNodeList(InsertRowsOfOneDeviceNode.java:121)
    at org.apache.iotdb.db.mpp.plan.planner.LogicalPlanVisitor.visitInsertRowsOfOneDevice(LogicalPlanVisitor.java:628)
    at org.apache.iotdb.db.mpp.plan.planner.LogicalPlanVisitor.visitInsertRowsOfOneDevice(LogicalPlanVisitor.java:79)
    at org.apache.iotdb.db.mpp.plan.statement.crud.InsertRowsOfOneDeviceStatement.accept(InsertRowsOfOneDeviceStatement.java:99)
    at org.apache.iotdb.db.mpp.plan.statement.StatementVisitor.process(StatementVisitor.java:107)
    at org.apache.iotdb.db.mpp.plan.planner.LogicalPlanner.plan(LogicalPlanner.java:42)
    at org.apache.iotdb.db.mpp.plan.execution.QueryExecution.doLogicalPlan(QueryExecution.java:293)
    at org.apache.iotdb.db.mpp.plan.execution.QueryExecution.start(QueryExecution.java:199)
    at org.apache.iotdb.db.mpp.plan.Coordinator.execute(Coordinator.java:150)
    at org.apache.iotdb.db.service.thrift.impl.ClientRPCServiceImpl.executeStatementInternal(ClientRPCServiceImpl.java:215)
    at org.apache.iotdb.db.service.thrift.impl.ClientRPCServiceImpl.executeStatementV2(ClientRPCServiceImpl.java:390)
    at org.apache.iotdb.service.rpc.thrift.IClientRPCService$Processor$executeStatementV2.getResult(IClientRPCService.java:3453)
    at org.apache.iotdb.service.rpc.thrift.IClientRPCService$Processor$executeStatementV2.getResult(IClientRPCService.java:3433)
    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)
2022-11-11 13:51:53,877 [pool-3-IoTDB-timedQuerySqlCount-1] INFO  o.a.i.d.s.b.QueryFrequencyRecorder:44 - Query count in current 1 minute 1   {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)