[
https://issues.apache.org/jira/browse/HIVE-23951?focusedWorklogId=467419&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-467419
]
ASF GitHub Bot logged work on HIVE-23951:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 06/Aug/20 17:14
Start Date: 06/Aug/20 17:14
Worklog Time Spent: 10m
Work Description: vineetgarg02 commented on a change in pull request
#1315:
URL: https://github.com/apache/hive/pull/1315#discussion_r466561873
##########
File path:
parser/src/java/org/apache/hadoop/hive/ql/parse/PrepareStatementParser.g
##########
@@ -0,0 +1,66 @@
+/**
+ 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.
+*/
+parser grammar PrepareStatementParser;
+
+options
+{
+output=AST;
+ASTLabelType=ASTNode;
+backtrack=false;
+k=3;
+}
+
+@members {
+ @Override
+ public Object recoverFromMismatchedSet(IntStream input,
+ RecognitionException re, BitSet follow) throws RecognitionException {
+ throw re;
+ }
+ @Override
+ public void displayRecognitionError(String[] tokenNames,
+ RecognitionException e) {
+ gParent.errors.add(new ParseError(gParent, e, tokenNames));
+ }
+}
+
+@rulecatch {
+catch (RecognitionException e) {
+ throw e;
+}
+}
+
+//----------------------- Rules for parsing Prepare
statement-----------------------------
+prepareStatement
+@init { gParent.pushMsg("prepare statement ", state); }
+@after { gParent.popMsg(state); }
+ : KW_PREPARE identifier KW_FROM queryStatementExpression
+ -> ^(TOK_PREPARE queryStatementExpression identifier)
+ ;
+
+executeStatement
+@init { gParent.pushMsg("execute statement ", state); }
+@after { gParent.popMsg(state); }
+ : KW_EXECUTE identifier KW_USING executeParamList
+ -> ^(TOK_EXECUTE executeParamList identifier)
+ ;
+
+executeParamList
+@init { gParent.pushMsg("execute param list", state); }
+@after { gParent.popMsg(state); }
+ : constant (COMMA constant)*
Review comment:
https://issues.apache.org/jira/browse/HIVE-24002
----------------------------------------------------------------
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:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 467419)
Time Spent: 4h 20m (was: 4h 10m)
> Support parameterized queries in WHERE/HAVING clause
> ----------------------------------------------------
>
> Key: HIVE-23951
> URL: https://issues.apache.org/jira/browse/HIVE-23951
> Project: Hive
> Issue Type: Sub-task
> Components: Query Planning
> Reporter: Vineet Garg
> Assignee: Vineet Garg
> Priority: Major
> Labels: pull-request-available
> Time Spent: 4h 20m
> Remaining Estimate: 0h
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)