jixuan1989 commented on a change in pull request #31: Fix sonar
URL: https://github.com/apache/incubator-iotdb/pull/31#discussion_r251423647
 
 

 ##########
 File path: 
iotdb/src/main/java/org/apache/iotdb/db/query/executor/EngineExecutorWithoutTimeGenerator.java
 ##########
 @@ -71,33 +71,50 @@ public QueryDataSet executeWithGlobalTimeFilter()
       QueryDataSource queryDataSource = 
QueryDataSourceManager.getQueryDataSource(jobId, path);
 
       // add data type
-      dataTypes.add(MManager.getInstance().getSeriesType(path.getFullPath()));
+      try {
+        
dataTypes.add(MManager.getInstance().getSeriesType(path.getFullPath()));
+      } catch (PathErrorException e) {
+        throw new FileNodeManagerException(e);
+      }
 
       PriorityMergeReader priorityReader = new PriorityMergeReader();
 
       // sequence reader for one sealed tsfile
-      SequenceDataReader tsFilesReader = new 
SequenceDataReader(queryDataSource.getSeqDataSource(),
-          timeFilter);
-      priorityReader.addReaderWithPriority(tsFilesReader, 1);
+      SequenceDataReader tsFilesReader = null;
+      try {
+        tsFilesReader = new 
SequenceDataReader(queryDataSource.getSeqDataSource(),
+            timeFilter);
+        priorityReader.addReaderWithPriority(tsFilesReader, 1);
+      } catch (IOException e) {
+        throw new FileNodeManagerException(e);
+      }
 
       // unseq reader for all chunk groups in unSeqFile
-      PriorityMergeReader unSeqMergeReader = SeriesReaderFactory.getInstance()
-          
.createUnSeqMergeReader(queryDataSource.getOverflowSeriesDataSource(), 
timeFilter);
-      priorityReader.addReaderWithPriority(unSeqMergeReader, 2);
+      PriorityMergeReader unSeqMergeReader = null;
+      try {
+        unSeqMergeReader = SeriesReaderFactory.getInstance()
+            
.createUnSeqMergeReader(queryDataSource.getOverflowSeriesDataSource(), 
timeFilter);
+        priorityReader.addReaderWithPriority(unSeqMergeReader, 2);
 
 Review comment:
   Or, we can define an int array, `private static final int[] priority = new 
int[]{1,2,3,4}`, then readers will know the highest priority is 4. 
   You can leave it in the future...

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to