This is an automated email from the ASF dual-hosted git repository.

jackietien pushed a commit to branch count_time
in repository https://gitbox.apache.org/repos/asf/iotdb.git


The following commit(s) were added to refs/heads/count_time by this push:
     new a9009515d11 Fix some into bugs
a9009515d11 is described below

commit a9009515d1154362ab27272e074e6b214024fa50
Author: JackieTien97 <[email protected]>
AuthorDate: Tue Aug 8 19:34:04 2023 +0800

    Fix some into bugs
---
 .../execution/operator/process/AbstractIntoOperator.java         | 4 ----
 .../execution/operator/process/DeviceViewIntoOperator.java       | 8 +-------
 .../db/queryengine/execution/operator/process/IntoOperator.java  | 9 +--------
 .../iotdb/db/queryengine/plan/planner/OperatorTreeGenerator.java | 3 +--
 .../db/queryengine/execution/operator/OperatorMemoryTest.java    | 1 -
 5 files changed, 3 insertions(+), 22 deletions(-)

diff --git 
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/process/AbstractIntoOperator.java
 
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/process/AbstractIntoOperator.java
index 3401d621744..dd0f889514c 100644
--- 
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/process/AbstractIntoOperator.java
+++ 
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/process/AbstractIntoOperator.java
@@ -66,8 +66,6 @@ public abstract class AbstractIntoOperator implements 
ProcessOperator {
 
   protected List<InsertTabletStatementGenerator> 
insertTabletStatementGenerators;
 
-  protected final Map<String, InputLocation> sourceColumnToInputLocationMap;
-
   private DataNodeInternalClient client;
 
   private final ExecutorService writeOperationExecutor;
@@ -85,7 +83,6 @@ public abstract class AbstractIntoOperator implements 
ProcessOperator {
       OperatorContext operatorContext,
       Operator child,
       List<TSDataType> inputColumnTypes,
-      Map<String, InputLocation> sourceColumnToInputLocationMap,
       ExecutorService intoOperationExecutor,
       long statementSizePerLine) {
     this.operatorContext = operatorContext;
@@ -93,7 +90,6 @@ public abstract class AbstractIntoOperator implements 
ProcessOperator {
     this.typeConvertors =
         
inputColumnTypes.stream().map(TypeFactory::getType).collect(Collectors.toList());
 
-    this.sourceColumnToInputLocationMap = sourceColumnToInputLocationMap;
     this.writeOperationExecutor = intoOperationExecutor;
     initMemoryEstimates(statementSizePerLine);
   }
diff --git 
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/process/DeviceViewIntoOperator.java
 
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/process/DeviceViewIntoOperator.java
index 44bf02ad940..9d9d7e3b1d3 100644
--- 
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/process/DeviceViewIntoOperator.java
+++ 
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/process/DeviceViewIntoOperator.java
@@ -67,13 +67,7 @@ public class DeviceViewIntoOperator extends 
AbstractIntoOperator {
       Map<String, InputLocation> sourceColumnToInputLocationMap,
       ExecutorService intoOperationExecutor,
       long statementSizePerLine) {
-    super(
-        operatorContext,
-        child,
-        inputColumnTypes,
-        sourceColumnToInputLocationMap,
-        intoOperationExecutor,
-        statementSizePerLine);
+    super(operatorContext, child, inputColumnTypes, intoOperationExecutor, 
statementSizePerLine);
     this.deviceToTargetPathSourceInputLocationMap = 
deviceToTargetPathSourceInputLocationMap;
     this.deviceToTargetPathDataTypeMap = deviceToTargetPathDataTypeMap;
     this.targetDeviceToAlignedMap = targetDeviceToAlignedMap;
diff --git 
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/process/IntoOperator.java
 
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/process/IntoOperator.java
index 8a6fac95b00..d389062862f 100644
--- 
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/process/IntoOperator.java
+++ 
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/process/IntoOperator.java
@@ -51,16 +51,9 @@ public class IntoOperator extends AbstractIntoOperator {
       Map<PartialPath, Map<String, TSDataType>> targetPathToDataTypeMap,
       Map<String, Boolean> targetDeviceToAlignedMap,
       List<Pair<String, PartialPath>> sourceTargetPathPairList,
-      Map<String, InputLocation> sourceColumnToInputLocationMap,
       ExecutorService intoOperationExecutor,
       long statementSizePerLine) {
-    super(
-        operatorContext,
-        child,
-        inputColumnTypes,
-        sourceColumnToInputLocationMap,
-        intoOperationExecutor,
-        statementSizePerLine);
+    super(operatorContext, child, inputColumnTypes, intoOperationExecutor, 
statementSizePerLine);
     this.sourceTargetPathPairList = sourceTargetPathPairList;
     insertTabletStatementGenerators =
         constructInsertTabletStatementGenerators(
diff --git 
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/OperatorTreeGenerator.java
 
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/OperatorTreeGenerator.java
index e81dd0560dc..850f7f9103c 100644
--- 
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/OperatorTreeGenerator.java
+++ 
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/OperatorTreeGenerator.java
@@ -1032,7 +1032,7 @@ public class OperatorTreeGenerator extends 
PlanVisitor<Operator, LocalExecutionP
               ImmutableMap.of(),
               ImmutableList.of(),
               inputDataTypes,
-              inputLocations.size());
+              inputLocations.size() - 1);
 
       for (Expression expression : projectExpressions) {
         projectOutputTransformerList.add(
@@ -1670,7 +1670,6 @@ public class OperatorTreeGenerator extends 
PlanVisitor<Operator, LocalExecutionP
         targetPathToDataTypeMap,
         intoPathDescriptor.getTargetDeviceToAlignedMap(),
         sourceTargetPathPairWithViewList,
-        sourceColumnToInputLocationMap,
         FragmentInstanceManager.getInstance().getIntoOperationExecutor(),
         statementSizePerLine);
   }
diff --git 
a/iotdb-core/datanode/src/test/java/org/apache/iotdb/db/queryengine/execution/operator/OperatorMemoryTest.java
 
b/iotdb-core/datanode/src/test/java/org/apache/iotdb/db/queryengine/execution/operator/OperatorMemoryTest.java
index ba76afd9f58..80dff85f9a1 100644
--- 
a/iotdb-core/datanode/src/test/java/org/apache/iotdb/db/queryengine/execution/operator/OperatorMemoryTest.java
+++ 
b/iotdb-core/datanode/src/test/java/org/apache/iotdb/db/queryengine/execution/operator/OperatorMemoryTest.java
@@ -1495,7 +1495,6 @@ public class OperatorMemoryTest {
         Collections.emptyMap(),
         Collections.emptyMap(),
         Collections.emptyList(),
-        Collections.emptyMap(),
         null,
         statementSizePerLine);
   }

Reply via email to