Return-Path: Delivered-To: apmail-incubator-pig-dev-archive@locus.apache.org Received: (qmail 32882 invoked from network); 11 Jun 2008 13:47:06 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 11 Jun 2008 13:47:06 -0000 Received: (qmail 43706 invoked by uid 500); 11 Jun 2008 13:47:08 -0000 Delivered-To: apmail-incubator-pig-dev-archive@incubator.apache.org Received: (qmail 43682 invoked by uid 500); 11 Jun 2008 13:47:08 -0000 Mailing-List: contact pig-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: pig-dev@incubator.apache.org Delivered-To: mailing list pig-dev@incubator.apache.org Received: (qmail 43671 invoked by uid 99); 11 Jun 2008 13:47:08 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 11 Jun 2008 06:47:08 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 11 Jun 2008 13:46:27 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 2206A234C135 for ; Wed, 11 Jun 2008 06:46:45 -0700 (PDT) Message-ID: <1474071627.1213192005124.JavaMail.jira@brutus> Date: Wed, 11 Jun 2008 06:46:45 -0700 (PDT) From: "Pi Song (JIRA)" To: pig-dev@incubator.apache.org Subject: [jira] Updated: (PIG-256) support non default constructor with variable number of arguments In-Reply-To: <1276329811.1212649425044.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/PIG-256?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pi Song updated PIG-256: ------------------------ Attachment: PIG_256_vararg_instantiation.patch Simple fix. All tests passed Local/MapReduce. > support non default constructor with variable number of arguments > ----------------------------------------------------------------- > > Key: PIG-256 > URL: https://issues.apache.org/jira/browse/PIG-256 > Project: Pig > Issue Type: Improvement > Reporter: Ajay Garg > Priority: Minor > Attachments: PIG_256_vararg_instantiation.patch > > > pig does not support non default constructor with variable number of arguments support. In our case we need this because the number of variables that are specified by the user are varying. The fix is simple. Pig calls getConstr("agr1","arg2",...,"argn") and if it doesn't find it throws a noSuchMethodFound exception. In the catch block we just need to add code to check if we can wrap the arg1..n in a String[] and check if a constructor can be found with this signature getConstr(args[]). This would resolve the variable num args issue. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.