You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2019/01/09 10:48:54 UTC

[GitHub] leventov commented on a change in pull request #4551: Fixes and improvements to SQL metadata caching.

leventov commented on a change in pull request #4551: Fixes and improvements to SQL metadata caching.
URL: https://github.com/apache/incubator-druid/pull/4551#discussion_r246337020
 
 

 ##########
 File path: sql/src/main/java/io/druid/sql/calcite/schema/DruidSchema.java
 ##########
 @@ -59,42 +58,66 @@
 import io.druid.sql.calcite.view.DruidViewMacro;
 import io.druid.sql.calcite.view.ViewManager;
 import io.druid.timeline.DataSegment;
-import org.apache.calcite.schema.Function;
 import org.apache.calcite.schema.Table;
 import org.apache.calcite.schema.impl.AbstractSchema;
 import org.joda.time.DateTime;
 
+import java.io.IOException;
+import java.util.Comparator;
 import java.util.EnumSet;
-import java.util.List;
+import java.util.HashMap;
+import java.util.HashSet;
 import java.util.Map;
 import java.util.Set;
+import java.util.TreeMap;
+import java.util.TreeSet;
 import java.util.concurrent.ConcurrentMap;
 import java.util.concurrent.CountDownLatch;
 import java.util.concurrent.ExecutorService;
+import java.util.function.Function;
+import java.util.stream.Collectors;
+import java.util.stream.StreamSupport;
 
 @ManageLifecycle
 public class DruidSchema extends AbstractSchema
 {
+  // Newest segments first, so they override older ones.
 
 Review comment:
   I fail to see where exactly this order is used and why inner maps in `segmentSignatures` need to be TreeMaps, @gianm could you please explain?

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org