Beyyes commented on a change in pull request #31: Fix sonar URL: https://github.com/apache/incubator-iotdb/pull/31#discussion_r251306760
########## 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: Replacing it with an Enum class is not enough. Because to merge sort un-sequence files, there may need lots of priority number. I have added comments for this method. ``` /** * The bigger the priority value is, the higher the priority of this reader is */ ``` ---------------------------------------------------------------- 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