hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hashut...@apache.org
Subject svn commit: r1498580 - in /hive/trunk/ql/src: java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java test/queries/clientpositive/join_literals.q test/results/clientpositive/join_literals.q.out
Date Mon, 01 Jul 2013 17:27:52 GMT
Author: hashutosh
Date: Mon Jul  1 17:27:52 2013
New Revision: 1498580

URL: http://svn.apache.org/r1498580
Log:
HIVE-4430 : Semantic analysis fails in presence of certain literals in on clause (Kevin Wilfong
via Ashutosh Chauhan)

Added:
    hive/trunk/ql/src/test/queries/clientpositive/join_literals.q
    hive/trunk/ql/src/test/results/clientpositive/join_literals.q.out
Modified:
    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/SemanticAnalyzer.java
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java?rev=1498580&r1=1498579&r2=1498580&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 Mon Jul 
1 17:27:52 2013
@@ -1432,6 +1432,10 @@ public class SemanticAnalyzer extends Ba
       break;
     case HiveParser.Number:
     case HiveParser.StringLiteral:
+    case HiveParser.BigintLiteral:
+    case HiveParser.SmallintLiteral:
+    case HiveParser.TinyintLiteral:
+    case HiveParser.DecimalLiteral:
     case HiveParser.TOK_STRINGLITERALSEQUENCE:
     case HiveParser.TOK_CHARSETLITERAL:
     case HiveParser.KW_TRUE:

Added: hive/trunk/ql/src/test/queries/clientpositive/join_literals.q
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/queries/clientpositive/join_literals.q?rev=1498580&view=auto
==============================================================================
--- hive/trunk/ql/src/test/queries/clientpositive/join_literals.q (added)
+++ hive/trunk/ql/src/test/queries/clientpositive/join_literals.q Mon Jul  1 17:27:52 2013
@@ -0,0 +1,9 @@
+-- Test Joins with a variety of literals in the on clause
+
+SELECT COUNT(*) FROM src a JOIN src b ON a.key = b.key AND a.key = 0L;
+
+SELECT COUNT(*) FROM src a JOIN src b ON a.key = b.key AND a.key = 0S;
+
+SELECT COUNT(*) FROM src a JOIN src b ON a.key = b.key AND a.key = 0Y;
+
+SELECT COUNT(*) FROM src a JOIN src b ON a.key = b.key AND a.key = 0BD;

Added: hive/trunk/ql/src/test/results/clientpositive/join_literals.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/join_literals.q.out?rev=1498580&view=auto
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/join_literals.q.out (added)
+++ hive/trunk/ql/src/test/results/clientpositive/join_literals.q.out Mon Jul  1 17:27:52
2013
@@ -0,0 +1,41 @@
+WARNING: Comparing a bigint and a string may result in a loss of precision.
+PREHOOK: query: -- Test Joins with a variety of literals in the on clause
+
+SELECT COUNT(*) FROM src a JOIN src b ON a.key = b.key AND a.key = 0L
+PREHOOK: type: QUERY
+PREHOOK: Input: default@src
+#### A masked pattern was here ####
+POSTHOOK: query: -- Test Joins with a variety of literals in the on clause
+
+SELECT COUNT(*) FROM src a JOIN src b ON a.key = b.key AND a.key = 0L
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@src
+#### A masked pattern was here ####
+9
+PREHOOK: query: SELECT COUNT(*) FROM src a JOIN src b ON a.key = b.key AND a.key = 0S
+PREHOOK: type: QUERY
+PREHOOK: Input: default@src
+#### A masked pattern was here ####
+POSTHOOK: query: SELECT COUNT(*) FROM src a JOIN src b ON a.key = b.key AND a.key = 0S
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@src
+#### A masked pattern was here ####
+9
+PREHOOK: query: SELECT COUNT(*) FROM src a JOIN src b ON a.key = b.key AND a.key = 0Y
+PREHOOK: type: QUERY
+PREHOOK: Input: default@src
+#### A masked pattern was here ####
+POSTHOOK: query: SELECT COUNT(*) FROM src a JOIN src b ON a.key = b.key AND a.key = 0Y
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@src
+#### A masked pattern was here ####
+9
+PREHOOK: query: SELECT COUNT(*) FROM src a JOIN src b ON a.key = b.key AND a.key = 0BD
+PREHOOK: type: QUERY
+PREHOOK: Input: default@src
+#### A masked pattern was here ####
+POSTHOOK: query: SELECT COUNT(*) FROM src a JOIN src b ON a.key = b.key AND a.key = 0BD
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@src
+#### A masked pattern was here ####
+9



Mime
View raw message