hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xu...@apache.org
Subject svn commit: r1660293 [19/48] - in /hive/branches/spark: ./ accumulo-handler/src/java/org/apache/hadoop/hive/accumulo/serde/ accumulo-handler/src/test/org/apache/hadoop/hive/accumulo/ accumulo-handler/src/test/org/apache/hadoop/hive/accumulo/mr/ accumul...
Date Tue, 17 Feb 2015 06:49:34 GMT
Modified: hive/branches/spark/ql/src/test/org/apache/hadoop/hive/ql/parse/TestMacroSemanticAnalyzer.java
URL: http://svn.apache.org/viewvc/hive/branches/spark/ql/src/test/org/apache/hadoop/hive/ql/parse/TestMacroSemanticAnalyzer.java?rev=1660293&r1=1660292&r2=1660293&view=diff
==============================================================================
--- hive/branches/spark/ql/src/test/org/apache/hadoop/hive/ql/parse/TestMacroSemanticAnalyzer.java
(original)
+++ hive/branches/spark/ql/src/test/org/apache/hadoop/hive/ql/parse/TestMacroSemanticAnalyzer.java
Tue Feb 17 06:49:27 2015
@@ -66,12 +66,12 @@ public class TestMacroSemanticAnalyzer {
   @Test
   public void testDropMacroExistsDoNotIgnoreErrors() throws Exception {
     conf.setBoolVar(ConfVars.DROPIGNORESNONEXISTENT, false);
-    FunctionRegistry.registerGenericUDF(false, "SOME_MACRO", GenericUDFMacro.class);
+    FunctionRegistry.registerTemporaryUDF("SOME_MACRO", GenericUDFMacro.class);
     analyze(parse("DROP TEMPORARY MACRO SOME_MACRO"));
   }
   @Test
   public void testDropMacro() throws Exception {
-    FunctionRegistry.registerGenericUDF(false, "SOME_MACRO", GenericUDFMacro.class);
+    FunctionRegistry.registerTemporaryUDF("SOME_MACRO", GenericUDFMacro.class);
     analyze(parse("DROP TEMPORARY MACRO SOME_MACRO"));
   }
   @Test(expected = SemanticException.class)

Modified: hive/branches/spark/ql/src/test/org/apache/hadoop/hive/ql/udf/generic/TestGenericUDFAddMonths.java
URL: http://svn.apache.org/viewvc/hive/branches/spark/ql/src/test/org/apache/hadoop/hive/ql/udf/generic/TestGenericUDFAddMonths.java?rev=1660293&r1=1660292&r2=1660293&view=diff
==============================================================================
--- hive/branches/spark/ql/src/test/org/apache/hadoop/hive/ql/udf/generic/TestGenericUDFAddMonths.java
(original)
+++ hive/branches/spark/ql/src/test/org/apache/hadoop/hive/ql/udf/generic/TestGenericUDFAddMonths.java
Tue Feb 17 06:49:27 2015
@@ -46,6 +46,7 @@ public class TestGenericUDFAddMonths ext
     runAndVerify("2016-02-29", -12, "2015-02-28", udf);
     runAndVerify("2016-01-29", 1, "2016-02-29", udf);
     runAndVerify("2016-02-29", -1, "2016-01-31", udf);
+    runAndVerify("2014-01-32", 1, "2014-03-01", udf);
   }
 
   private void runAndVerify(String str, int months, String expResult, GenericUDF udf)

Modified: hive/branches/spark/ql/src/test/org/apache/hadoop/hive/ql/udf/generic/TestGenericUDFLastDay.java
URL: http://svn.apache.org/viewvc/hive/branches/spark/ql/src/test/org/apache/hadoop/hive/ql/udf/generic/TestGenericUDFLastDay.java?rev=1660293&r1=1660292&r2=1660293&view=diff
==============================================================================
--- hive/branches/spark/ql/src/test/org/apache/hadoop/hive/ql/udf/generic/TestGenericUDFLastDay.java
(original)
+++ hive/branches/spark/ql/src/test/org/apache/hadoop/hive/ql/udf/generic/TestGenericUDFLastDay.java
Tue Feb 17 06:49:27 2015
@@ -43,6 +43,8 @@ public class TestGenericUDFLastDay exten
     runAndVerify("2016-02-03", "2016-02-29", udf);
     runAndVerify("2016-02-28", "2016-02-29", udf);
     runAndVerify("2016-02-29", "2016-02-29", udf);
+    runAndVerify("01/14/2014", null, udf);
+    runAndVerify(null, null, udf);
 
     runAndVerify("2014-01-01 10:30:45", "2014-01-31", udf);
     runAndVerify("2014-01-14 10:30:45", "2014-01-31", udf);
@@ -56,9 +58,9 @@ public class TestGenericUDFLastDay exten
 
   private void runAndVerify(String str, String expResult, GenericUDF udf)
       throws HiveException {
-    DeferredObject valueObj0 = new DeferredJavaObject(new Text(str));
+    DeferredObject valueObj0 = new DeferredJavaObject(str != null ? new Text(str) : null);
     DeferredObject[] args = { valueObj0 };
     Text output = (Text) udf.evaluate(args);
-    assertEquals("last_day() test ", expResult, output.toString());
+    assertEquals("last_day() test ", expResult, output != null ? output.toString() : null);
   }
 }

Modified: hive/branches/spark/ql/src/test/queries/clientnegative/drop_native_udf.q
URL: http://svn.apache.org/viewvc/hive/branches/spark/ql/src/test/queries/clientnegative/drop_native_udf.q?rev=1660293&r1=1660292&r2=1660293&view=diff
==============================================================================
--- hive/branches/spark/ql/src/test/queries/clientnegative/drop_native_udf.q (original)
+++ hive/branches/spark/ql/src/test/queries/clientnegative/drop_native_udf.q Tue Feb 17 06:49:27
2015
@@ -1 +1 @@
-DROP TEMPORARY FUNCTION max;
+DROP FUNCTION max;

Modified: hive/branches/spark/ql/src/test/queries/clientpositive/cbo_union.q
URL: http://svn.apache.org/viewvc/hive/branches/spark/ql/src/test/queries/clientpositive/cbo_union.q?rev=1660293&r1=1660292&r2=1660293&view=diff
==============================================================================
--- hive/branches/spark/ql/src/test/queries/clientpositive/cbo_union.q (original)
+++ hive/branches/spark/ql/src/test/queries/clientpositive/cbo_union.q Tue Feb 17 06:49:27
2015
@@ -7,7 +7,7 @@ set hive.auto.convert.join=false;
 -- SORT_QUERY_RESULTS
 
 -- 11. Union All
