[
https://issues.apache.org/jira/browse/DRILL-5116?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15789066#comment-15789066
]
Paul Rogers commented on DRILL-5116:
------------------------------------
Yet another issue occurs when nested classes constructors with arguments:
{code}
public abstract class PartitionerTemplate implements Partitioner {
...
public class OutgoingRecordBatch implements PartitionOutgoingBatch,
VectorAccessible {
...
public OutgoingRecordBatch(OperatorStats stats, HashPartitionSender
operator, AccountingDataTunnel tunnel,
FragmentContext context, BufferAllocator
allocator, int oppositeMinorFragmentId) {
...
{code}
Here, the plain-old Java version must not only create the shim method mentioned
above, it must do so passing the set of arguments as defined by the nested
class' constructor:
{code}
protected PartitionerTemplate.OutgoingRecordBatch
newOutgoingRecordBatch(OperatorStats arg1, HashPartitionSender arg2,
AccountingDataTunnel arg3, FragmentContext arg4, BufferAllocator arg5, int
arg6) {
return new PartitionerGen296 .OutgoingRecordBatch(arg1, arg2, arg3,
arg4, arg5, arg6);
}
{code}
> Enable generated code debugging in each Drill operator
> ------------------------------------------------------
>
> Key: DRILL-5116
> URL: https://issues.apache.org/jira/browse/DRILL-5116
> Project: Apache Drill
> Issue Type: Improvement
> Affects Versions: 1.9.0
> Reporter: Paul Rogers
> Assignee: Paul Rogers
> Priority: Minor
>
> DRILL-5052 adds the ability to debug generated code. Some of the code
> generated by Drill's operators has minor problems when compiled directly
> using the new technique. These issues are ignore by the byte-code-merge
> technique uses in production. This ticket asks to try the DRILL-5052 feature
> in each operator, clean up any minor problems, and ensure each operator
> generates code suitable for debugging. Use the new
> {{CodeGenerator.plainOldJavaCapable()}} method to mark each generated class
> as ready for "plain-old Java" code gen.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)