drill-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DRILL-5783) Make code generation in the TopN operator more modular and test it
Date Thu, 19 Oct 2017 00:17:00 GMT

    [ https://issues.apache.org/jira/browse/DRILL-5783?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16210360#comment-16210360
] 

ASF GitHub Bot commented on DRILL-5783:
---------------------------------------

Github user ilooner commented on a diff in the pull request:

    https://github.com/apache/drill/pull/984#discussion_r145575310
  
    --- Diff: exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/TopN/TopNBatch.java
---
    @@ -335,20 +336,42 @@ private void purge() throws SchemaChangeException {
         logger.debug("Took {} us to purge", watch.elapsed(TimeUnit.MICROSECONDS));
       }
     
    -  public PriorityQueue createNewPriorityQueue(FragmentContext context, List<Ordering>
orderings,
    -                                                     VectorAccessible batch, MappingSet
mainMapping, MappingSet leftMapping, MappingSet rightMapping)
    -          throws ClassTransformationException, IOException, SchemaChangeException{
    -    CodeGenerator<PriorityQueue> cg = CodeGenerator.get(PriorityQueue.TEMPLATE_DEFINITION,
context.getFunctionRegistry(), context.getOptions());
    +  private PriorityQueue createNewPriorityQueue(VectorAccessible batch, int limit)
    +    throws SchemaChangeException, ClassTransformationException, IOException {
    +    return createNewPriorityQueue(
    +      mainMapping, leftMapping, rightMapping, context.getOptionSet(), context.getFunctionRegistry(),
context.getDrillbitContext().getCompiler(),
    +      config.getOrderings(), batch, unionTypeEnabled, codegenDump, limit, oContext.getAllocator(),
schema.getSelectionVectorMode());
    +  }
    +
    +  public static MappingSet createMainMappingSet() {
    +    return new MappingSet((String) null, null, ClassGenerator.DEFAULT_SCALAR_MAP, ClassGenerator.DEFAULT_SCALAR_MAP);
    +  }
    +
    +  public static MappingSet createLeftMappingSet() {
    +    return new MappingSet("leftIndex", null, ClassGenerator.DEFAULT_SCALAR_MAP, ClassGenerator.DEFAULT_SCALAR_MAP);
    +  }
    +
    +  public static MappingSet createRightMappingSet() {
    +    return new MappingSet("rightIndex", null, ClassGenerator.DEFAULT_SCALAR_MAP, ClassGenerator.DEFAULT_SCALAR_MAP);
    +  }
    +
    +  public static PriorityQueue createNewPriorityQueue(
    +    MappingSet mainMapping, MappingSet leftMapping, MappingSet rightMapping,
    --- End diff --
    
    Agreed. Pritesh has asked me to look at Codegen improvements in the long term, so I will
work on this down the line.


> Make code generation in the TopN operator more modular and test it
> ------------------------------------------------------------------
>
>                 Key: DRILL-5783
>                 URL: https://issues.apache.org/jira/browse/DRILL-5783
>             Project: Apache Drill
>          Issue Type: Improvement
>            Reporter: Timothy Farkas
>            Assignee: Timothy Farkas
>




--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message