[ 
https://issues.apache.org/jira/browse/HIVE-22179?focusedWorklogId=310192&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-310192
 ]

ASF GitHub Bot logged work on HIVE-22179:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 10/Sep/19 23:57
            Start Date: 10/Sep/19 23:57
    Worklog Time Spent: 10m 
      Work Description: jcamachor commented on pull request #763: HIVE-22179 
Break up DDLSemanticAnalyzer - extract Function related analyzers
URL: https://github.com/apache/hive/pull/763#discussion_r323009350
 
 

 ##########
 File path: 
ql/src/java/org/apache/hadoop/hive/ql/ddl/function/createfunction/CreateFunctionAnalyzer.java
 ##########
 @@ -0,0 +1,108 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.hadoop.hive.ql.ddl.function.createfunction;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.hadoop.hive.metastore.api.ResourceType;
+import org.apache.hadoop.hive.metastore.api.ResourceUri;
+import org.apache.hadoop.hive.ql.QueryState;
+import org.apache.hadoop.hive.ql.exec.FunctionUtils;
+import org.apache.hadoop.hive.ql.exec.TaskFactory;
+import org.apache.hadoop.hive.ql.ddl.DDLSemanticAnalyzerFactory.DDLType;
+import org.apache.hadoop.hive.ql.ddl.function.AbstractFunctionAnalyzer;
+import org.apache.hadoop.hive.ql.ddl.DDLWork;
+import org.apache.hadoop.hive.ql.parse.ASTNode;
+import org.apache.hadoop.hive.ql.parse.HiveParser;
+import org.apache.hadoop.hive.ql.parse.SemanticException;
+import org.apache.hadoop.hive.ql.plan.PlanUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import com.google.common.collect.ImmutableMap;
+
+/**
+ * Analyzer for function creation commands.
+ */
+@DDLType(type=HiveParser.TOK_CREATEFUNCTION)
+public class CreateFunctionAnalyzer extends AbstractFunctionAnalyzer {
+  private static final Logger SESISON_STATE_LOG = 
LoggerFactory.getLogger("SessionState");
 
 Review comment:
   typo : `SESISON` -> `SESSION`
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 310192)
    Time Spent: 40m  (was: 0.5h)

> Break up DDLSemanticAnalyzer - extract Function related analyzers
> -----------------------------------------------------------------
>
>                 Key: HIVE-22179
>                 URL: https://issues.apache.org/jira/browse/HIVE-22179
>             Project: Hive
>          Issue Type: Sub-task
>            Reporter: Miklos Gergely
>            Assignee: Miklos Gergely
>            Priority: Major
>              Labels: pull-request-available, refactor-ddl
>         Attachments: HIVE-22179.01.patch
>
>          Time Spent: 40m
>  Remaining Estimate: 0h
>
> DDLSemanticAnalyzer is a huge class, more than 4000 lines long. The goal is 
> to refactor it in order to have everything cut into more handleable classes 
> under the packageĀ  org.apache.hadoop.hive.ql.exec.ddl:
>  * have a separate class for each analyzers
>  * have a package for each operation, containing an analyzer, a description, 
> and an operation, so the amount of classes under a package is more manageable
> Step #2: extract all the functin related analyzers from DDLSemanticAnalyzer 
> and FunctionSemanticAnalyzer and MacroSemanticAnalyzer, and move them under 
> the new package.



--
This message was sent by Atlassian Jira
(v8.3.2#803003)

Reply via email to