Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 23ED3200BEE for ; Sat, 31 Dec 2016 07:55:00 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 2278F160B28; Sat, 31 Dec 2016 06:55:00 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 69F0A160B16 for ; Sat, 31 Dec 2016 07:54:59 +0100 (CET) Received: (qmail 60059 invoked by uid 500); 31 Dec 2016 06:54:58 -0000 Mailing-List: contact issues-help@drill.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@drill.apache.org Delivered-To: mailing list issues@drill.apache.org Received: (qmail 60050 invoked by uid 99); 31 Dec 2016 06:54:58 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 31 Dec 2016 06:54:58 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 7442E2C03DC for ; Sat, 31 Dec 2016 06:54:58 +0000 (UTC) Date: Sat, 31 Dec 2016 06:54:58 +0000 (UTC) From: "Paul Rogers (JIRA)" To: issues@drill.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (DRILL-5116) Enable generated code debugging in each Drill operator MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Sat, 31 Dec 2016 06:55:00 -0000 [ https://issues.apache.org/jira/browse/DRILL-5116?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15789058#comment-15789058 ] Paul Rogers commented on DRILL-5116: ------------------------------------ Another issue with nested classes is the enum nested inside {{HashAggTemplate}}: {code} public abstract class HashAggTemplate implements HashAggregator { ... public enum Metric implements MetricDef { ... {code} An enum is a (special type of) class. The {{SignatureHolder}} happily generates subclasses for every class nested inside a template, including the enum. However, a class cannot extend an enum, resulting in invalid Java code. The solution is to filter out enums when picking classes to subclass: {code} public class SignatureHolder implements Iterable { ... public static SignatureHolder getHolder(Class signature) { ... for (Class inner : signature.getClasses()) { // Do not generate classes for nested enums. // (Occurs in HashAggTemplate.) if (inner.isEnum()) { continue; } ... {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)