weizhouapache commented on code in PR #7799: URL: https://github.com/apache/cloudstack/pull/7799#discussion_r1291222837
########## engine/schema/src/main/java/com/cloud/storage/dao/GuestOSDaoImpl.java: ########## @@ -62,4 +71,41 @@ public GuestOSVO findByCategoryIdAndDisplayNameOrderByCreatedDesc(long categoryI } return null; } + + /** + "select * from guest_os go2 where display_name in" + + "(select display_name from" + + "(select display_name, count(1) as count from guest_os go1 group by display_name having count > 1) tab0)"; + * + * @return + */ + @Override + @DB + public Set<String> findDoubleNames() { + String selectSql = "(select display_name from (select display_name, count(1) as count from guest_os go1 group by display_name having count > 1) tab0)"; Review Comment: it is not needed to use 2 select, imho. If you do not want to change it, it is ok. -- 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: commits-unsubscr...@cloudstack.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org