Beyyes commented on a change in pull request #31: Fix sonar URL: https://github.com/apache/incubator-iotdb/pull/31#discussion_r251005770
########## File path: iotdb/src/main/java/org/apache/iotdb/db/qp/strategy/optimizer/ConcatPathOptimizer.java ########## @@ -59,29 +61,39 @@ public Operator transform(Operator operator) throws LogicalOptimizeException { SFWOperator sfwOperator = (SFWOperator) operator; FromOperator from = sfwOperator.getFromOperator(); List<Path> prefixPaths; - if (from == null || (prefixPaths = from.getPrefixPaths()).isEmpty()) { + if (from == null){ LOG.warn("given SFWOperator doesn't have prefix paths, cannot concat seriesPath"); return operator; + } else { + prefixPaths = from.getPrefixPaths(); + if (prefixPaths.isEmpty()) { + LOG.warn("given SFWOperator doesn't have prefix paths, cannot concat seriesPath"); + return operator; + } } SelectOperator select = sfwOperator.getSelectOperator(); List<Path> initialSuffixPaths; - if (select == null || (initialSuffixPaths = select.getSuffixPaths()).isEmpty()) { - LOG.warn("given SFWOperator doesn't have suffix paths, cannot concat seriesPath"); + if (select == null){ Review comment: format maybe all this class should be formatted ---------------------------------------------------------------- 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