drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jacques-n <...@git.apache.org>
Subject [GitHub] drill pull request: DRILL-3623: Use shorter query path for LIMIT 0...
Date Fri, 09 Oct 2015 13:23:42 GMT
Github user jacques-n commented on a diff in the pull request:

    https://github.com/apache/drill/pull/193#discussion_r41628774
  
    --- Diff: exec/java-exec/src/main/java/org/apache/drill/exec/planner/sql/DirectPlan.java
---
    @@ -45,11 +52,15 @@ public static PhysicalPlan createDirectPlan(QueryContext context,
boolean result
       public static <T> PhysicalPlan createDirectPlan(QueryContext context, T obj){
         Iterator<T> iter = (Iterator<T>) Collections.singleton(obj).iterator();
         return createDirectPlan(context.getCurrentEndpoint(), iter, (Class<T>) obj.getClass());
    +  }
     
    +  public static <T> PhysicalPlan createDirectPlan(DrillbitEndpoint endpoint, Iterator<T>
iterator, Class<T> clazz) {
    +    PojoRecordReader<T> reader = new PojoRecordReader<>(clazz, iterator);
    +    return createDirectPlan(endpoint, reader, ScanStats.TRIVIAL_TABLE);
       }
    -  public static <T> PhysicalPlan createDirectPlan(DrillbitEndpoint endpoint, Iterator<T>
iterator, Class<T> clazz){
    -    PojoRecordReader<T> reader = new PojoRecordReader<T>(clazz, iterator);
    -    DirectGroupScan scan = new DirectGroupScan(reader);
    +
    +  public static PhysicalPlan createDirectPlan(DrillbitEndpoint endpoint, RecordReader
reader, ScanStats stats) {
    --- End diff --
    
    Let's keep the default behavior static constructor (which uses trivial) and then we don't
have to update the constructor everywhere.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message