Return-Path: Delivered-To: apmail-hadoop-hive-dev-archive@minotaur.apache.org Received: (qmail 88663 invoked from network); 23 Aug 2010 23:02:57 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 23 Aug 2010 23:02:57 -0000 Received: (qmail 9446 invoked by uid 500); 23 Aug 2010 23:02:57 -0000 Delivered-To: apmail-hadoop-hive-dev-archive@hadoop.apache.org Received: (qmail 9418 invoked by uid 500); 23 Aug 2010 23:02:56 -0000 Mailing-List: contact hive-dev-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: hive-dev@hadoop.apache.org Delivered-To: mailing list hive-dev@hadoop.apache.org Received: (qmail 9410 invoked by uid 99); 23 Aug 2010 23:02:56 -0000 Received: from Unknown (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 23 Aug 2010 23:02:56 +0000 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.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 23 Aug 2010 23:02:38 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id o7NN2HW7013656 for ; Mon, 23 Aug 2010 23:02:17 GMT Message-ID: <28125250.521501282604537266.JavaMail.jira@thor> Date: Mon, 23 Aug 2010 19:02:17 -0400 (EDT) From: "HBase Review Board (JIRA)" To: hive-dev@hadoop.apache.org Subject: [jira] Commented: (HIVE-1546) Ability to plug custom Semantic Analyzers for Hive Grammar In-Reply-To: <32071506.383201282004357485.JavaMail.jira@thor> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/HIVE-1546?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12901654#action_12901654 ] HBase Review Board commented on HIVE-1546: ------------------------------------------ Message from: "John Sichi" ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: http://review.cloudera.org/r/713/#review1008 ----------------------------------------------------------- http://svn.apache.org/repos/asf/hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/Driver.java Can you break this out into several statements for readability? http://svn.apache.org/repos/asf/hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/metadata/HiveUtils.java This does not belong in HiveUtils. Can't we just leave it where it is (in SemanticAnalyzerFactory) and add a public accessor method for it so that extensions can reuse it? http://svn.apache.org/repos/asf/hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/BaseSemanticAnalyzer.java Why does this return a String []? The callers don't use it. http://svn.apache.org/repos/asf/hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzerFactoryInterface.java Putting "Interface" into the interface name is clunky. Let's call the interface HiveSemanticAnalyzerFactory instead (matching the convention for other plugin interfaces such as HiveStorageHandler and HiveIndexHandler). In addition, I think we should introduce a new interface HiveSemanticAnalyzer and have the factory produce that, since factories should generally produce interfaces rather than classes (e.g. so that dynamic proxies can be used). http://svn.apache.org/repos/asf/hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzerFactoryInterface.java This configuration parameter needs to be defined in HiveConf.java following the pattern already in use there. Also, it needs a new entry in conf/hive-default.xml http://svn.apache.org/repos/asf/hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzerFactoryInterface.java Our convention for existing Hive plugins is to make them extend org.apache.hadoop.conf.Configurable and pass in the configuration only once via setConf (rather than to individual methods such as get). Inside a Configurable, you can get back to a HiveConf with: new HiveConf(getConf(), YourClass.class) - John > Ability to plug custom Semantic Analyzers for Hive Grammar > ---------------------------------------------------------- > > Key: HIVE-1546 > URL: https://issues.apache.org/jira/browse/HIVE-1546 > Project: Hadoop Hive > Issue Type: Improvement > Components: Metastore > Affects Versions: 0.7.0 > Reporter: Ashutosh Chauhan > Assignee: Ashutosh Chauhan > Fix For: 0.7.0 > > Attachments: hive-1546.patch > > > It will be useful if Semantic Analysis phase is made pluggable such that other projects can do custom analysis of hive queries before doing metastore operations on them. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.