hadoop-hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ashish Thusoo (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HIVE-164) Support CASE and IF statement
Date Thu, 29 Jan 2009 03:04:59 GMT

    [ https://issues.apache.org/jira/browse/HIVE-164?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12668303#action_12668303
] 

Ashish Thusoo commented on HIVE-164:
------------------------------------

The following code has STringLiteral defined twice...

ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java
===================================================================
--- ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java	(revision 738583)
+++ ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java	(working copy)
@@ -3293,11 +3293,15 @@
     opRules.put(new RuleRegExp("R2", HiveParser.Number + "%"), TypeCheckProcFactory.getNumExprProcessor());
     opRules.put(new RuleRegExp("R3", HiveParser.Identifier + "%|" + 
                                      HiveParser.StringLiteral + "%|" + 
+                                     HiveParser.KW_IF + "%|" + 
+                                     HiveParser.KW_LEFT + "%|" + 
+                                     HiveParser.KW_RIGHT + "%|" + 
+                                     HiveParser.StringLiteral + "%|" + 
                                      HiveParser.TOK_CHARSETLITERAL + "%"), 


> Support CASE and IF statement
> -----------------------------
>
>                 Key: HIVE-164
>                 URL: https://issues.apache.org/jira/browse/HIVE-164
>             Project: Hadoop Hive
>          Issue Type: New Feature
>          Components: Query Processor
>            Reporter: Zheng Shao
>            Assignee: David Phillips
>         Attachments: HIVE-164.1.patch
>
>
> See http://dev.mysql.com/doc/refman/5.0/en/control-flow-functions.html for details.
> Syntax:
> {code}
> CASE value WHEN [compare_value] THEN result [WHEN [compare_value] THEN result ...] [<ELSE
result] END
> CASE WHEN [condition] THEN result [WHEN [condition] THEN result ...] [ELSE result] END

> IF(expr1,expr2,expr3)
> {code}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message