-select * from cbo_t1 order by key, c_boolean, value, dt union all select * from cbo_t2 order
by key, c_boolean, value, dt;
+select * from (select * from cbo_t1 order by key, c_boolean, value, dt)a union all select
* from (select * from cbo_t2 order by key, c_boolean, value, dt)b;
 select key from (select key, c_int from (select * from cbo_t1 union all select * from cbo_t2
where cbo_t2.key >=0)r1 union all select key, c_int from cbo_t3)r2 where key >=0 order
by key;
 select r2.key from (select key, c_int from (select key, c_int from cbo_t1 union all select
key, c_int from cbo_t3 )r1 union all select key, c_int from cbo_t3)r2 join   (select key,
c_int from (select * from cbo_t1 union all select * from cbo_t2 where cbo_t2.key >=0)r1
union all select key, c_int from cbo_t3)r3 on r2.key=r3.key where r3.key >=0 order by r2.key;
 

Modified: hive/branches/spark/ql/src/test/queries/clientpositive/explode_null.q
URL: http://svn.apache.org/viewvc/hive/branches/spark/ql/src/test/queries/clientpositive/explode_null.q?rev=1660293&r1=1660292&r2=1660293&view=diff
==============================================================================
--- hive/branches/spark/ql/src/test/queries/clientpositive/explode_null.q (original)
+++ hive/branches/spark/ql/src/test/queries/clientpositive/explode_null.q Tue Feb 17 06:49:27
2015
@@ -1,10 +1,10 @@
 SELECT explode(col) AS myCol FROM 
-    (SELECT array(1,2,3) AS col FROM src LIMIT 1 
+    (select * from (SELECT array(1,2,3) AS col FROM src LIMIT 1)ea 
      UNION ALL
-     SELECT IF(false, array(1,2,3), NULL) AS col FROM src LIMIT 1) a;
+     select * from (SELECT IF(false, array(1,2,3), NULL) AS col FROM src LIMIT 1)eb) a;
 
 SELECT explode(col) AS (myCol1,myCol2) FROM
-    (SELECT map(1,'one',2,'two',3,'three') AS col FROM src LIMIT 1
+    (select * from (SELECT map(1,'one',2,'two',3,'three') AS col FROM src LIMIT 1)ea
      UNION ALL
-     SELECT IF(false, map(1,'one',2,'two',3,'three'), NULL) AS col FROM src LIMIT 1) a;
+     select * from (SELECT IF(false, map(1,'one',2,'two',3,'three'), NULL) AS col FROM src
LIMIT 1)eb ) a;
      
\ No newline at end of file

Modified: hive/branches/spark/ql/src/test/queries/clientpositive/groupby10.q
URL: http://svn.apache.org/viewvc/hive/branches/spark/ql/src/test/queries/clientpositive/groupby10.q?rev=1660293&r1=1660292&r2=1660293&view=diff
==============================================================================
--- hive/branches/spark/ql/src/test/queries/clientpositive/groupby10.q (original)
+++ hive/branches/spark/ql/src/test/queries/clientpositive/groupby10.q Tue Feb 17 06:49:27
2015
@@ -36,7 +36,9 @@ INSERT OVERWRITE TABLE dest2 SELECT INPU
 SELECT * from dest1;
 SELECT * from dest2;
 
+set hive.groupby.skewindata=false;
 -- HIVE-3852 Multi-groupby optimization fails when same distinct column is used twice or
more
+
 EXPLAIN
 FROM INPUT
 INSERT OVERWRITE TABLE dest1 SELECT INPUT.key, sum(distinct substr(INPUT.value,5)), count(distinct
substr(INPUT.value,5)) GROUP BY INPUT.key

Modified: hive/branches/spark/ql/src/test/queries/clientpositive/groupby3_map_skew.q
URL: http://svn.apache.org/viewvc/hive/branches/spark/ql/src/test/queries/clientpositive/groupby3_map_skew.q?rev=1660293&r1=1660292&r2=1660293&view=diff
==============================================================================
--- hive/branches/spark/ql/src/test/queries/clientpositive/groupby3_map_skew.q (original)
+++ hive/branches/spark/ql/src/test/queries/clientpositive/groupby3_map_skew.q Tue Feb 17
06:49:27 2015
@@ -29,5 +29,6 @@ INSERT OVERWRITE TABLE dest1 SELECT
   variance(substr(src.value,5)),
   var_samp(substr(src.value,5));
 
-SELECT c1, c2, c3, c4, c5, c6, c7, ROUND(c8, 5), ROUND(c9, 5) FROM dest1;
+SELECT ROUND(c1, 1), ROUND(c2, 3), ROUND(c3, 5), ROUND(c4, 1), ROUND(c5, 1), ROUND(c6, 5),
+ROUND(c7,5), ROUND(c8, 5), ROUND(c9, 5) FROM dest1;
 

Modified: hive/branches/spark/ql/src/test/queries/clientpositive/groupby_multi_insert_common_distinct.q
URL: http://svn.apache.org/viewvc/hive/branches/spark/ql/src/test/queries/clientpositive/groupby_multi_insert_common_distinct.q?rev=1660293&r1=1660292&r2=1660293&view=diff
==============================================================================
--- hive/branches/spark/ql/src/test/queries/clientpositive/groupby_multi_insert_common_distinct.q
(original)
+++ hive/branches/spark/ql/src/test/queries/clientpositive/groupby_multi_insert_common_distinct.q
Tue Feb 17 06:49:27 2015
@@ -18,17 +18,3 @@ insert overwrite table dest2 select key+
 select * from dest1 where key < 10;
 select * from dest2 where key < 20 order by key limit 10;
 
-set hive.optimize.multigroupby.common.distincts=false;
-
--- no need to spray by distinct key first
-explain
-from src
-insert overwrite table dest1 select key, count(distinct value) group by key
-insert overwrite table dest2 select key+key, count(distinct value) group by key+key;
-
-from src
-insert overwrite table dest1 select key, count(distinct value) group by key
-insert overwrite table dest2 select key+key, count(distinct value) group by key+key;
-
-select * from dest1 where key < 10;
-select * from dest2 where key < 20 order by key limit 10;

