You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by nz...@apache.org on 2011/10/25 02:54:23 UTC

svn commit: r1188473 - in /hive/trunk/ql/src: java/org/apache/hadoop/hive/ql/parse/ErrorMsg.java java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java test/queries/clientnegative/orderby_function.q test/results/clientnegative/orderby_function.q.out

Author: nzhang
Date: Tue Oct 25 00:54:22 2011
New Revision: 1188473

URL: http://svn.apache.org/viewvc?rev=1188473&view=rev
Log:
HIVE-2512. After HIVE-2145, Hive disallow any use of function in cluster-by clause (Chinna Rao Lalam via Ning Zhang)

Removed:
    hive/trunk/ql/src/test/queries/clientnegative/orderby_function.q
    hive/trunk/ql/src/test/results/clientnegative/orderby_function.q.out
Modified:
    hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/ErrorMsg.java
    hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java

Modified: hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/ErrorMsg.java
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/ErrorMsg.java?rev=1188473&r1=1188472&r2=1188473&view=diff
==============================================================================
--- hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/ErrorMsg.java (original)
+++ hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/ErrorMsg.java Tue Oct 25 00:54:22 2011
@@ -186,7 +186,6 @@ public enum ErrorMsg {
   NO_COMPARE_BIGINT_DOUBLE("In strict mode, comparing bigints and doubles is not allowed, "
       + "it may result in a loss of precision. "
       + "If you really want to perform the operation, set hive.mapred.mode=nonstrict"),
-  FUNCTIONS_ARE_NOT_SUPPORTED_IN_ORDER_BY("functions are not supported in order by"),
   PARTSPEC_DIFFER_FROM_SCHEMA("Partition columns in partition specification are not the same as "
       + "that defined in the table schema. The names and orders have to be exactly the same."),
       ;

Modified: hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java?rev=1188473&r1=1188472&r2=1188473&view=diff
==============================================================================
--- hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java (original)
+++ hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java Tue Oct 25 00:54:22 2011
@@ -4550,9 +4550,6 @@ public class SemanticAnalyzer extends Ba
           // ClusterBy
           order.append("+");
         }
-        if (cl.getType() == HiveParser.TOK_FUNCTION) {
-          throw new SemanticException(ErrorMsg.FUNCTIONS_ARE_NOT_SUPPORTED_IN_ORDER_BY.getMsg());
-        }
         ExprNodeDesc exprNode = genExprNodeDesc(cl, inputRR);
         sortCols.add(exprNode);
       }