[
https://issues.apache.org/jira/browse/DRILL-5783?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16201524#comment-16201524
]
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_r144205146
--- Diff:
exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/TopN/TopNBatch.java
---
@@ -335,20 +333,32 @@ 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(context.getOptionSet(),
context.getFunctionRegistry(), context.getDrillbitContext().getCompiler(),
+ config.getOrderings(), batch, unionTypeEnabled, codegenDump, limit,
oContext.getAllocator(), schema.getSelectionVectorMode());
+ }
+
+ public static PriorityQueue createNewPriorityQueue(
+ OptionSet optionSet, FunctionLookupContext functionLookupContext,
CodeCompiler codeCompiler,
+ List<Ordering> orderings, VectorAccessible batch, boolean
unionTypeEnabled, boolean codegenDump,
+ int limit, BufferAllocator allocator, SelectionVectorMode mode)
+ throws ClassTransformationException, IOException,
SchemaChangeException {
+ final MappingSet mainMapping = new MappingSet((String) null, null,
ClassGenerator.DEFAULT_SCALAR_MAP, ClassGenerator.DEFAULT_SCALAR_MAP);
+ final MappingSet leftMapping = new MappingSet("leftIndex", null,
ClassGenerator.DEFAULT_SCALAR_MAP, ClassGenerator.DEFAULT_SCALAR_MAP);
+ final MappingSet rightMapping = new MappingSet("rightIndex", null,
ClassGenerator.DEFAULT_SCALAR_MAP, ClassGenerator.DEFAULT_SCALAR_MAP);
--- End diff --
Reverted it back to the way it was
> 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)