Modified: hive/branches/spark/ql/src/test/queries/clientpositive/input25.q
URL: http://svn.apache.org/viewvc/hive/branches/spark/ql/src/test/queries/clientpositive/input25.q?rev=1660293&r1=1660292&r2=1660293&view=diff
==============================================================================
--- hive/branches/spark/ql/src/test/queries/clientpositive/input25.q (original)
+++ hive/branches/spark/ql/src/test/queries/clientpositive/input25.q Tue Feb 17 06:49:27 2015
@@ -5,15 +5,15 @@ alter table tst add partition (d='2009-0
 
 explain
 select * from (
-  select * from tst x where x.d='2009-01-01' limit 10
+  select * from (select * from tst x where x.d='2009-01-01' limit 10)a
     union all
-  select * from tst x where x.d='2009-02-02' limit 10
+  select * from (select * from tst x where x.d='2009-02-02' limit 10)b
 ) subq;
 
 select * from (
-  select * from tst x where x.d='2009-01-01' limit 10
+  select * from (select * from tst x where x.d='2009-01-01' limit 10)a
     union all
-  select * from tst x where x.d='2009-02-02' limit 10
+  select * from (select * from tst x where x.d='2009-02-02' limit 10)b
 ) subq;
 
 

Modified: hive/branches/spark/ql/src/test/queries/clientpositive/input26.q
URL: http://svn.apache.org/viewvc/hive/branches/spark/ql/src/test/queries/clientpositive/input26.q?rev=1660293&r1=1660292&r2=1660293&view=diff
==============================================================================
--- hive/branches/spark/ql/src/test/queries/clientpositive/input26.q (original)
+++ hive/branches/spark/ql/src/test/queries/clientpositive/input26.q Tue Feb 17 06:49:27 2015
@@ -1,12 +1,12 @@
 explain
 select * from (
-  select * from srcpart a where a.ds = '2008-04-08' and a.hr = '11' order by a.key limit
5
+  select * from (select * from srcpart a where a.ds = '2008-04-08' and a.hr = '11' order
by a.key limit 5)pa
     union all
-  select * from srcpart b where b.ds = '2008-04-08' and b.hr = '14' limit 5
+  select * from (select * from srcpart b where b.ds = '2008-04-08' and b.hr = '14' limit
5)pb
 )subq;
 
 select * from (
-  select * from srcpart a where a.ds = '2008-04-08' and a.hr = '11' order by a.key limit
5
+  select * from (select * from srcpart a where a.ds = '2008-04-08' and a.hr = '11' order
by a.key limit 5)pa
     union all
-  select * from srcpart b where b.ds = '2008-04-08' and b.hr = '14' limit 5
+  select * from (select * from srcpart b where b.ds = '2008-04-08' and b.hr = '14' limit
5)pb
 )subq;

Modified: hive/branches/spark/ql/src/test/queries/clientpositive/load_dyn_part14.q
URL: http://svn.apache.org/viewvc/hive/branches/spark/ql/src/test/queries/clientpositive/load_dyn_part14.q?rev=1660293&r1=1660292&r2=1660293&view=diff
==============================================================================
--- hive/branches/spark/ql/src/test/queries/clientpositive/load_dyn_part14.q (original)
+++ hive/branches/spark/ql/src/test/queries/clientpositive/load_dyn_part14.q Tue Feb 17 06:49:27
2015
@@ -14,20 +14,20 @@ set hive.exec.dynamic.partition.mode=non
 explain
 insert overwrite table nzhang_part14 partition(value) 
 select key, value from (
-  select 'k1' as key, cast(null as string) as value from src limit 2
+  select * from (select 'k1' as key, cast(null as string) as value from src limit 2)a 
   union all
-  select 'k2' as key, '' as value from src limit 2
+  select * from (select 'k2' as key, '' as value from src limit 2)b
   union all 
-  select 'k3' as key, ' ' as value from src limit 2
+  select * from (select 'k3' as key, ' ' as value from src limit 2)c
 ) T;
 
 insert overwrite table nzhang_part14 partition(value) 
 select key, value from (
-  select 'k1' as key, cast(null as string) as value from src limit 2
+  select * from (select 'k1' as key, cast(null as string) as value from src limit 2)a 
   union all
-  select 'k2' as key, '' as value from src limit 2
+  select * from (select 'k2' as key, '' as value from src limit 2)b
   union all 
-  select 'k3' as key, ' ' as value from src limit 2
+  select * from (select 'k3' as key, ' ' as value from src limit 2)c
 ) T;
 
 

Modified: hive/branches/spark/ql/src/test/queries/clientpositive/metadataOnlyOptimizer.q
URL: http://svn.apache.org/viewvc/hive/branches/spark/ql/src/test/queries/clientpositive/metadataOnlyOptimizer.q?rev=1660293&r1=1660292&r2=1660293&view=diff
==============================================================================
--- hive/branches/spark/ql/src/test/queries/clientpositive/metadataOnlyOptimizer.q (original)
+++ hive/branches/spark/ql/src/test/queries/clientpositive/metadataOnlyOptimizer.q Tue Feb
17 06:49:27 2015
@@ -33,9 +33,9 @@ UNION all
 SELECT key as key from src
 ) tab group by key;
 
-select k from (SELECT '1' as k from src limit 0 union all select key as k from src limit
1)tab;
+select k from (select * from (SELECT '1' as k from src limit 0)a union all select key as
k from src limit 1)tab;
 
-select k from (SELECT '1' as k from src limit 1 union all select key as k from src limit
0)tab;
+select k from (select * from (SELECT '1' as k from src limit 1)a union all select key as
k from src limit 0)tab;
 
 select max(ds) from srcpart;
 

Modified: hive/branches/spark/ql/src/test/queries/clientpositive/orc_analyze.q
URL: http://svn.apache.org/viewvc/hive/branches/spark/ql/src/test/queries/clientpositive/orc_analyze.q?rev=1660293&r1=1660292&r2=1660293&view=diff
==============================================================================
--- hive/branches/spark/ql/src/test/queries/clientpositive/orc_analyze.q (original)
+++ hive/branches/spark/ql/src/test/queries/clientpositive/orc_analyze.q Tue Feb 17 06:49:27
2015
@@ -30,8 +30,13 @@ STORED AS orc;
 INSERT OVERWRITE TABLE orc_create_people SELECT * FROM orc_create_people_staging ORDER BY
id;
 
 set hive.stats.autogather = true;
+analyze table orc_create_people compute statistics;
+desc formatted orc_create_people;
+
 analyze table orc_create_people compute statistics partialscan;
+desc formatted orc_create_people;
 
+analyze table orc_create_people compute statistics noscan;
 desc formatted orc_create_people;
 
 drop table orc_create_people;
