wecharyu commented on code in PR #3360:
URL: https://github.com/apache/hive/pull/3360#discussion_r899205805


##########
parser/src/java/org/apache/hadoop/hive/ql/parse/HiveParser.g:
##########
@@ -1613,10 +1613,10 @@ resourceType
 createFunctionStatement
 @init { pushMsg("create function statement", state); }
 @after { popMsg(state); }
-    : KW_CREATE (temp=KW_TEMPORARY)? KW_FUNCTION functionIdentifier KW_AS 
StringLiteral
+    : KW_CREATE (temp=KW_TEMPORARY)? KW_FUNCTION orReplace? ifNotExists? 
functionIdentifier KW_AS StringLiteral

Review Comment:
   @nrg4878 The reason I use "create function or replace" is that “create or 
replace" can only be used for one statement, I will get error like below when I 
use "create or replace function":
   ```bash
   org.apache.hadoop.hive.ql.parse.ParseException: line 3:18 mismatched input 
'function' expecting KW_VIEW near 'replace' in create view statement
   
   ```
   I am not sure if `antlr3` does not support this syntax in two statements, if 
you have any idea please let me know.



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to