JackieTien97 commented on code in PR #14211:
URL: https://github.com/apache/iotdb/pull/14211#discussion_r1860508167


##########
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/distribute/TableDistributedPlanGenerator.java:
##########
@@ -495,6 +494,11 @@ public List<PlanNode> visitTableScan(TableScanNode node, 
PlanContext context) {
       }
     }
 
+    if (tableScanNodeMap.isEmpty()) {
+      node.setRegionReplicaSet(new TRegionReplicaSet());

Review Comment:
   use the NOT_ASSIGNED singleton



##########
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/source/relational/TableScanOperator.java:
##########
@@ -307,17 +309,27 @@ private void prepareForNextDevice() {
     }
   }
 
-  private AlignedSeriesScanUtil constructAlignedSeriesScanUtil(DeviceEntry 
deviceEntry) {
+  private void constructAlignedSeriesScanUtil() {
+    DeviceEntry deviceEntry;
+
+    if (this.deviceEntries.isEmpty() || 
this.deviceEntries.get(this.currentDeviceIndex) == null) {

Review Comment:
   throw Exception for this.deviceEntries.get(this.currentDeviceIndex) == null



##########
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/source/relational/TableScanOperator.java:
##########
@@ -307,17 +309,27 @@ private void prepareForNextDevice() {
     }
   }
 
-  private AlignedSeriesScanUtil constructAlignedSeriesScanUtil(DeviceEntry 
deviceEntry) {
+  private void constructAlignedSeriesScanUtil() {
+    DeviceEntry deviceEntry;
+
+    if (this.deviceEntries.isEmpty() || 
this.deviceEntries.get(this.currentDeviceIndex) == null) {

Review Comment:
   No need to construct `AlignedFullPath` and `seriesScanUtil` for 
`this.deviceEntries.isEmpty()`



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to