@@ -70,8 +75,15 @@ INSERT OVERWRITE TABLE orc_create_people
   SELECT * FROM orc_create_people_staging ORDER BY id;
 
 set hive.stats.autogather = true;
+analyze table orc_create_people partition(state) compute statistics;
+desc formatted orc_create_people partition(state="Ca");
+desc formatted orc_create_people partition(state="Or");
+
 analyze table orc_create_people partition(state) compute statistics partialscan;
+desc formatted orc_create_people partition(state="Ca");
+desc formatted orc_create_people partition(state="Or");
 
+analyze table orc_create_people partition(state) compute statistics noscan;
 desc formatted orc_create_people partition(state="Ca");
 desc formatted orc_create_people partition(state="Or");
 
@@ -116,8 +128,15 @@ INSERT OVERWRITE TABLE orc_create_people
   SELECT * FROM orc_create_people_staging ORDER BY id;
 
 set hive.stats.autogather = true;
+analyze table orc_create_people partition(state) compute statistics;
+desc formatted orc_create_people partition(state="Ca");
+desc formatted orc_create_people partition(state="Or");
+
 analyze table orc_create_people partition(state) compute statistics partialscan;
+desc formatted orc_create_people partition(state="Ca");
+desc formatted orc_create_people partition(state="Or");
 
+analyze table orc_create_people partition(state) compute statistics noscan;
 desc formatted orc_create_people partition(state="Ca");
 desc formatted orc_create_people partition(state="Or");
 
@@ -174,8 +193,15 @@ ALTER TABLE orc_create_people SET SERDE
 ALTER TABLE orc_create_people SET FILEFORMAT ORC;
 
 set hive.stats.autogather = true;
-analyze table orc_create_people partition(state) compute statistics noscan;
+analyze table orc_create_people partition(state) compute statistics;
+desc formatted orc_create_people partition(state="Ca");
+desc formatted orc_create_people partition(state="OH");
 
+analyze table orc_create_people partition(state) compute statistics partialscan;
+desc formatted orc_create_people partition(state="Ca");
+desc formatted orc_create_people partition(state="OH");
+
+analyze table orc_create_people partition(state) compute statistics noscan;
 desc formatted orc_create_people partition(state="Ca");
 desc formatted orc_create_people partition(state="OH");
 

Modified: hive/branches/spark/ql/src/test/queries/clientpositive/parquet_types.q
URL: http://svn.apache.org/viewvc/hive/branches/spark/ql/src/test/queries/clientpositive/parquet_types.q?rev=1660293&r1=1660292&r2=1660293&view=diff
==============================================================================
--- hive/branches/spark/ql/src/test/queries/clientpositive/parquet_types.q (original)
+++ hive/branches/spark/ql/src/test/queries/clientpositive/parquet_types.q Tue Feb 17 06:49:27
2015
@@ -55,8 +55,8 @@ SELECT ctinyint,
   MAX(cint),
   MIN(csmallint),
   COUNT(cstring1),
-  AVG(cfloat),
-  STDDEV_POP(cdouble)
+  ROUND(AVG(cfloat), 5),
+  ROUND(STDDEV_POP(cdouble),5)
 FROM parquet_types
 GROUP BY ctinyint
 ORDER BY ctinyint

