Uploaded image for project: 'Apache IoTDB'
  1. Apache IoTDB
  2. IOTDB-4917

[select into] using select into statement from a non aligned timeseries into an aligned timeseries

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Not A Bug
    • 0.14.0-SNAPSHOT
    • None
    • Core/Server
    • None
    • 2022-11-Cluster

    Description

      [select into]  using select into statement from a non aligned timeseries into an aligned timeseries

       

      environment:

      3C3D cluster, Nov.11 master source codes

       

      reproduction:

      CREATE TIMESERIES root.udf.d1.s1 WITH DATATYPE=int32;
      CREATE TIMESERIES root.udf.d1.s2 WITH DATATYPE=int64;
      CREATE TIMESERIES root.udf.d1.s3 WITH DATATYPE=boolean;
      CREATE TIMESERIES root.udf.d1.ss1 WITH DATATYPE=int32;
      CREATE TIMESERIES root.udf.d1.ss3 WITH DATATYPE=boolean;
      
      insert into root.udf.d1 (time, s1, s2, s3) values (1, 1, 2,0),(3, 3, 4,0),(6, 5, 3,1),(7, 7, 8,1),(11, 3,55,1),(12, 11, 3,1),(15, 13, 14,0),(17, 15, 16,1),(19, 17, 18,0),(20, 19, 20,0),(25,21,22,0),(35,31,32,1),(38,33,34,1),(40,41,42,1); 
      
      -- notice: it's aligned
      CREATE ALIGNED TIMESERIES root.udf.d2 (s1 int32, s2 int64, s3 boolean);
      
      -- failed
      select * into root.udf.d2(::) from root.udf.d1;
      
      -- failed either
      select s1,s2,s3 into root.udf.d2(::) from root.udf.d1;
      Msg: 500: [INTERNAL_SERVER_ERROR(500)] Exception occurred: "select s1,s2,s3 into root.udf.d2(::) from root.udf.d1". executeStatement failed. Task was cancelled.

       

      datanode log:

      2022-11-11 18:49:08,334 [pool-3-IoTDB-timedQuerySqlCount-1] INFO  o.a.i.d.s.b.QueryFrequencyRecorder:44 - Query count in current 1 minute 2  
      2022-11-11 18:49:09,225 [1@group-000200000070-StateMachineUpdater] ERROR o.a.i.d.m.v.SchemaExecutionVisitor:184 - IoTDB: MetaData error:  
      org.apache.iotdb.db.exception.metadata.AlignedTimeseriesException: Timeseries under this entity is aligned, please use createAlignedTimeseries or change entity. (Path: root.udf.d2)
          at org.apache.iotdb.db.metadata.mtree.MTreeBelowSGMemoryImpl.createTimeseries(MTreeBelowSGMemoryImpl.java:250)
          at org.apache.iotdb.db.metadata.schemaregion.SchemaRegionMemoryImpl.createTimeseries(SchemaRegionMemoryImpl.java:586)
          at org.apache.iotdb.db.metadata.visitor.SchemaExecutionVisitor.executeInternalCreateTimeseries(SchemaExecutionVisitor.java:176)
          at org.apache.iotdb.db.metadata.visitor.SchemaExecutionVisitor.visitInternalCreateTimeSeries(SchemaExecutionVisitor.java:150)
          at org.apache.iotdb.db.metadata.visitor.SchemaExecutionVisitor.visitInternalCreateTimeSeries(SchemaExecutionVisitor.java:64)
          at org.apache.iotdb.db.mpp.plan.planner.plan.node.metedata.write.InternalCreateTimeSeriesNode.accept(InternalCreateTimeSeriesNode.java:105)
          at org.apache.iotdb.db.consensus.statemachine.SchemaRegionStateMachine.write(SchemaRegionStateMachine.java:73)
          at org.apache.iotdb.consensus.ratis.ApplicationStateMachineProxy.applyTransaction(ApplicationStateMachineProxy.java:137)
          at org.apache.ratis.server.impl.RaftServerImpl.applyLogToStateMachine(RaftServerImpl.java:1672)
          at org.apache.ratis.server.impl.StateMachineUpdater.applyLog(StateMachineUpdater.java:239)
          at org.apache.ratis.server.impl.StateMachineUpdater.run(StateMachineUpdater.java:182)
          at java.lang.Thread.run(Thread.java:748)
      2022-11-11 18:49:09,225 [1@group-000200000070-StateMachineUpdater] ERROR o.a.i.d.m.v.SchemaExecutionVisitor:184 - IoTDB: MetaData error:  
      org.apache.iotdb.db.exception.metadata.AlignedTimeseriesException: Timeseries under this entity is aligned, please use createAlignedTimeseries or change entity. (Path: root.udf.d2)
          at org.apache.iotdb.db.metadata.mtree.MTreeBelowSGMemoryImpl.createTimeseries(MTreeBelowSGMemoryImpl.java:250)
          at org.apache.iotdb.db.metadata.schemaregion.SchemaRegionMemoryImpl.createTimeseries(SchemaRegionMemoryImpl.java:586)
          at org.apache.iotdb.db.metadata.visitor.SchemaExecutionVisitor.executeInternalCreateTimeseries(SchemaExecutionVisitor.java:176)
          at org.apache.iotdb.db.metadata.visitor.SchemaExecutionVisitor.visitInternalCreateTimeSeries(SchemaExecutionVisitor.java:150)
          at org.apache.iotdb.db.metadata.visitor.SchemaExecutionVisitor.visitInternalCreateTimeSeries(SchemaExecutionVisitor.java:64)
          at org.apache.iotdb.db.mpp.plan.planner.plan.node.metedata.write.InternalCreateTimeSeriesNode.accept(InternalCreateTimeSeriesNode.java:105)
          at org.apache.iotdb.db.consensus.statemachine.SchemaRegionStateMachine.write(SchemaRegionStateMachine.java:73)
          at org.apache.iotdb.consensus.ratis.ApplicationStateMachineProxy.applyTransaction(ApplicationStateMachineProxy.java:137)
          at org.apache.ratis.server.impl.RaftServerImpl.applyLogToStateMachine(RaftServerImpl.java:1672)
          at org.apache.ratis.server.impl.StateMachineUpdater.applyLog(StateMachineUpdater.java:239)
          at org.apache.ratis.server.impl.StateMachineUpdater.run(StateMachineUpdater.java:182)
          at java.lang.Thread.run(Thread.java:748)
      2022-11-11 18:49:09,717 [pool-25-IoTDB-ClientRPC-Processor-1] WARN  o.a.i.d.u.ErrorHandlingUtils:62 - Status code: INTERNAL_SERVER_ERROR(500), operation: "select * into root.udf.d2(::) from root.udf.d1". executeStatement failed 
      java.util.concurrent.CancellationException: Task was cancelled.
          at com.google.common.util.concurrent.AbstractFuture.cancellationExceptionWithCause(AbstractFuture.java:1543)
          at com.google.common.util.concurrent.AbstractFuture.getDoneValue(AbstractFuture.java:586)
          at com.google.common.util.concurrent.AbstractFuture.get(AbstractFuture.java:567)
          at com.google.common.util.concurrent.AbstractFuture$TrustedFuture.get(AbstractFuture.java:113)
          at org.apache.iotdb.db.mpp.plan.execution.QueryExecution.getResult(QueryExecution.java:379)
          at org.apache.iotdb.db.mpp.plan.execution.QueryExecution.getByteBufferBatchResult(QueryExecution.java:421)
          at org.apache.iotdb.db.utils.QueryDataSetUtils.convertQueryResultByFetchSize(QueryDataSetUtils.java:387)
          at org.apache.iotdb.db.service.thrift.impl.ClientRPCServiceImpl.lambda$static$0(ClientRPCServiceImpl.java:160)
          at org.apache.iotdb.db.service.thrift.impl.ClientRPCServiceImpl.executeStatementInternal(ClientRPCServiceImpl.java:236)
          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)

      Attachments

        Activity

          People

            jackietien Yuan Tian
            changxue changxue
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: