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 D8567200B27 for ; Wed, 22 Jun 2016 19:56:17 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id D7080160A36; Wed, 22 Jun 2016 17:56:17 +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 2A3C6160A24 for ; Wed, 22 Jun 2016 19:56:17 +0200 (CEST) Received: (qmail 86617 invoked by uid 500); 22 Jun 2016 17:56:16 -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 86606 invoked by uid 99); 22 Jun 2016 17:56:16 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 22 Jun 2016 17:56:16 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 395242C14E1 for ; Wed, 22 Jun 2016 17:56:16 +0000 (UTC) Date: Wed, 22 Jun 2016 17:56:16 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: issues@drill.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (DRILL-4715) Java compilation error for a query with large number of expressions MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Wed, 22 Jun 2016 17:56:18 -0000 [ https://issues.apache.org/jira/browse/DRILL-4715?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15344880#comment-15344880 ] ASF GitHub Bot commented on DRILL-4715: --------------------------------------- Github user jinfengni commented on a diff in the pull request: https://github.com/apache/drill/pull/521#discussion_r68102305 --- Diff: exec/java-exec/src/main/java/org/apache/drill/exec/expr/ClassGenerator.java --- @@ -86,14 +88,16 @@ public static MappingSet getDefaultMapping() { } @SuppressWarnings("unchecked") - ClassGenerator(CodeGenerator codeGenerator, MappingSet mappingSet, SignatureHolder signature, EvaluationVisitor eval, JDefinedClass clazz, JCodeModel model) throws JClassAlreadyExistsException { + ClassGenerator(CodeGenerator codeGenerator, MappingSet mappingSet, SignatureHolder signature, EvaluationVisitor eval, JDefinedClass clazz, JCodeModel model, OptionManager optionManager) throws JClassAlreadyExistsException { this.codeGenerator = codeGenerator; this.clazz = clazz; this.mappings = mappingSet; this.sig = signature; this.evaluationVisitor = eval; this.model = model; - blocks = (LinkedList[]) new LinkedList[sig.size()]; + this.optionManager = optionManager; --- End diff -- Revise the code to pass in session option manager. Also refactor some existing unit tests to pass in option manager to unit tests. @sudheeshkatkam , could you please take a quick look to see if it addresses your comment? > Java compilation error for a query with large number of expressions > ------------------------------------------------------------------- > > Key: DRILL-4715 > URL: https://issues.apache.org/jira/browse/DRILL-4715 > Project: Apache Drill > Issue Type: Bug > Components: Execution - Codegen > Reporter: Jinfeng Ni > > The following query would hit compilation error, when Drill generates and compiles the run-time code. > Q1 : > {code} > select expr1, expr2, expr3, ...., exprN > from table > {code} > In Q1, expr1, expr2, ..., exprN are non-trivial expression (in stead of simply column reference), and N is big enough, then the run-time generated code may have a method which goes beyond the 64k limit imposed by JVM. > This seems to be a regression from DRILL-3912 (Common subexpression elimination). CSE tries to put as many expressions in one block as possible, to detect and eliminate as many CSE as possible. However, this implies we may end up with big method with compilation error. > -- This message was sent by Atlassian JIRA (v6.3.4#6332)