Modified: hive/branches/spark/ql/src/test/queries/clientpositive/ptf.q
URL: http://svn.apache.org/viewvc/hive/branches/spark/ql/src/test/queries/clientpositive/ptf.q?rev=1660293&r1=1660292&r2=1660293&view=diff
==============================================================================
--- hive/branches/spark/ql/src/test/queries/clientpositive/ptf.q (original)
+++ hive/branches/spark/ql/src/test/queries/clientpositive/ptf.q Tue Feb 17 06:49:27 2015
@@ -202,7 +202,7 @@ dense_rank() over (partition by p_mfgr o
 sum(p_retailprice) over (partition by p_mfgr order by p_name rows between unbounded preceding
and current row)  as s1
 from noop(on noopwithmap(on noop(on part 
 partition by p_mfgr 
-order by p_mfgr, p_name
+order by p_mfgr DESC, p_name
 )));
 
 select p_mfgr, p_name, p_size, 
@@ -211,7 +211,7 @@ dense_rank() over (partition by p_mfgr o
 sum(p_retailprice) over (partition by p_mfgr order by p_name rows between unbounded preceding
and current row)  as s1
 from noop(on noopwithmap(on noop(on part 
 partition by p_mfgr 
-order by p_mfgr, p_name
+order by p_mfgr DESC, p_name
 )));
  
 -- 13. testPTFAndWindowingInSubQ

Modified: hive/branches/spark/ql/src/test/queries/clientpositive/ptf_matchpath.q
URL: http://svn.apache.org/viewvc/hive/branches/spark/ql/src/test/queries/clientpositive/ptf_matchpath.q?rev=1660293&r1=1660292&r2=1660293&view=diff
==============================================================================
--- hive/branches/spark/ql/src/test/queries/clientpositive/ptf_matchpath.q (original)
+++ hive/branches/spark/ql/src/test/queries/clientpositive/ptf_matchpath.q Tue Feb 17 06:49:27
2015
@@ -15,6 +15,17 @@ LOAD DATA LOCAL INPATH '../../data/files
 -- SORT_QUERY_RESULTS
 
 -- 1. basic Matchpath test
+explain
+select origin_city_name, fl_num, year, month, day_of_month, sz, tpath 
+from matchpath(on 
+        flights_tiny 
+        distribute by fl_num 
+        sort by year, month, day_of_month  
+      arg1('LATE.LATE+'), 
+      arg2('LATE'), arg3(arr_delay > 15), 
+    arg4('origin_city_name, fl_num, year, month, day_of_month, size(tpath) as sz, tpath[0].day_of_month
as tpath') 
+   );       
+
 select origin_city_name, fl_num, year, month, day_of_month, sz, tpath 
 from matchpath(on 
         flights_tiny 
@@ -26,6 +37,17 @@ from matchpath(on
    );       
 
 -- 2. Matchpath on 1 partition
+explain
+select origin_city_name, fl_num, year, month, day_of_month, sz, tpath 
+from matchpath(on 
+        flights_tiny 
+        sort by fl_num, year, month, day_of_month  
+      arg1('LATE.LATE+'), 
+      arg2('LATE'), arg3(arr_delay > 15), 
+    arg4('origin_city_name, fl_num, year, month, day_of_month, size(tpath) as sz, tpath[0].day_of_month
as tpath') 
+   )
+where fl_num = 1142;
+
 select origin_city_name, fl_num, year, month, day_of_month, sz, tpath 
 from matchpath(on 
         flights_tiny 
@@ -37,6 +59,17 @@ from matchpath(on
 where fl_num = 1142;
 
 -- 3. empty partition.
+explain
+select origin_city_name, fl_num, year, month, day_of_month, sz, tpath
+from matchpath(on
+        (select * from flights_tiny where fl_num = -1142) flights_tiny
+        sort by fl_num, year, month, day_of_month
+      arg1('LATE.LATE+'),
+      arg2('LATE'), arg3(arr_delay > 15),
+    arg4('origin_city_name, fl_num, year, month, day_of_month, size(tpath) as sz, tpath[0].day_of_month
as tpath')
+   );
+   
+
 select origin_city_name, fl_num, year, month, day_of_month, sz, tpath
 from matchpath(on
         (select * from flights_tiny where fl_num = -1142) flights_tiny

Modified: hive/branches/spark/ql/src/test/queries/clientpositive/script_env_var1.q
URL: http://svn.apache.org/viewvc/hive/branches/spark/ql/src/test/queries/clientpositive/script_env_var1.q?rev=1660293&r1=1660292&r2=1660293&view=diff
==============================================================================
--- hive/branches/spark/ql/src/test/queries/clientpositive/script_env_var1.q (original)
+++ hive/branches/spark/ql/src/test/queries/clientpositive/script_env_var1.q Tue Feb 17 06:49:27
2015
@@ -1,5 +1,5 @@
 -- Verifies that script operator ID environment variables have unique values
 -- in each instance of the script operator.
 SELECT count(1) FROM
-( SELECT TRANSFORM('echo $HIVE_SCRIPT_OPERATOR_ID') USING 'sh' AS key FROM src LIMIT 1 UNION
ALL
-  SELECT TRANSFORM('echo $HIVE_SCRIPT_OPERATOR_ID') USING 'sh' AS key FROM src LIMIT 1 )
a GROUP BY key;
+( SELECT * FROM (SELECT TRANSFORM('echo $HIVE_SCRIPT_OPERATOR_ID') USING 'sh' AS key FROM
src LIMIT 1)x UNION ALL
+  SELECT * FROM (SELECT TRANSFORM('echo $HIVE_SCRIPT_OPERATOR_ID') USING 'sh' AS key FROM
src LIMIT 1)y ) a GROUP BY key;

Modified: hive/branches/spark/ql/src/test/queries/clientpositive/script_env_var2.q
URL: http://svn.apache.org/viewvc/hive/branches/spark/ql/src/test/queries/clientpositive/script_env_var2.q?rev=1660293&r1=1660292&r2=1660293&view=diff
==============================================================================
--- hive/branches/spark/ql/src/test/queries/clientpositive/script_env_var2.q (original)
+++ hive/branches/spark/ql/src/test/queries/clientpositive/script_env_var2.q Tue Feb 17 06:49:27
2015
@@ -1,5 +1,5 @@
 set hive.script.operator.id.env.var = MY_ID;
 -- Same test as script_env_var1, but test setting the variable name
 SELECT count(1) FROM
-( SELECT TRANSFORM('echo $MY_ID') USING 'sh' AS key FROM src LIMIT 1 UNION ALL
-  SELECT TRANSFORM('echo $MY_ID') USING 'sh' AS key FROM src LIMIT 1 ) a GROUP BY key;
+( SELECT * FROM (SELECT TRANSFORM('echo $MY_ID') USING 'sh' AS key FROM src LIMIT 1)a UNION
ALL
+  SELECT * FROM (SELECT TRANSFORM('echo $MY_ID') USING 'sh' AS key FROM src LIMIT 1)b ) a
GROUP BY key;

Modified: hive/branches/spark/ql/src/test/queries/clientpositive/udaf_covar_pop.q
URL: http://svn.apache.org/viewvc/hive/branches/spark/ql/src/test/queries/clientpositive/udaf_covar_pop.q?rev=1660293&r1=1660292&r2=1660293&view=diff
==============================================================================
--- hive/branches/spark/ql/src/test/queries/clientpositive/udaf_covar_pop.q (original)
+++ hive/branches/spark/ql/src/test/queries/clientpositive/udaf_covar_pop.q Tue Feb 17 06:49:27
2015
@@ -11,6 +11,6 @@ SELECT covar_pop(b, c) FROM covar_tab WH
 SELECT covar_pop(b, c) FROM covar_tab WHERE a < 3;
 SELECT covar_pop(b, c) FROM covar_tab WHERE a = 3;
 SELECT a, covar_pop(b, c) FROM covar_tab GROUP BY a ORDER BY a;
-SELECT covar_pop(b, c) FROM covar_tab;
+SELECT ROUND(covar_pop(b, c), 5) FROM covar_tab;
 
 DROP TABLE covar_tab;

Modified: hive/branches/spark/ql/src/test/queries/clientpositive/udaf_covar_samp.q
URL: http://svn.apache.org/viewvc/hive/branches/spark/ql/src/test/queries/clientpositive/udaf_covar_samp.q?rev=1660293&r1=1660292&r2=1660293&view=diff
==============================================================================
--- hive/branches/spark/ql/src/test/queries/clientpositive/udaf_covar_samp.q (original)
+++ hive/branches/spark/ql/src/test/queries/clientpositive/udaf_covar_samp.q Tue Feb 17 06:49:27
2015
@@ -11,6 +11,6 @@ SELECT covar_samp(b, c) FROM covar_tab W
 SELECT covar_samp(b, c) FROM covar_tab WHERE a < 3;
 SELECT covar_samp(b, c) FROM covar_tab WHERE a = 3;
 SELECT a, covar_samp(b, c) FROM covar_tab GROUP BY a ORDER BY a;
-SELECT covar_samp(b, c) FROM covar_tab;
+SELECT ROUND(covar_samp(b, c), 5) FROM covar_tab;
 
 DROP TABLE covar_tab;

Modified: hive/branches/spark/ql/src/test/queries/clientpositive/udf_add_months.q
URL: http://svn.apache.org/viewvc/hive/branches/spark/ql/src/test/queries/clientpositive/udf_add_months.q?rev=1660293&r1=1660292&r2=1660293&view=diff
==============================================================================
--- hive/branches/spark/ql/src/test/queries/clientpositive/udf_add_months.q (original)
+++ hive/branches/spark/ql/src/test/queries/clientpositive/udf_add_months.q Tue Feb 17 06:49:27
2015
@@ -1,2 +1,43 @@
 DESCRIBE FUNCTION add_months;
 DESCRIBE FUNCTION EXTENDED add_months;
+
+explain select add_months('2014-01-14', 1);
+
+select
+add_months('2014-01-14', 1),
+add_months('2014-01-31', 1),
+add_months('2014-02-28', -1),
+add_months('2014-02-28', 2),
+add_months('2014-04-30', -2),
+add_months('2015-02-28', 12),
+add_months('2016-02-29', -12),
+add_months('2016-01-29', 1),
+add_months('2016-02-29', -1),
+add_months('2014-01-32', 1),
+add_months('01/14/2014', 1),
+add_months(cast(null as string), 1),
+add_months('2014-01-14', cast(null as int));
+
+select
+add_months('2014-01-14 10:30:00', 1),
+add_months('2014-01-31 10:30:00', 1),
+add_months('2014-02-28 10:30:00', -1),
+add_months('2014-02-28 16:30:00', 2),
+add_months('2014-04-30 10:30:00', -2),
+add_months('2015-02-28 10:30:00', 12),
+add_months('2016-02-29 10:30:00', -12),
+add_months('2016-01-29 10:30:00', 1),
+add_months('2016-02-29 10:30:00', -1),
+add_months('2014-01-32 10:30:00', 1);
+
+select
+add_months(cast('2014-01-14 10:30:00' as timestamp), 1),
+add_months(cast('2014-01-31 10:30:00' as timestamp), 1),
+add_months(cast('2014-02-28 10:30:00' as timestamp), -1),
+add_months(cast('2014-02-28 16:30:00' as timestamp), 2),
+add_months(cast('2014-04-30 10:30:00' as timestamp), -2),
+add_months(cast('2015-02-28 10:30:00' as timestamp), 12),
+add_months(cast('2016-02-29 10:30:00' as timestamp), -12),
+add_months(cast('2016-01-29 10:30:00' as timestamp), 1),
+add_months(cast('2016-02-29 10:30:00' as timestamp), -1),
+add_months(cast(null as timestamp), 1);
\ No newline at end of file

Modified: hive/branches/spark/ql/src/test/queries/clientpositive/udf_last_day.q
URL: http://svn.apache.org/viewvc/hive/branches/spark/ql/src/test/queries/clientpositive/udf_last_day.q?rev=1660293&r1=1660292&r2=1660293&view=diff
==============================================================================
--- hive/branches/spark/ql/src/test/queries/clientpositive/udf_last_day.q (original)
+++ hive/branches/spark/ql/src/test/queries/clientpositive/udf_last_day.q Tue Feb 17 06:49:27
2015
@@ -1,2 +1,52 @@
 DESCRIBE FUNCTION last_day;
 DESCRIBE FUNCTION EXTENDED last_day;
+
+explain select last_day('2015-02-05');
+
+select
+last_day('2014-01-01'),
+last_day('2014-01-14'),
+last_day('2014-01-31'),
+last_day('2014-02-02'),
+last_day('2014-02-28'),
+last_day('2016-02-03'),
+last_day('2016-02-28'),
+last_day('2016-02-29'),
+last_day('2014-01-34'),
+last_day(cast(null as string)),
+last_day('01/29/2014');
+
+select
+last_day('2014-01-01 10:30:45'),
+last_day('2014-01-14 10:30:45'),
+last_day('2014-01-31 10:30:45'),
+last_day('2014-02-02 10:30:45'),
+last_day('2014-02-28 10:30:45'),
+last_day('2016-02-03 10:30:45'),
+last_day('2016-02-28 10:30:45'),
+last_day('2016-02-29 10:30:45'),
+last_day('2014-01-34 10:30:45'),
+last_day(cast(null as string)),
+last_day('01/29/2014 10:30:45');
+
+select
+last_day(cast('2014-01-01' as date)),
+last_day(cast('2014-01-14' as date)),
+last_day(cast('2014-01-31' as date)),
+last_day(cast('2014-02-02' as date)),
+last_day(cast('2014-02-28' as date)),
+last_day(cast('2016-02-03' as date)),
+last_day(cast('2016-02-28' as date)),
+last_day(cast('2016-02-29' as date)),
+last_day(cast(null as date));
+
+select
+last_day(cast('2014-01-01 10:30:45' as timestamp)),
+last_day(cast('2014-01-14 10:30:45' as timestamp)),
+last_day(cast('2014-01-31 10:30:45' as timestamp)),
+last_day(cast('2014-02-02 10:30:45' as timestamp)),
+last_day(cast('2014-02-28 10:30:45' as timestamp)),
+last_day(cast('2016-02-03 10:30:45' as timestamp)),
+last_day(cast('2016-02-28 10:30:45' as timestamp)),
+last_day(cast('2016-02-29 10:30:45' as timestamp)),
+last_day(cast(null as timestamp));
\ No newline at end of file

Modified: hive/branches/spark/ql/src/test/queries/clientpositive/union3.q
URL: http://svn.apache.org/viewvc/hive/branches/spark/ql/src/test/queries/clientpositive/union3.q?rev=1660293&r1=1660292&r2=1660293&view=diff
==============================================================================
--- hive/branches/spark/ql/src/test/queries/clientpositive/union3.q (original)
+++ hive/branches/spark/ql/src/test/queries/clientpositive/union3.q Tue Feb 17 06:49:27 2015
@@ -5,17 +5,16 @@ SELECT *
 FROM (
   SELECT 1 AS id
   FROM (SELECT * FROM src LIMIT 1) s1
-  CLUSTER BY id
   UNION ALL
   SELECT 2 AS id
   FROM (SELECT * FROM src LIMIT 1) s1
-  CLUSTER BY id
   UNION ALL
   SELECT 3 AS id
   FROM (SELECT * FROM src LIMIT 1) s2
   UNION ALL
   SELECT 4 AS id
   FROM (SELECT * FROM src LIMIT 1) s2
+  CLUSTER BY id
 ) a;
 
 
@@ -27,17 +26,16 @@ SELECT *
 FROM (
   SELECT 1 AS id
   FROM (SELECT * FROM src LIMIT 1) s1
-  CLUSTER BY id
   UNION ALL
   SELECT 2 AS id
   FROM (SELECT * FROM src LIMIT 1) s1
-  CLUSTER BY id
   UNION ALL
   SELECT 3 AS id
   FROM (SELECT * FROM src LIMIT 1) s2
   UNION ALL
   SELECT 4 AS id
   FROM (SELECT * FROM src LIMIT 1) s2
+  CLUSTER BY id
 ) a;
 
-select * from union_out cluster by id;
+select * from union_out;

Modified: hive/branches/spark/ql/src/test/queries/clientpositive/union_null.q
URL: http://svn.apache.org/viewvc/hive/branches/spark/ql/src/test/queries/clientpositive/union_null.q?rev=1660293&r1=1660292&r2=1660293&view=diff
==============================================================================
--- hive/branches/spark/ql/src/test/queries/clientpositive/union_null.q (original)
+++ hive/branches/spark/ql/src/test/queries/clientpositive/union_null.q Tue Feb 17 06:49:27
2015
@@ -1,7 +1,7 @@
 -- SORT_BEFORE_DIFF
 
 -- HIVE-2901
-select x from (select value as x from src order by x limit 5 union all select NULL as x from
src limit 5) a;
+select x from (select * from (select value as x from src order by x limit 5)a union all select
* from (select NULL as x from src limit 5)b )a;
 
 -- HIVE-4837
-select * from (select null as N from src1 group by key UNION ALL select null as N from src1
group by key ) a;
+select * from (select * from (select null as N from src1 group by key)a UNION ALL select
* from (select null as N from src1 group by key)b ) a;

Modified: hive/branches/spark/ql/src/test/queries/clientpositive/union_remove_25.q
URL: http://svn.apache.org/viewvc/hive/branches/spark/ql/src/test/queries/clientpositive/union_remove_25.q?rev=1660293&r1=1660292&r2=1660293&view=diff
==============================================================================
--- hive/branches/spark/ql/src/test/queries/clientpositive/union_remove_25.q (original)
+++ hive/branches/spark/ql/src/test/queries/clientpositive/union_remove_25.q Tue Feb 17 06:49:27
2015
@@ -51,17 +51,17 @@ explain
 insert overwrite table outputTbl2 partition(ds)
 SELECT *
 FROM (
-  SELECT key, value, ds from srcpart where ds='2008-04-08' limit 500
+  select * from (SELECT key, value, ds from srcpart where ds='2008-04-08' limit 500)a
   UNION ALL
-  SELECT key, value, ds from srcpart where ds='2008-04-08' limit 500
+  select * from (SELECT key, value, ds from srcpart where ds='2008-04-08' limit 500)b
 ) a;
 
 insert overwrite table outputTbl2 partition(ds)
 SELECT *
 FROM (
-  SELECT key, value, ds from srcpart where ds='2008-04-08' limit 500
+  select * from (SELECT key, value, ds from srcpart where ds='2008-04-08' limit 500)a
   UNION ALL
-  SELECT key, value, ds from srcpart where ds='2008-04-08' limit 500
+  select * from (SELECT key, value, ds from srcpart where ds='2008-04-08' limit 500)b
 ) a;
 
 show partitions outputTbl2;
@@ -70,17 +70,17 @@ desc formatted outputTbl2 partition(ds='
 explain insert overwrite table outputTbl3 partition(ds, hr)
 SELECT *
 FROM (
-  SELECT key, value, ds, hr from srcpart where ds='2008-04-08' limit 1000
+  select * from (SELECT key, value, ds, hr from srcpart where ds='2008-04-08' limit 1000)a
   UNION ALL
-  SELECT key, value, ds, hr from srcpart where ds='2008-04-08' limit 1000
+  select * from (SELECT key, value, ds, hr from srcpart where ds='2008-04-08' limit 1000)b
 ) a;
 
 insert overwrite table outputTbl3 partition(ds, hr)
 SELECT *
 FROM (
-  SELECT key, value, ds, hr from srcpart where ds='2008-04-08' limit 1000
+  select * from (SELECT key, value, ds, hr from srcpart where ds='2008-04-08' limit 1000)a
   UNION ALL
-  SELECT key, value, ds, hr from srcpart where ds='2008-04-08' limit 1000
+  select * from (SELECT key, value, ds, hr from srcpart where ds='2008-04-08' limit 1000)b
 ) a;
 
 show partitions outputTbl3;

Modified: hive/branches/spark/ql/src/test/queries/clientpositive/union_top_level.q
URL: http://svn.apache.org/viewvc/hive/branches/spark/ql/src/test/queries/clientpositive/union_top_level.q?rev=1660293&r1=1660292&r2=1660293&view=diff
==============================================================================
--- hive/branches/spark/ql/src/test/queries/clientpositive/union_top_level.q (original)
+++ hive/branches/spark/ql/src/test/queries/clientpositive/union_top_level.q Tue Feb 17 06:49:27
2015
@@ -2,42 +2,42 @@
 
 -- top level
 explain
-select key, 0 as value from src where key % 3 == 0 limit 3
+select * from (select key, 0 as value from src where key % 3 == 0 limit 3)a
 union all
-select key, 1 as value from src where key % 3 == 1 limit 3
+select * from (select key, 1 as value from src where key % 3 == 1 limit 3)b
 union all
-select key, 2 as value from src where key % 3 == 2 limit 3;
+select * from (select key, 2 as value from src where key % 3 == 2 limit 3)c;
 
-select key, 0 as value from src where key % 3 == 0 limit 3
+select * from (select key, 0 as value from src where key % 3 == 0 limit 3)a
 union all
-select key, 1 as value from src where key % 3 == 1 limit 3
+select * from (select key, 1 as value from src where key % 3 == 1 limit 3)b
 union all
-select key, 2 as value from src where key % 3 == 2 limit 3;
+select * from (select key, 2 as value from src where key % 3 == 2 limit 3)c;
 
 explain
-select s1.key as k, s2.value as v from src s1 join src s2 on (s1.key = s2.key) limit 10
+select * from (select s1.key as k, s2.value as v from src s1 join src s2 on (s1.key = s2.key)
limit 10)a
 union all
-select s1.key as k, s2.value as v from src s1 join src s2 on (s1.key = s2.key) limit 10;
+select * from (select s1.key as k, s2.value as v from src s1 join src s2 on (s1.key = s2.key)
limit 10)b;
 
-select s1.key as k, s2.value as v from src s1 join src s2 on (s1.key = s2.key) limit 10
+select * from (select s1.key as k, s2.value as v from src s1 join src s2 on (s1.key = s2.key)
limit 10)a
 union all
-select s1.key as k, s2.value as v from src s1 join src s2 on (s1.key = s2.key) limit 10;
+select * from (select s1.key as k, s2.value as v from src s1 join src s2 on (s1.key = s2.key)
limit 10)b;
 
 -- ctas
 explain
 create table union_top as
-select key, 0 as value from src where key % 3 == 0 limit 3
+select * from (select key, 0 as value from src where key % 3 == 0 limit 3)a
 union all
-select key, 1 as value from src where key % 3 == 1 limit 3
+select * from (select key, 1 as value from src where key % 3 == 1 limit 3)b
 union all
-select key, 2 as value from src where key % 3 == 2 limit 3;
+select * from (select key, 2 as value from src where key % 3 == 2 limit 3)c;
 
 create table union_top as
-select key, 0 as value from src where key % 3 == 0 limit 3
+select * from (select key, 0 as value from src where key % 3 == 0 limit 3)a
 union all
-select key, 1 as value from src where key % 3 == 1 limit 3
+select * from (select key, 1 as value from src where key % 3 == 1 limit 3)b
 union all
-select key, 2 as value from src where key % 3 == 2 limit 3;
+select * from (select key, 2 as value from src where key % 3 == 2 limit 3)c;
 
 select * from union_top;
 
@@ -46,53 +46,53 @@ truncate table union_top;
 -- insert into
 explain
 insert into table union_top
-select key, 0 as value from src where key % 3 == 0 limit 3
+select * from (select key, 0 as value from src where key % 3 == 0 limit 3)a
 union all
-select key, 1 as value from src where key % 3 == 1 limit 3
+select * from (select key, 1 as value from src where key % 3 == 1 limit 3)b
 union all
-select key, 2 as value from src where key % 3 == 2 limit 3;
+select * from (select key, 2 as value from src where key % 3 == 2 limit 3)c;
 
 insert into table union_top
-select key, 0 as value from src where key % 3 == 0 limit 3
+select * from (select key, 0 as value from src where key % 3 == 0 limit 3)a
 union all
-select key, 1 as value from src where key % 3 == 1 limit 3
+select * from (select key, 1 as value from src where key % 3 == 1 limit 3)b
 union all
-select key, 2 as value from src where key % 3 == 2 limit 3;
+select * from (select key, 2 as value from src where key % 3 == 2 limit 3)c;
 
 select * from union_top;
 
 explain
 insert overwrite table union_top
-select key, 0 as value from src where key % 3 == 0 limit 3
+select * from (select key, 0 as value from src where key % 3 == 0 limit 3)a
 union all
-select key, 1 as value from src where key % 3 == 1 limit 3
+select * from (select key, 1 as value from src where key % 3 == 1 limit 3)b
 union all
-select key, 2 as value from src where key % 3 == 2 limit 3;
+select * from (select key, 2 as value from src where key % 3 == 2 limit 3)c;
 
 insert overwrite table union_top
-select key, 0 as value from src where key % 3 == 0 limit 3
+select * from (select key, 0 as value from src where key % 3 == 0 limit 3)a
 union all
-select key, 1 as value from src where key % 3 == 1 limit 3
+select * from (select key, 1 as value from src where key % 3 == 1 limit 3)b
 union all
-select key, 2 as value from src where key % 3 == 2 limit 3;
+select * from (select key, 2 as value from src where key % 3 == 2 limit 3)c;
 
 select * from union_top;
 
 -- create view
 explain
 create view union_top_view as
-select key, 0 as value from src where key % 3 == 0 limit 3
+select * from (select key, 0 as value from src where key % 3 == 0 limit 3)a
 union all
-select key, 1 as value from src where key % 3 == 1 limit 3
+select * from (select key, 1 as value from src where key % 3 == 1 limit 3)b
 union all
-select key, 2 as value from src where key % 3 == 2 limit 3;
+select * from (select key, 2 as value from src where key % 3 == 2 limit 3)c;
 
 create view union_top_view as
-select key, 0 as value from src where key % 3 == 0 limit 3
+select * from (select key, 0 as value from src where key % 3 == 0 limit 3)a
 union all
-select key, 1 as value from src where key % 3 == 1 limit 3
+select * from (select key, 1 as value from src where key % 3 == 1 limit 3)b
 union all
-select key, 2 as value from src where key % 3 == 2 limit 3;
+select * from (select key, 2 as value from src where key % 3 == 2 limit 3)c;
 
 select * from union_top_view;
 

Modified: hive/branches/spark/ql/src/test/queries/clientpositive/vector_multi_insert.q
URL: http://svn.apache.org/viewvc/hive/branches/spark/ql/src/test/queries/clientpositive/vector_multi_insert.q?rev=1660293&r1=1660292&r2=1660293&view=diff
==============================================================================
--- hive/branches/spark/ql/src/test/queries/clientpositive/vector_multi_insert.q (original)
+++ hive/branches/spark/ql/src/test/queries/clientpositive/vector_multi_insert.q Tue Feb 17
06:49:27 2015
@@ -8,11 +8,11 @@ create table orc1
     select rn
     from
     (
-      select cast(1 as int) as rn from src limit 1
+      select * from (select cast(1 as int) as rn from src limit 1)a
       union all
-      select cast(100 as int) as rn from src limit 1
+      select * from (select cast(100 as int) as rn from src limit 1)b
       union all
-      select cast(10000 as int) as rn from src limit 1
+      select * from (select cast(10000 as int) as rn from src limit 1)c
     ) t;
 
 create table orc_rn1 (rn int);

Modified: hive/branches/spark/ql/src/test/queries/clientpositive/windowing_windowspec.q
URL: http://svn.apache.org/viewvc/hive/branches/spark/ql/src/test/queries/clientpositive/windowing_windowspec.q?rev=1660293&r1=1660292&r2=1660293&view=diff
==============================================================================
--- hive/branches/spark/ql/src/test/queries/clientpositive/windowing_windowspec.q (original)
+++ hive/branches/spark/ql/src/test/queries/clientpositive/windowing_windowspec.q Tue Feb
17 06:49:27 2015
@@ -34,3 +34,7 @@ select f, sum(f) over (partition by ts o
 select s, i, round(avg(d) over (partition by s order by i) / 10.0 , 2) from over10k limit
7;
 
 select s, i, round((avg(d) over  w1 + 10.0) - (avg(d) over w1 - 10.0),2) from over10k window
w1 as (partition by s order by i) limit 7;
+
+set hive.cbo.enable=false;
+-- HIVE-9228 
+select s, i from ( select s, i, round((avg(d) over  w1 + 10.0) - (avg(d) over w1 - 10.0),2)
from over10k window w1 as (partition by s order by i)) X limit 7;



Mime
View raw message