FAQ
Author: brock
Date: Wed Dec 24 14:30:00 2014
New Revision: 1647793

URL: http://svn.apache.org/r1647793
Log:
HIVE-9161 - Fix ordering differences on UDF functions due to Java8 (Sergio Peña via Brock)

Added:
     hive/trunk/ql/src/test/results/clientpositive/char_udf1.q.java1.7.out
     hive/trunk/ql/src/test/results/clientpositive/char_udf1.q.java1.8.out
     hive/trunk/ql/src/test/results/clientpositive/str_to_map.q.java1.7.out
     hive/trunk/ql/src/test/results/clientpositive/str_to_map.q.java1.8.out
Removed:
     hive/trunk/ql/src/test/results/clientpositive/char_udf1.q.out
     hive/trunk/ql/src/test/results/clientpositive/str_to_map.q.out
Modified:
     hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionRegistry.java
     hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFMap.java
     hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFStringToMap.java
     hive/trunk/ql/src/test/queries/clientpositive/char_udf1.q
     hive/trunk/ql/src/test/queries/clientpositive/str_to_map.q
     hive/trunk/ql/src/test/results/clientpositive/udf_map_keys.q.out
     hive/trunk/ql/src/test/results/clientpositive/udf_map_values.q.out
     hive/trunk/ql/src/test/results/clientpositive/udf_std.q.out
     hive/trunk/ql/src/test/results/clientpositive/udf_stddev.q.out

Modified: hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionRegistry.java
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionRegistry.java?rev=1647793&r1=1647792&r2=1647793&view=diff
==============================================================================
--- hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionRegistry.java (original)
+++ hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionRegistry.java Wed Dec 24 14:30:00 2014
@@ -25,6 +25,7 @@ import java.util.ArrayList;
  import java.util.Collections;
  import java.util.EnumMap;
  import java.util.HashSet;
+import java.util.LinkedHashSet;
  import java.util.Iterator;
  import java.util.LinkedHashMap;
  import java.util.List;
@@ -778,7 +779,8 @@ public final class FunctionRegistry {
     * @return Set of synonyms for funcName
     */
    public static Set<String> getFunctionSynonyms(String funcName) {
- Set<String> synonyms = new HashSet<String>();
+ // Must be deterministic order map for consistent q-test output across Java versions - see HIVE-9161
+ Set<String> synonyms = new LinkedHashSet<String>();

      FunctionInfo funcInfo;
      try {

Modified: hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFMap.java
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFMap.java?rev=1647793&r1=1647792&r2=1647793&view=diff
==============================================================================
--- hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFMap.java (original)
+++ hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFMap.java Wed Dec 24 14:30:00 2014
@@ -19,6 +19,7 @@
  package org.apache.hadoop.hive.ql.udf.generic;

  import java.util.HashMap;
+import java.util.LinkedHashMap;

  import org.apache.hadoop.hive.ql.exec.Description;
  import org.apache.hadoop.hive.ql.exec.UDFArgumentException;
@@ -40,7 +41,9 @@ import org.apache.hadoop.hive.serde2.obj
      + "Creates a map with the given key/value pairs ")
  public class GenericUDFMap extends GenericUDF {
    private transient Converter[] converters;
- HashMap<Object, Object> ret = new HashMap<Object, Object>();
+
+ // Must be deterministic order map for consistent q-test output across Java versions - see HIVE-9161
+ LinkedHashMap<Object, Object> ret = new LinkedHashMap<Object, Object>();

    @Override
    public ObjectInspector initialize(ObjectInspector[] arguments) throws UDFArgumentException {

Modified: hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFStringToMap.java
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFStringToMap.java?rev=1647793&r1=1647792&r2=1647793&view=diff
==============================================================================
--- hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFStringToMap.java (original)
+++ hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFStringToMap.java Wed Dec 24 14:30:00 2014
@@ -18,7 +18,7 @@

  package org.apache.hadoop.hive.ql.udf.generic;

-import java.util.HashMap;
+import java.util.LinkedHashMap;

  import org.apache.hadoop.hive.ql.exec.Description;
  import org.apache.hadoop.hive.ql.exec.UDFArgumentException;
@@ -46,7 +46,8 @@ import org.apache.hadoop.hive.serde2.typ
      + " second delimiter sperates key and value. If only one parameter is given, default"
      + " delimiters are used: ',' as delimiter1 and '=' as delimiter2.")
  public class GenericUDFStringToMap extends GenericUDF {
- private final HashMap<Object, Object> ret = new HashMap<Object, Object>();
+ // Must be deterministic order map for consistent q-test output across Java versions - see HIVE-9161
+ private final LinkedHashMap<Object, Object> ret = new LinkedHashMap<Object, Object>();
    private transient Converter soi_text, soi_de1 = null, soi_de2 = null;
    final static String default_de1 = ",";
    final static String default_de2 = ":";

Modified: hive/trunk/ql/src/test/queries/clientpositive/char_udf1.q
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/queries/clientpositive/char_udf1.q?rev=1647793&r1=1647792&r2=1647793&view=diff
==============================================================================
--- hive/trunk/ql/src/test/queries/clientpositive/char_udf1.q (original)
+++ hive/trunk/ql/src/test/queries/clientpositive/char_udf1.q Wed Dec 24 14:30:00 2014
@@ -4,6 +4,8 @@ create table char_udf_1 (c1 string, c2 s
  insert overwrite table char_udf_1
    select key, value, key, value from src where key = '238' limit 1;

+-- JAVA_VERSION_SPECIFIC_OUTPUT
+
  -- UDFs with char support
  select
    concat(c1, c2),

Modified: hive/trunk/ql/src/test/queries/clientpositive/str_to_map.q
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/queries/clientpositive/str_to_map.q?rev=1647793&r1=1647792&r2=1647793&view=diff
==============================================================================
--- hive/trunk/ql/src/test/queries/clientpositive/str_to_map.q (original)
+++ hive/trunk/ql/src/test/queries/clientpositive/str_to_map.q Wed Dec 24 14:30:00 2014
@@ -1,5 +1,7 @@
  set hive.fetch.task.conversion=more;

+-- JAVA_VERSION_SPECIFIC_OUTPUT
+
  desc function str_to_map;
  desc function extended str_to_map;


Added: hive/trunk/ql/src/test/results/clientpositive/char_udf1.q.java1.7.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/char_udf1.q.java1.7.out?rev=1647793&view=auto
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/char_udf1.q.java1.7.out (added)
+++ hive/trunk/ql/src/test/results/clientpositive/char_udf1.q.java1.7.out Wed Dec 24 14:30:00 2014
@@ -0,0 +1,457 @@
+PREHOOK: query: drop table char_udf_1
+PREHOOK: type: DROPTABLE
+POSTHOOK: query: drop table char_udf_1
+POSTHOOK: type: DROPTABLE
+PREHOOK: query: create table char_udf_1 (c1 string, c2 string, c3 char(10), c4 char(20))
+PREHOOK: type: CREATETABLE
+PREHOOK: Output: database:default
+PREHOOK: Output: default@char_udf_1
+POSTHOOK: query: create table char_udf_1 (c1 string, c2 string, c3 char(10), c4 char(20))
+POSTHOOK: type: CREATETABLE
+POSTHOOK: Output: database:default
+POSTHOOK: Output: default@char_udf_1
+PREHOOK: query: insert overwrite table char_udf_1
+ select key, value, key, value from src where key = '238' limit 1
+PREHOOK: type: QUERY
+PREHOOK: Input: default@src
+PREHOOK: Output: default@char_udf_1
+POSTHOOK: query: insert overwrite table char_udf_1
+ select key, value, key, value from src where key = '238' limit 1
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@src
+POSTHOOK: Output: default@char_udf_1
+POSTHOOK: Lineage: char_udf_1.c1 SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
+POSTHOOK: Lineage: char_udf_1.c2 SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
+POSTHOOK: Lineage: char_udf_1.c3 EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ]
+POSTHOOK: Lineage: char_udf_1.c4 EXPRESSION [(src)src.FieldSchema(name:value, type:string, comment:default), ]
+PREHOOK: query: -- JAVA_VERSION_SPECIFIC_OUTPUT
+
+-- UDFs with char support
+select
+ concat(c1, c2),
+ concat(c3, c4),
+ concat(c1, c2) = concat(c3, c4)
+from char_udf_1 limit 1
+PREHOOK: type: QUERY
+PREHOOK: Input: default@char_udf_1
+#### A masked pattern was here ####
+POSTHOOK: query: -- JAVA_VERSION_SPECIFIC_OUTPUT
+
+-- UDFs with char support
+select
+ concat(c1, c2),
+ concat(c3, c4),
+ concat(c1, c2) = concat(c3, c4)
+from char_udf_1 limit 1
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@char_udf_1
+#### A masked pattern was here ####
+238val_238 238val_238 true
+PREHOOK: query: select
+ upper(c2),
+ upper(c4),
+ upper(c2) = upper(c4)
+from char_udf_1 limit 1
+PREHOOK: type: QUERY
+PREHOOK: Input: default@char_udf_1
+#### A masked pattern was here ####
+POSTHOOK: query: select
+ upper(c2),
+ upper(c4),
+ upper(c2) = upper(c4)
+from char_udf_1 limit 1
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@char_udf_1
+#### A masked pattern was here ####
+VAL_238 VAL_238 true
+PREHOOK: query: select
+ lower(c2),
+ lower(c4),
+ lower(c2) = lower(c4)
+from char_udf_1 limit 1
+PREHOOK: type: QUERY
+PREHOOK: Input: default@char_udf_1
+#### A masked pattern was here ####
+POSTHOOK: query: select
+ lower(c2),
+ lower(c4),
+ lower(c2) = lower(c4)
+from char_udf_1 limit 1
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@char_udf_1
+#### A masked pattern was here ####
+val_238 val_238 true
+PREHOOK: query: -- Scalar UDFs
+select
+ ascii(c2),
+ ascii(c4),
+ ascii(c2) = ascii(c4)
+from char_udf_1 limit 1
+PREHOOK: type: QUERY
+PREHOOK: Input: default@char_udf_1
+#### A masked pattern was here ####
+POSTHOOK: query: -- Scalar UDFs
+select
+ ascii(c2),
+ ascii(c4),
+ ascii(c2) = ascii(c4)
+from char_udf_1 limit 1
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@char_udf_1
+#### A masked pattern was here ####
+118 118 true
+PREHOOK: query: select
+ concat_ws('|', c1, c2),
+ concat_ws('|', c3, c4),
+ concat_ws('|', c1, c2) = concat_ws('|', c3, c4)
+from char_udf_1 limit 1
+PREHOOK: type: QUERY
+PREHOOK: Input: default@char_udf_1
+#### A masked pattern was here ####
+POSTHOOK: query: select
+ concat_ws('|', c1, c2),
+ concat_ws('|', c3, c4),
+ concat_ws('|', c1, c2) = concat_ws('|', c3, c4)
+from char_udf_1 limit 1
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@char_udf_1
+#### A masked pattern was here ####
+238|val_238 238|val_238 true
+PREHOOK: query: select
+ decode(encode(c2, 'US-ASCII'), 'US-ASCII'),
+ decode(encode(c4, 'US-ASCII'), 'US-ASCII'),
+ decode(encode(c2, 'US-ASCII'), 'US-ASCII') = decode(encode(c4, 'US-ASCII'), 'US-ASCII')
+from char_udf_1 limit 1
+PREHOOK: type: QUERY
+PREHOOK: Input: default@char_udf_1
+#### A masked pattern was here ####
+POSTHOOK: query: select
+ decode(encode(c2, 'US-ASCII'), 'US-ASCII'),
+ decode(encode(c4, 'US-ASCII'), 'US-ASCII'),
+ decode(encode(c2, 'US-ASCII'), 'US-ASCII') = decode(encode(c4, 'US-ASCII'), 'US-ASCII')
+from char_udf_1 limit 1
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@char_udf_1
+#### A masked pattern was here ####
+val_238 val_238 true
+PREHOOK: query: select
+ instr(c2, '_'),
+ instr(c4, '_'),
+ instr(c2, '_') = instr(c4, '_')
+from char_udf_1 limit 1
+PREHOOK: type: QUERY
+PREHOOK: Input: default@char_udf_1
+#### A masked pattern was here ####
+POSTHOOK: query: select
+ instr(c2, '_'),
+ instr(c4, '_'),
+ instr(c2, '_') = instr(c4, '_')
+from char_udf_1 limit 1
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@char_udf_1
+#### A masked pattern was here ####
+4 4 true
+PREHOOK: query: select
+ length(c2),
+ length(c4),
+ length(c2) = length(c4)
+from char_udf_1 limit 1
+PREHOOK: type: QUERY
+PREHOOK: Input: default@char_udf_1
+#### A masked pattern was here ####
+POSTHOOK: query: select
+ length(c2),
+ length(c4),
+ length(c2) = length(c4)
+from char_udf_1 limit 1
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@char_udf_1
+#### A masked pattern was here ####
+7 7 true
+PREHOOK: query: select
+ locate('a', 'abcdabcd', 3),
+ locate(cast('a' as char(1)), cast('abcdabcd' as char(10)), 3),
+ locate('a', 'abcdabcd', 3) = locate(cast('a' as char(1)), cast('abcdabcd' as char(10)), 3)
+from char_udf_1 limit 1
+PREHOOK: type: QUERY
+PREHOOK: Input: default@char_udf_1
+#### A masked pattern was here ####
+POSTHOOK: query: select
+ locate('a', 'abcdabcd', 3),
+ locate(cast('a' as char(1)), cast('abcdabcd' as char(10)), 3),
+ locate('a', 'abcdabcd', 3) = locate(cast('a' as char(1)), cast('abcdabcd' as char(10)), 3)
+from char_udf_1 limit 1
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@char_udf_1
+#### A masked pattern was here ####
+5 5 true
+PREHOOK: query: select
+ lpad(c2, 15, ' '),
+ lpad(c4, 15, ' '),
+ lpad(c2, 15, ' ') = lpad(c4, 15, ' ')
+from char_udf_1 limit 1
+PREHOOK: type: QUERY
+PREHOOK: Input: default@char_udf_1
+#### A masked pattern was here ####
+POSTHOOK: query: select
+ lpad(c2, 15, ' '),
+ lpad(c4, 15, ' '),
+ lpad(c2, 15, ' ') = lpad(c4, 15, ' ')
+from char_udf_1 limit 1
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@char_udf_1
+#### A masked pattern was here ####
+ val_238 val_238 true
+PREHOOK: query: select
+ ltrim(c2),
+ ltrim(c4),
+ ltrim(c2) = ltrim(c4)
+from char_udf_1 limit 1
+PREHOOK: type: QUERY
+PREHOOK: Input: default@char_udf_1
+#### A masked pattern was here ####
+POSTHOOK: query: select
+ ltrim(c2),
+ ltrim(c4),
+ ltrim(c2) = ltrim(c4)
+from char_udf_1 limit 1
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@char_udf_1
+#### A masked pattern was here ####
+val_238 val_238 true
+PREHOOK: query: select
+ regexp(c2, 'val'),
+ regexp(c4, 'val'),
+ regexp(c2, 'val') = regexp(c4, 'val')
+from char_udf_1 limit 1
+PREHOOK: type: QUERY
+PREHOOK: Input: default@char_udf_1
+#### A masked pattern was here ####
+POSTHOOK: query: select
+ regexp(c2, 'val'),
+ regexp(c4, 'val'),
+ regexp(c2, 'val') = regexp(c4, 'val')
+from char_udf_1 limit 1
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@char_udf_1
+#### A masked pattern was here ####
+true true true
+PREHOOK: query: select
+ regexp_extract(c2, 'val_([0-9]+)', 1),
+ regexp_extract(c4, 'val_([0-9]+)', 1),
+ regexp_extract(c2, 'val_([0-9]+)', 1) = regexp_extract(c4, 'val_([0-9]+)', 1)
+from char_udf_1 limit 1
+PREHOOK: type: QUERY
+PREHOOK: Input: default@char_udf_1
+#### A masked pattern was here ####
+POSTHOOK: query: select
+ regexp_extract(c2, 'val_([0-9]+)', 1),
+ regexp_extract(c4, 'val_([0-9]+)', 1),
+ regexp_extract(c2, 'val_([0-9]+)', 1) = regexp_extract(c4, 'val_([0-9]+)', 1)
+from char_udf_1 limit 1
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@char_udf_1
+#### A masked pattern was here ####
+238 238 true
+PREHOOK: query: select
+ regexp_replace(c2, 'val', 'replaced'),
+ regexp_replace(c4, 'val', 'replaced'),
+ regexp_replace(c2, 'val', 'replaced') = regexp_replace(c4, 'val', 'replaced')
+from char_udf_1 limit 1
+PREHOOK: type: QUERY
+PREHOOK: Input: default@char_udf_1
+#### A masked pattern was here ####
+POSTHOOK: query: select
+ regexp_replace(c2, 'val', 'replaced'),
+ regexp_replace(c4, 'val', 'replaced'),
+ regexp_replace(c2, 'val', 'replaced') = regexp_replace(c4, 'val', 'replaced')
+from char_udf_1 limit 1
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@char_udf_1
+#### A masked pattern was here ####
+replaced_238 replaced_238 true
+PREHOOK: query: select
+ reverse(c2),
+ reverse(c4),
+ reverse(c2) = reverse(c4)
+from char_udf_1 limit 1
+PREHOOK: type: QUERY
+PREHOOK: Input: default@char_udf_1
+#### A masked pattern was here ####
+POSTHOOK: query: select
+ reverse(c2),
+ reverse(c4),
+ reverse(c2) = reverse(c4)
+from char_udf_1 limit 1
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@char_udf_1
+#### A masked pattern was here ####
+832_lav 832_lav true
+PREHOOK: query: select
+ rpad(c2, 15, ' '),
+ rpad(c4, 15, ' '),
+ rpad(c2, 15, ' ') = rpad(c4, 15, ' ')
+from char_udf_1 limit 1
+PREHOOK: type: QUERY
+PREHOOK: Input: default@char_udf_1
+#### A masked pattern was here ####
+POSTHOOK: query: select
+ rpad(c2, 15, ' '),
+ rpad(c4, 15, ' '),
+ rpad(c2, 15, ' ') = rpad(c4, 15, ' ')
+from char_udf_1 limit 1
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@char_udf_1
+#### A masked pattern was here ####
+val_238 val_238 true
+PREHOOK: query: select
+ rtrim(c2),
+ rtrim(c4),
+ rtrim(c2) = rtrim(c4)
+from char_udf_1 limit 1
+PREHOOK: type: QUERY
+PREHOOK: Input: default@char_udf_1
+#### A masked pattern was here ####
+POSTHOOK: query: select
+ rtrim(c2),
+ rtrim(c4),
+ rtrim(c2) = rtrim(c4)
+from char_udf_1 limit 1
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@char_udf_1
+#### A masked pattern was here ####
+val_238 val_238 true
+PREHOOK: query: select
+ sentences('See spot run. See jane run.'),
+ sentences(cast('See spot run. See jane run.' as char(50)))
+from char_udf_1 limit 1
+PREHOOK: type: QUERY
+PREHOOK: Input: default@char_udf_1
+#### A masked pattern was here ####
+POSTHOOK: query: select
+ sentences('See spot run. See jane run.'),
+ sentences(cast('See spot run. See jane run.' as char(50)))
+from char_udf_1 limit 1
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@char_udf_1
+#### A masked pattern was here ####
+[["See","spot","run"],["See","jane","run"]] [["See","spot","run"],["See","jane","run"]]
+PREHOOK: query: select
+ split(c2, '_'),
+ split(c4, '_')
+from char_udf_1 limit 1
+PREHOOK: type: QUERY
+PREHOOK: Input: default@char_udf_1
+#### A masked pattern was here ####
+POSTHOOK: query: select
+ split(c2, '_'),
+ split(c4, '_')
+from char_udf_1 limit 1
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@char_udf_1
+#### A masked pattern was here ####
+["val","238"] ["val","238"]
+PREHOOK: query: select
+ str_to_map('a:1,b:2,c:3',',',':'),
+ str_to_map(cast('a:1,b:2,c:3' as char(20)),',',':')
+from char_udf_1 limit 1
+PREHOOK: type: QUERY
+PREHOOK: Input: default@char_udf_1
+#### A masked pattern was here ####
+POSTHOOK: query: select
+ str_to_map('a:1,b:2,c:3',',',':'),
+ str_to_map(cast('a:1,b:2,c:3' as char(20)),',',':')
+from char_udf_1 limit 1
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@char_udf_1
+#### A masked pattern was here ####
+{"b":"2","a":"1","c":"3"} {"b":"2","a":"1","c":"3"}
+PREHOOK: query: select
+ substr(c2, 1, 3),
+ substr(c4, 1, 3),
+ substr(c2, 1, 3) = substr(c4, 1, 3)
+from char_udf_1 limit 1
+PREHOOK: type: QUERY
+PREHOOK: Input: default@char_udf_1
+#### A masked pattern was here ####
+POSTHOOK: query: select
+ substr(c2, 1, 3),
+ substr(c4, 1, 3),
+ substr(c2, 1, 3) = substr(c4, 1, 3)
+from char_udf_1 limit 1
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@char_udf_1
+#### A masked pattern was here ####
+val val true
+PREHOOK: query: select
+ trim(c2),
+ trim(c4),
+ trim(c2) = trim(c4)
+from char_udf_1 limit 1
+PREHOOK: type: QUERY
+PREHOOK: Input: default@char_udf_1
+#### A masked pattern was here ####
+POSTHOOK: query: select
+ trim(c2),
+ trim(c4),
+ trim(c2) = trim(c4)
+from char_udf_1 limit 1
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@char_udf_1
+#### A masked pattern was here ####
+val_238 val_238 true
+PREHOOK: query: -- Aggregate Functions
+select
+ compute_stats(c2, 16),
+ compute_stats(c4, 16)
+from char_udf_1
+PREHOOK: type: QUERY
+PREHOOK: Input: default@char_udf_1
+#### A masked pattern was here ####
+POSTHOOK: query: -- Aggregate Functions
+select
+ compute_stats(c2, 16),
+ compute_stats(c4, 16)
+from char_udf_1
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@char_udf_1
+#### A masked pattern was here ####
+{"columntype":"String","maxlength":7,"avglength":7.0,"countnulls":0,"numdistinctvalues":1} {"columntype":"String","maxlength":7,"avglength":7.0,"countnulls":0,"numdistinctvalues":1}
+PREHOOK: query: select
+ min(c2),
+ min(c4)
+from char_udf_1
+PREHOOK: type: QUERY
+PREHOOK: Input: default@char_udf_1
+#### A masked pattern was here ####
+POSTHOOK: query: select
+ min(c2),
+ min(c4)
+from char_udf_1
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@char_udf_1
+#### A masked pattern was here ####
+val_238 val_238
+PREHOOK: query: select
+ max(c2),
+ max(c4)
+from char_udf_1
+PREHOOK: type: QUERY
+PREHOOK: Input: default@char_udf_1
+#### A masked pattern was here ####
+POSTHOOK: query: select
+ max(c2),
+ max(c4)
+from char_udf_1
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@char_udf_1
+#### A masked pattern was here ####
+val_238 val_238
+PREHOOK: query: drop table char_udf_1
+PREHOOK: type: DROPTABLE
+PREHOOK: Input: default@char_udf_1
+PREHOOK: Output: default@char_udf_1
+POSTHOOK: query: drop table char_udf_1
+POSTHOOK: type: DROPTABLE
+POSTHOOK: Input: default@char_udf_1
+POSTHOOK: Output: default@char_udf_1

Added: hive/trunk/ql/src/test/results/clientpositive/char_udf1.q.java1.8.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/char_udf1.q.java1.8.out?rev=1647793&view=auto
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/char_udf1.q.java1.8.out (added)
+++ hive/trunk/ql/src/test/results/clientpositive/char_udf1.q.java1.8.out Wed Dec 24 14:30:00 2014
@@ -0,0 +1,457 @@
+PREHOOK: query: drop table char_udf_1
+PREHOOK: type: DROPTABLE
+POSTHOOK: query: drop table char_udf_1
+POSTHOOK: type: DROPTABLE
+PREHOOK: query: create table char_udf_1 (c1 string, c2 string, c3 char(10), c4 char(20))
+PREHOOK: type: CREATETABLE
+PREHOOK: Output: database:default
+PREHOOK: Output: default@char_udf_1
+POSTHOOK: query: create table char_udf_1 (c1 string, c2 string, c3 char(10), c4 char(20))
+POSTHOOK: type: CREATETABLE
+POSTHOOK: Output: database:default
+POSTHOOK: Output: default@char_udf_1
+PREHOOK: query: insert overwrite table char_udf_1
+ select key, value, key, value from src where key = '238' limit 1
+PREHOOK: type: QUERY
+PREHOOK: Input: default@src
+PREHOOK: Output: default@char_udf_1
+POSTHOOK: query: insert overwrite table char_udf_1
+ select key, value, key, value from src where key = '238' limit 1
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@src
+POSTHOOK: Output: default@char_udf_1
+POSTHOOK: Lineage: char_udf_1.c1 SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
+POSTHOOK: Lineage: char_udf_1.c2 SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
+POSTHOOK: Lineage: char_udf_1.c3 EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ]
+POSTHOOK: Lineage: char_udf_1.c4 EXPRESSION [(src)src.FieldSchema(name:value, type:string, comment:default), ]
+PREHOOK: query: -- JAVA_VERSION_SPECIFIC_OUTPUT
+
+-- UDFs with char support
+select
+ concat(c1, c2),
+ concat(c3, c4),
+ concat(c1, c2) = concat(c3, c4)
+from char_udf_1 limit 1
+PREHOOK: type: QUERY
+PREHOOK: Input: default@char_udf_1
+#### A masked pattern was here ####
+POSTHOOK: query: -- JAVA_VERSION_SPECIFIC_OUTPUT
+
+-- UDFs with char support
+select
+ concat(c1, c2),
+ concat(c3, c4),
+ concat(c1, c2) = concat(c3, c4)
+from char_udf_1 limit 1
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@char_udf_1
+#### A masked pattern was here ####
+238val_238 238val_238 true
+PREHOOK: query: select
+ upper(c2),
+ upper(c4),
+ upper(c2) = upper(c4)
+from char_udf_1 limit 1
+PREHOOK: type: QUERY
+PREHOOK: Input: default@char_udf_1
+#### A masked pattern was here ####
+POSTHOOK: query: select
+ upper(c2),
+ upper(c4),
+ upper(c2) = upper(c4)
+from char_udf_1 limit 1
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@char_udf_1
+#### A masked pattern was here ####
+VAL_238 VAL_238 true
+PREHOOK: query: select
+ lower(c2),
+ lower(c4),
+ lower(c2) = lower(c4)
+from char_udf_1 limit 1
+PREHOOK: type: QUERY
+PREHOOK: Input: default@char_udf_1
+#### A masked pattern was here ####
+POSTHOOK: query: select
+ lower(c2),
+ lower(c4),
+ lower(c2) = lower(c4)
+from char_udf_1 limit 1
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@char_udf_1
+#### A masked pattern was here ####
+val_238 val_238 true
+PREHOOK: query: -- Scalar UDFs
+select
+ ascii(c2),
+ ascii(c4),
+ ascii(c2) = ascii(c4)
+from char_udf_1 limit 1
+PREHOOK: type: QUERY
+PREHOOK: Input: default@char_udf_1
+#### A masked pattern was here ####
+POSTHOOK: query: -- Scalar UDFs
+select
+ ascii(c2),
+ ascii(c4),
+ ascii(c2) = ascii(c4)
+from char_udf_1 limit 1
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@char_udf_1
+#### A masked pattern was here ####
+118 118 true
+PREHOOK: query: select
+ concat_ws('|', c1, c2),
+ concat_ws('|', c3, c4),
+ concat_ws('|', c1, c2) = concat_ws('|', c3, c4)
+from char_udf_1 limit 1
+PREHOOK: type: QUERY
+PREHOOK: Input: default@char_udf_1
+#### A masked pattern was here ####
+POSTHOOK: query: select
+ concat_ws('|', c1, c2),
+ concat_ws('|', c3, c4),
+ concat_ws('|', c1, c2) = concat_ws('|', c3, c4)
+from char_udf_1 limit 1
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@char_udf_1
+#### A masked pattern was here ####
+238|val_238 238|val_238 true
+PREHOOK: query: select
+ decode(encode(c2, 'US-ASCII'), 'US-ASCII'),
+ decode(encode(c4, 'US-ASCII'), 'US-ASCII'),
+ decode(encode(c2, 'US-ASCII'), 'US-ASCII') = decode(encode(c4, 'US-ASCII'), 'US-ASCII')
+from char_udf_1 limit 1
+PREHOOK: type: QUERY
+PREHOOK: Input: default@char_udf_1
+#### A masked pattern was here ####
+POSTHOOK: query: select
+ decode(encode(c2, 'US-ASCII'), 'US-ASCII'),
+ decode(encode(c4, 'US-ASCII'), 'US-ASCII'),
+ decode(encode(c2, 'US-ASCII'), 'US-ASCII') = decode(encode(c4, 'US-ASCII'), 'US-ASCII')
+from char_udf_1 limit 1
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@char_udf_1
+#### A masked pattern was here ####
+val_238 val_238 true
+PREHOOK: query: select
+ instr(c2, '_'),
+ instr(c4, '_'),
+ instr(c2, '_') = instr(c4, '_')
+from char_udf_1 limit 1
+PREHOOK: type: QUERY
+PREHOOK: Input: default@char_udf_1
+#### A masked pattern was here ####
+POSTHOOK: query: select
+ instr(c2, '_'),
+ instr(c4, '_'),
+ instr(c2, '_') = instr(c4, '_')
+from char_udf_1 limit 1
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@char_udf_1
+#### A masked pattern was here ####
+4 4 true
+PREHOOK: query: select
+ length(c2),
+ length(c4),
+ length(c2) = length(c4)
+from char_udf_1 limit 1
+PREHOOK: type: QUERY
+PREHOOK: Input: default@char_udf_1
+#### A masked pattern was here ####
+POSTHOOK: query: select
+ length(c2),
+ length(c4),
+ length(c2) = length(c4)
+from char_udf_1 limit 1
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@char_udf_1
+#### A masked pattern was here ####
+7 7 true
+PREHOOK: query: select
+ locate('a', 'abcdabcd', 3),
+ locate(cast('a' as char(1)), cast('abcdabcd' as char(10)), 3),
+ locate('a', 'abcdabcd', 3) = locate(cast('a' as char(1)), cast('abcdabcd' as char(10)), 3)
+from char_udf_1 limit 1
+PREHOOK: type: QUERY
+PREHOOK: Input: default@char_udf_1
+#### A masked pattern was here ####
+POSTHOOK: query: select
+ locate('a', 'abcdabcd', 3),
+ locate(cast('a' as char(1)), cast('abcdabcd' as char(10)), 3),
+ locate('a', 'abcdabcd', 3) = locate(cast('a' as char(1)), cast('abcdabcd' as char(10)), 3)
+from char_udf_1 limit 1
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@char_udf_1
+#### A masked pattern was here ####
+5 5 true
+PREHOOK: query: select
+ lpad(c2, 15, ' '),
+ lpad(c4, 15, ' '),
+ lpad(c2, 15, ' ') = lpad(c4, 15, ' ')
+from char_udf_1 limit 1
+PREHOOK: type: QUERY
+PREHOOK: Input: default@char_udf_1
+#### A masked pattern was here ####
+POSTHOOK: query: select
+ lpad(c2, 15, ' '),
+ lpad(c4, 15, ' '),
+ lpad(c2, 15, ' ') = lpad(c4, 15, ' ')
+from char_udf_1 limit 1
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@char_udf_1
+#### A masked pattern was here ####
+ val_238 val_238 true
+PREHOOK: query: select
+ ltrim(c2),
+ ltrim(c4),
+ ltrim(c2) = ltrim(c4)
+from char_udf_1 limit 1
+PREHOOK: type: QUERY
+PREHOOK: Input: default@char_udf_1
+#### A masked pattern was here ####
+POSTHOOK: query: select
+ ltrim(c2),
+ ltrim(c4),
+ ltrim(c2) = ltrim(c4)
+from char_udf_1 limit 1
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@char_udf_1
+#### A masked pattern was here ####
+val_238 val_238 true
+PREHOOK: query: select
+ regexp(c2, 'val'),
+ regexp(c4, 'val'),
+ regexp(c2, 'val') = regexp(c4, 'val')
+from char_udf_1 limit 1
+PREHOOK: type: QUERY
+PREHOOK: Input: default@char_udf_1
+#### A masked pattern was here ####
+POSTHOOK: query: select
+ regexp(c2, 'val'),
+ regexp(c4, 'val'),
+ regexp(c2, 'val') = regexp(c4, 'val')
+from char_udf_1 limit 1
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@char_udf_1
+#### A masked pattern was here ####
+true true true
+PREHOOK: query: select
+ regexp_extract(c2, 'val_([0-9]+)', 1),
+ regexp_extract(c4, 'val_([0-9]+)', 1),
+ regexp_extract(c2, 'val_([0-9]+)', 1) = regexp_extract(c4, 'val_([0-9]+)', 1)
+from char_udf_1 limit 1
+PREHOOK: type: QUERY
+PREHOOK: Input: default@char_udf_1
+#### A masked pattern was here ####
+POSTHOOK: query: select
+ regexp_extract(c2, 'val_([0-9]+)', 1),
+ regexp_extract(c4, 'val_([0-9]+)', 1),
+ regexp_extract(c2, 'val_([0-9]+)', 1) = regexp_extract(c4, 'val_([0-9]+)', 1)
+from char_udf_1 limit 1
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@char_udf_1
+#### A masked pattern was here ####
+238 238 true
+PREHOOK: query: select
+ regexp_replace(c2, 'val', 'replaced'),
+ regexp_replace(c4, 'val', 'replaced'),
+ regexp_replace(c2, 'val', 'replaced') = regexp_replace(c4, 'val', 'replaced')
+from char_udf_1 limit 1
+PREHOOK: type: QUERY
+PREHOOK: Input: default@char_udf_1
+#### A masked pattern was here ####
+POSTHOOK: query: select
+ regexp_replace(c2, 'val', 'replaced'),
+ regexp_replace(c4, 'val', 'replaced'),
+ regexp_replace(c2, 'val', 'replaced') = regexp_replace(c4, 'val', 'replaced')
+from char_udf_1 limit 1
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@char_udf_1
+#### A masked pattern was here ####
+replaced_238 replaced_238 true
+PREHOOK: query: select
+ reverse(c2),
+ reverse(c4),
+ reverse(c2) = reverse(c4)
+from char_udf_1 limit 1
+PREHOOK: type: QUERY
+PREHOOK: Input: default@char_udf_1
+#### A masked pattern was here ####
+POSTHOOK: query: select
+ reverse(c2),
+ reverse(c4),
+ reverse(c2) = reverse(c4)
+from char_udf_1 limit 1
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@char_udf_1
+#### A masked pattern was here ####
+832_lav 832_lav true
+PREHOOK: query: select
+ rpad(c2, 15, ' '),
+ rpad(c4, 15, ' '),
+ rpad(c2, 15, ' ') = rpad(c4, 15, ' ')
+from char_udf_1 limit 1
+PREHOOK: type: QUERY
+PREHOOK: Input: default@char_udf_1
+#### A masked pattern was here ####
+POSTHOOK: query: select
+ rpad(c2, 15, ' '),
+ rpad(c4, 15, ' '),
+ rpad(c2, 15, ' ') = rpad(c4, 15, ' ')
+from char_udf_1 limit 1
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@char_udf_1
+#### A masked pattern was here ####
+val_238 val_238 true
+PREHOOK: query: select
+ rtrim(c2),
+ rtrim(c4),
+ rtrim(c2) = rtrim(c4)
+from char_udf_1 limit 1
+PREHOOK: type: QUERY
+PREHOOK: Input: default@char_udf_1
+#### A masked pattern was here ####
+POSTHOOK: query: select
+ rtrim(c2),
+ rtrim(c4),
+ rtrim(c2) = rtrim(c4)
+from char_udf_1 limit 1
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@char_udf_1
+#### A masked pattern was here ####
+val_238 val_238 true
+PREHOOK: query: select
+ sentences('See spot run. See jane run.'),
+ sentences(cast('See spot run. See jane run.' as char(50)))
+from char_udf_1 limit 1
+PREHOOK: type: QUERY
+PREHOOK: Input: default@char_udf_1
+#### A masked pattern was here ####
+POSTHOOK: query: select
+ sentences('See spot run. See jane run.'),
+ sentences(cast('See spot run. See jane run.' as char(50)))
+from char_udf_1 limit 1
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@char_udf_1
+#### A masked pattern was here ####
+[["See","spot","run"],["See","jane","run"]] [["See","spot","run"],["See","jane","run"]]
+PREHOOK: query: select
+ split(c2, '_'),
+ split(c4, '_')
+from char_udf_1 limit 1
+PREHOOK: type: QUERY
+PREHOOK: Input: default@char_udf_1
+#### A masked pattern was here ####
+POSTHOOK: query: select
+ split(c2, '_'),
+ split(c4, '_')
+from char_udf_1 limit 1
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@char_udf_1
+#### A masked pattern was here ####
+["val","238"] ["val","238"]
+PREHOOK: query: select
+ str_to_map('a:1,b:2,c:3',',',':'),
+ str_to_map(cast('a:1,b:2,c:3' as char(20)),',',':')
+from char_udf_1 limit 1
+PREHOOK: type: QUERY
+PREHOOK: Input: default@char_udf_1
+#### A masked pattern was here ####
+POSTHOOK: query: select
+ str_to_map('a:1,b:2,c:3',',',':'),
+ str_to_map(cast('a:1,b:2,c:3' as char(20)),',',':')
+from char_udf_1 limit 1
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@char_udf_1
+#### A masked pattern was here ####
+{"a":"1","b":"2","c":"3"} {"a":"1","b":"2","c":"3"}
+PREHOOK: query: select
+ substr(c2, 1, 3),
+ substr(c4, 1, 3),
+ substr(c2, 1, 3) = substr(c4, 1, 3)
+from char_udf_1 limit 1
+PREHOOK: type: QUERY
+PREHOOK: Input: default@char_udf_1
+#### A masked pattern was here ####
+POSTHOOK: query: select
+ substr(c2, 1, 3),
+ substr(c4, 1, 3),
+ substr(c2, 1, 3) = substr(c4, 1, 3)
+from char_udf_1 limit 1
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@char_udf_1
+#### A masked pattern was here ####
+val val true
+PREHOOK: query: select
+ trim(c2),
+ trim(c4),
+ trim(c2) = trim(c4)
+from char_udf_1 limit 1
+PREHOOK: type: QUERY
+PREHOOK: Input: default@char_udf_1
+#### A masked pattern was here ####
+POSTHOOK: query: select
+ trim(c2),
+ trim(c4),
+ trim(c2) = trim(c4)
+from char_udf_1 limit 1
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@char_udf_1
+#### A masked pattern was here ####
+val_238 val_238 true
+PREHOOK: query: -- Aggregate Functions
+select
+ compute_stats(c2, 16),
+ compute_stats(c4, 16)
+from char_udf_1
+PREHOOK: type: QUERY
+PREHOOK: Input: default@char_udf_1
+#### A masked pattern was here ####
+POSTHOOK: query: -- Aggregate Functions
+select
+ compute_stats(c2, 16),
+ compute_stats(c4, 16)
+from char_udf_1
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@char_udf_1
+#### A masked pattern was here ####
+{"columntype":"String","maxlength":7,"avglength":7.0,"countnulls":0,"numdistinctvalues":1} {"columntype":"String","maxlength":7,"avglength":7.0,"countnulls":0,"numdistinctvalues":1}
+PREHOOK: query: select
+ min(c2),
+ min(c4)
+from char_udf_1
+PREHOOK: type: QUERY
+PREHOOK: Input: default@char_udf_1
+#### A masked pattern was here ####
+POSTHOOK: query: select
+ min(c2),
+ min(c4)
+from char_udf_1
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@char_udf_1
+#### A masked pattern was here ####
+val_238 val_238
+PREHOOK: query: select
+ max(c2),
+ max(c4)
+from char_udf_1
+PREHOOK: type: QUERY
+PREHOOK: Input: default@char_udf_1
+#### A masked pattern was here ####
+POSTHOOK: query: select
+ max(c2),
+ max(c4)
+from char_udf_1
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@char_udf_1
+#### A masked pattern was here ####
+val_238 val_238
+PREHOOK: query: drop table char_udf_1
+PREHOOK: type: DROPTABLE
+PREHOOK: Input: default@char_udf_1
+PREHOOK: Output: default@char_udf_1
+POSTHOOK: query: drop table char_udf_1
+POSTHOOK: type: DROPTABLE
+POSTHOOK: Input: default@char_udf_1
+POSTHOOK: Output: default@char_udf_1

Added: hive/trunk/ql/src/test/results/clientpositive/str_to_map.q.java1.7.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/str_to_map.q.java1.7.out?rev=1647793&view=auto
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/str_to_map.q.java1.7.out (added)
+++ hive/trunk/ql/src/test/results/clientpositive/str_to_map.q.java1.7.out Wed Dec 24 14:30:00 2014
@@ -0,0 +1,219 @@
+PREHOOK: query: -- JAVA_VERSION_SPECIFIC_OUTPUT
+
+desc function str_to_map
+PREHOOK: type: DESCFUNCTION
+POSTHOOK: query: -- JAVA_VERSION_SPECIFIC_OUTPUT
+
+desc function str_to_map
+POSTHOOK: type: DESCFUNCTION
+str_to_map(text, delimiter1, delimiter2) - Creates a map by parsing text
+PREHOOK: query: desc function extended str_to_map
+PREHOOK: type: DESCFUNCTION
+POSTHOOK: query: desc function extended str_to_map
+POSTHOOK: type: DESCFUNCTION
+str_to_map(text, delimiter1, delimiter2) - Creates a map by parsing text
+Split text into key-value pairs using two delimiters. The first delimiter seperates pairs, and the second delimiter sperates key and value. If only one parameter is given, default delimiters are used: ',' as delimiter1 and '=' as delimiter2.
+PREHOOK: query: explain select str_to_map('a=1,b=2,c=3',',','=')['a'] from src limit 3
+PREHOOK: type: QUERY
+POSTHOOK: query: explain select str_to_map('a=1,b=2,c=3',',','=')['a'] from src limit 3
+POSTHOOK: type: QUERY
+STAGE DEPENDENCIES:
+ Stage-0 is a root stage
+
+STAGE PLANS:
+ Stage: Stage-0
+ Fetch Operator
+ limit: 3
+ Processor Tree:
+ TableScan
+ alias: src
+ Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: COMPLETE
+ Select Operator
+ expressions: str_to_map('a=1,b=2,c=3',',','=')['a'] (type: string)
+ outputColumnNames: _col0
+ Statistics: Num rows: 500 Data size: 92000 Basic stats: COMPLETE Column stats: COMPLETE
+ Limit
+ Number of rows: 3
+ Statistics: Num rows: 3 Data size: 552 Basic stats: COMPLETE Column stats: COMPLETE
+ ListSink
+
+PREHOOK: query: select str_to_map('a=1,b=2,c=3',',','=')['a'] from src limit 3
+PREHOOK: type: QUERY
+PREHOOK: Input: default@src
+#### A masked pattern was here ####
+POSTHOOK: query: select str_to_map('a=1,b=2,c=3',',','=')['a'] from src limit 3
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@src
+#### A masked pattern was here ####
+1
+1
+1
+PREHOOK: query: explain select str_to_map('a:1,b:2,c:3') from src limit 3
+PREHOOK: type: QUERY
+POSTHOOK: query: explain select str_to_map('a:1,b:2,c:3') from src limit 3
+POSTHOOK: type: QUERY
+STAGE DEPENDENCIES:
+ Stage-0 is a root stage
+
+STAGE PLANS:
+ Stage: Stage-0
+ Fetch Operator
+ limit: 3
+ Processor Tree:
+ TableScan
+ alias: src
+ Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: COMPLETE
+ Select Operator
+ expressions: str_to_map('a:1,b:2,c:3') (type: map<string,string>)
+ outputColumnNames: _col0
+ Statistics: Num rows: 500 Data size: 460000 Basic stats: COMPLETE Column stats: COMPLETE
+ Limit
+ Number of rows: 3
+ Statistics: Num rows: 3 Data size: 2760 Basic stats: COMPLETE Column stats: COMPLETE
+ ListSink
+
+PREHOOK: query: select str_to_map('a:1,b:2,c:3') from src limit 3
+PREHOOK: type: QUERY
+PREHOOK: Input: default@src
+#### A masked pattern was here ####
+POSTHOOK: query: select str_to_map('a:1,b:2,c:3') from src limit 3
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@src
+#### A masked pattern was here ####
+{"b":"2","a":"1","c":"3"}
+{"b":"2","a":"1","c":"3"}
+{"b":"2","a":"1","c":"3"}
+PREHOOK: query: explain select str_to_map('a:1,b:2,c:3',',',':') from src limit 3
+PREHOOK: type: QUERY
+POSTHOOK: query: explain select str_to_map('a:1,b:2,c:3',',',':') from src limit 3
+POSTHOOK: type: QUERY
+STAGE DEPENDENCIES:
+ Stage-0 is a root stage
+
+STAGE PLANS:
+ Stage: Stage-0
+ Fetch Operator
+ limit: 3
+ Processor Tree:
+ TableScan
+ alias: src
+ Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: COMPLETE
+ Select Operator
+ expressions: str_to_map('a:1,b:2,c:3',',',':') (type: map<string,string>)
+ outputColumnNames: _col0
+ Statistics: Num rows: 500 Data size: 460000 Basic stats: COMPLETE Column stats: COMPLETE
+ Limit
+ Number of rows: 3
+ Statistics: Num rows: 3 Data size: 2760 Basic stats: COMPLETE Column stats: COMPLETE
+ ListSink
+
+PREHOOK: query: select str_to_map('a:1,b:2,c:3',',',':') from src limit 3
+PREHOOK: type: QUERY
+PREHOOK: Input: default@src
+#### A masked pattern was here ####
+POSTHOOK: query: select str_to_map('a:1,b:2,c:3',',',':') from src limit 3
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@src
+#### A masked pattern was here ####
+{"b":"2","a":"1","c":"3"}
+{"b":"2","a":"1","c":"3"}
+{"b":"2","a":"1","c":"3"}
+PREHOOK: query: explain select str_to_map(t.ss,',',':')['a']
+from (select transform('a:1,b:2,c:3') using 'cat' as (ss) from src) t
+limit 3
+PREHOOK: type: QUERY
+POSTHOOK: query: explain select str_to_map(t.ss,',',':')['a']
+from (select transform('a:1,b:2,c:3') using 'cat' as (ss) from src) t
+limit 3
+POSTHOOK: type: QUERY
+STAGE DEPENDENCIES:
+ Stage-1 is a root stage
+ Stage-0 depends on stages: Stage-1
+
+STAGE PLANS:
+ Stage: Stage-1
+ Map Reduce
+ Map Operator Tree:
+ TableScan
+ alias: src
+ Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: COMPLETE
+ Select Operator
+ expressions: 'a:1,b:2,c:3' (type: string)
+ outputColumnNames: _col0
+ Statistics: Num rows: 500 Data size: 47500 Basic stats: COMPLETE Column stats: COMPLETE
+ Transform Operator
+ command: cat
+ output info:
+ input format: org.apache.hadoop.mapred.TextInputFormat
+ output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
+ serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+ Statistics: Num rows: 500 Data size: 47500 Basic stats: COMPLETE Column stats: COMPLETE
+ Select Operator
+ expressions: str_to_map(_col0,',',':')['a'] (type: string)
+ outputColumnNames: _col0
+ Statistics: Num rows: 500 Data size: 92000 Basic stats: COMPLETE Column stats: COMPLETE
+ Limit
+ Number of rows: 3
+ Statistics: Num rows: 3 Data size: 552 Basic stats: COMPLETE Column stats: COMPLETE
+ File Output Operator
+ compressed: false
+ Statistics: Num rows: 3 Data size: 552 Basic stats: COMPLETE Column stats: COMPLETE
+ table:
+ input format: org.apache.hadoop.mapred.TextInputFormat
+ output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
+ serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+
+ Stage: Stage-0
+ Fetch Operator
+ limit: 3
+ Processor Tree:
+ ListSink
+
+PREHOOK: query: select str_to_map(t.ss,',',':')['a']
+from (select transform('a:1,b:2,c:3') using 'cat' as (ss) from src) t
+limit 3
+PREHOOK: type: QUERY
+PREHOOK: Input: default@src
+#### A masked pattern was here ####
+POSTHOOK: query: select str_to_map(t.ss,',',':')['a']
+from (select transform('a:1,b:2,c:3') using 'cat' as (ss) from src) t
+limit 3
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@src
+#### A masked pattern was here ####
+1
+1
+1
+PREHOOK: query: drop table tbl_s2m
+PREHOOK: type: DROPTABLE
+POSTHOOK: query: drop table tbl_s2m
+POSTHOOK: type: DROPTABLE
+PREHOOK: query: create table tbl_s2m as select 'ABC=CC_333=444' as t from src tablesample (3 rows)
+PREHOOK: type: CREATETABLE_AS_SELECT
+PREHOOK: Input: default@src
+PREHOOK: Output: database:default
+PREHOOK: Output: default@tbl_s2m
+POSTHOOK: query: create table tbl_s2m as select 'ABC=CC_333=444' as t from src tablesample (3 rows)
+POSTHOOK: type: CREATETABLE_AS_SELECT
+POSTHOOK: Input: default@src
+POSTHOOK: Output: database:default
+POSTHOOK: Output: default@tbl_s2m
+PREHOOK: query: select str_to_map(t,'_','=')['333'] from tbl_s2m
+PREHOOK: type: QUERY
+PREHOOK: Input: default@tbl_s2m
+#### A masked pattern was here ####
+POSTHOOK: query: select str_to_map(t,'_','=')['333'] from tbl_s2m
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@tbl_s2m
+#### A masked pattern was here ####
+444
+444
+444
+PREHOOK: query: drop table tbl_s2m
+PREHOOK: type: DROPTABLE
+PREHOOK: Input: default@tbl_s2m
+PREHOOK: Output: default@tbl_s2m
+POSTHOOK: query: drop table tbl_s2m
+POSTHOOK: type: DROPTABLE
+POSTHOOK: Input: default@tbl_s2m
+POSTHOOK: Output: default@tbl_s2m

Added: hive/trunk/ql/src/test/results/clientpositive/str_to_map.q.java1.8.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/str_to_map.q.java1.8.out?rev=1647793&view=auto
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/str_to_map.q.java1.8.out (added)
+++ hive/trunk/ql/src/test/results/clientpositive/str_to_map.q.java1.8.out Wed Dec 24 14:30:00 2014
@@ -0,0 +1,219 @@
+PREHOOK: query: -- JAVA_VERSION_SPECIFIC_OUTPUT
+
+desc function str_to_map
+PREHOOK: type: DESCFUNCTION
+POSTHOOK: query: -- JAVA_VERSION_SPECIFIC_OUTPUT
+
+desc function str_to_map
+POSTHOOK: type: DESCFUNCTION
+str_to_map(text, delimiter1, delimiter2) - Creates a map by parsing text
+PREHOOK: query: desc function extended str_to_map
+PREHOOK: type: DESCFUNCTION
+POSTHOOK: query: desc function extended str_to_map
+POSTHOOK: type: DESCFUNCTION
+str_to_map(text, delimiter1, delimiter2) - Creates a map by parsing text
+Split text into key-value pairs using two delimiters. The first delimiter seperates pairs, and the second delimiter sperates key and value. If only one parameter is given, default delimiters are used: ',' as delimiter1 and '=' as delimiter2.
+PREHOOK: query: explain select str_to_map('a=1,b=2,c=3',',','=')['a'] from src limit 3
+PREHOOK: type: QUERY
+POSTHOOK: query: explain select str_to_map('a=1,b=2,c=3',',','=')['a'] from src limit 3
+POSTHOOK: type: QUERY
+STAGE DEPENDENCIES:
+ Stage-0 is a root stage
+
+STAGE PLANS:
+ Stage: Stage-0
+ Fetch Operator
+ limit: 3
+ Processor Tree:
+ TableScan
+ alias: src
+ Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: COMPLETE
+ Select Operator
+ expressions: str_to_map('a=1,b=2,c=3',',','=')['a'] (type: string)
+ outputColumnNames: _col0
+ Statistics: Num rows: 500 Data size: 92000 Basic stats: COMPLETE Column stats: COMPLETE
+ Limit
+ Number of rows: 3
+ Statistics: Num rows: 3 Data size: 552 Basic stats: COMPLETE Column stats: COMPLETE
+ ListSink
+
+PREHOOK: query: select str_to_map('a=1,b=2,c=3',',','=')['a'] from src limit 3
+PREHOOK: type: QUERY
+PREHOOK: Input: default@src
+#### A masked pattern was here ####
+POSTHOOK: query: select str_to_map('a=1,b=2,c=3',',','=')['a'] from src limit 3
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@src
+#### A masked pattern was here ####
+1
+1
+1
+PREHOOK: query: explain select str_to_map('a:1,b:2,c:3') from src limit 3
+PREHOOK: type: QUERY
+POSTHOOK: query: explain select str_to_map('a:1,b:2,c:3') from src limit 3
+POSTHOOK: type: QUERY
+STAGE DEPENDENCIES:
+ Stage-0 is a root stage
+
+STAGE PLANS:
+ Stage: Stage-0
+ Fetch Operator
+ limit: 3
+ Processor Tree:
+ TableScan
+ alias: src
+ Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: COMPLETE
+ Select Operator
+ expressions: str_to_map('a:1,b:2,c:3') (type: map<string,string>)
+ outputColumnNames: _col0
+ Statistics: Num rows: 500 Data size: 460000 Basic stats: COMPLETE Column stats: COMPLETE
+ Limit
+ Number of rows: 3
+ Statistics: Num rows: 3 Data size: 2760 Basic stats: COMPLETE Column stats: COMPLETE
+ ListSink
+
+PREHOOK: query: select str_to_map('a:1,b:2,c:3') from src limit 3
+PREHOOK: type: QUERY
+PREHOOK: Input: default@src
+#### A masked pattern was here ####
+POSTHOOK: query: select str_to_map('a:1,b:2,c:3') from src limit 3
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@src
+#### A masked pattern was here ####
+{"a":"1","b":"2","c":"3"}
+{"a":"1","b":"2","c":"3"}
+{"a":"1","b":"2","c":"3"}
+PREHOOK: query: explain select str_to_map('a:1,b:2,c:3',',',':') from src limit 3
+PREHOOK: type: QUERY
+POSTHOOK: query: explain select str_to_map('a:1,b:2,c:3',',',':') from src limit 3
+POSTHOOK: type: QUERY
+STAGE DEPENDENCIES:
+ Stage-0 is a root stage
+
+STAGE PLANS:
+ Stage: Stage-0
+ Fetch Operator
+ limit: 3
+ Processor Tree:
+ TableScan
+ alias: src
+ Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: COMPLETE
+ Select Operator
+ expressions: str_to_map('a:1,b:2,c:3',',',':') (type: map<string,string>)
+ outputColumnNames: _col0
+ Statistics: Num rows: 500 Data size: 460000 Basic stats: COMPLETE Column stats: COMPLETE
+ Limit
+ Number of rows: 3
+ Statistics: Num rows: 3 Data size: 2760 Basic stats: COMPLETE Column stats: COMPLETE
+ ListSink
+
+PREHOOK: query: select str_to_map('a:1,b:2,c:3',',',':') from src limit 3
+PREHOOK: type: QUERY
+PREHOOK: Input: default@src
+#### A masked pattern was here ####
+POSTHOOK: query: select str_to_map('a:1,b:2,c:3',',',':') from src limit 3
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@src
+#### A masked pattern was here ####
+{"a":"1","b":"2","c":"3"}
+{"a":"1","b":"2","c":"3"}
+{"a":"1","b":"2","c":"3"}
+PREHOOK: query: explain select str_to_map(t.ss,',',':')['a']
+from (select transform('a:1,b:2,c:3') using 'cat' as (ss) from src) t
+limit 3
+PREHOOK: type: QUERY
+POSTHOOK: query: explain select str_to_map(t.ss,',',':')['a']
+from (select transform('a:1,b:2,c:3') using 'cat' as (ss) from src) t
+limit 3
+POSTHOOK: type: QUERY
+STAGE DEPENDENCIES:
+ Stage-1 is a root stage
+ Stage-0 depends on stages: Stage-1
+
+STAGE PLANS:
+ Stage: Stage-1
+ Map Reduce
+ Map Operator Tree:
+ TableScan
+ alias: src
+ Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: COMPLETE
+ Select Operator
+ expressions: 'a:1,b:2,c:3' (type: string)
+ outputColumnNames: _col0
+ Statistics: Num rows: 500 Data size: 47500 Basic stats: COMPLETE Column stats: COMPLETE
+ Transform Operator
+ command: cat
+ output info:
+ input format: org.apache.hadoop.mapred.TextInputFormat
+ output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
+ serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+ Statistics: Num rows: 500 Data size: 47500 Basic stats: COMPLETE Column stats: COMPLETE
+ Select Operator
+ expressions: str_to_map(_col0,',',':')['a'] (type: string)
+ outputColumnNames: _col0
+ Statistics: Num rows: 500 Data size: 92000 Basic stats: COMPLETE Column stats: COMPLETE
+ Limit
+ Number of rows: 3
+ Statistics: Num rows: 3 Data size: 552 Basic stats: COMPLETE Column stats: COMPLETE
+ File Output Operator
+ compressed: false
+ Statistics: Num rows: 3 Data size: 552 Basic stats: COMPLETE Column stats: COMPLETE
+ table:
+ input format: org.apache.hadoop.mapred.TextInputFormat
+ output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
+ serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+
+ Stage: Stage-0
+ Fetch Operator
+ limit: 3
+ Processor Tree:
+ ListSink
+
+PREHOOK: query: select str_to_map(t.ss,',',':')['a']
+from (select transform('a:1,b:2,c:3') using 'cat' as (ss) from src) t
+limit 3
+PREHOOK: type: QUERY
+PREHOOK: Input: default@src
+#### A masked pattern was here ####
+POSTHOOK: query: select str_to_map(t.ss,',',':')['a']
+from (select transform('a:1,b:2,c:3') using 'cat' as (ss) from src) t
+limit 3
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@src
+#### A masked pattern was here ####
+1
+1
+1
+PREHOOK: query: drop table tbl_s2m
+PREHOOK: type: DROPTABLE
+POSTHOOK: query: drop table tbl_s2m
+POSTHOOK: type: DROPTABLE
+PREHOOK: query: create table tbl_s2m as select 'ABC=CC_333=444' as t from src tablesample (3 rows)
+PREHOOK: type: CREATETABLE_AS_SELECT
+PREHOOK: Input: default@src
+PREHOOK: Output: database:default
+PREHOOK: Output: default@tbl_s2m
+POSTHOOK: query: create table tbl_s2m as select 'ABC=CC_333=444' as t from src tablesample (3 rows)
+POSTHOOK: type: CREATETABLE_AS_SELECT
+POSTHOOK: Input: default@src
+POSTHOOK: Output: database:default
+POSTHOOK: Output: default@tbl_s2m
+PREHOOK: query: select str_to_map(t,'_','=')['333'] from tbl_s2m
+PREHOOK: type: QUERY
+PREHOOK: Input: default@tbl_s2m
+#### A masked pattern was here ####
+POSTHOOK: query: select str_to_map(t,'_','=')['333'] from tbl_s2m
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@tbl_s2m
+#### A masked pattern was here ####
+444
+444
+444
+PREHOOK: query: drop table tbl_s2m
+PREHOOK: type: DROPTABLE
+PREHOOK: Input: default@tbl_s2m
+PREHOOK: Output: default@tbl_s2m
+POSTHOOK: query: drop table tbl_s2m
+POSTHOOK: type: DROPTABLE
+POSTHOOK: Input: default@tbl_s2m
+POSTHOOK: Output: default@tbl_s2m

Modified: hive/trunk/ql/src/test/results/clientpositive/udf_map_keys.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/udf_map_keys.q.out?rev=1647793&r1=1647792&r2=1647793&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/udf_map_keys.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/udf_map_keys.q.out Wed Dec 24 14:30:00 2014
@@ -39,4 +39,4 @@ SELECT map_keys(map("a", 1, "b", 2, "c",
  POSTHOOK: type: QUERY
  POSTHOOK: Input: default@src
  #### A masked pattern was here ####
-["b","a","c"]
+["a","b","c"]

Modified: hive/trunk/ql/src/test/results/clientpositive/udf_map_values.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/udf_map_values.q.out?rev=1647793&r1=1647792&r2=1647793&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/udf_map_values.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/udf_map_values.q.out Wed Dec 24 14:30:00 2014
@@ -39,4 +39,4 @@ SELECT map_values(map("a", 1, "b", 2, "c
  POSTHOOK: type: QUERY
  POSTHOOK: Input: default@src
  #### A masked pattern was here ####
-[2,1,3]
+[1,2,3]

Modified: hive/trunk/ql/src/test/results/clientpositive/udf_std.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/udf_std.q.out?rev=1647793&r1=1647792&r2=1647793&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/udf_std.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/udf_std.q.out Wed Dec 24 14:30:00 2014
@@ -8,4 +8,4 @@ PREHOOK: type: DESCFUNCTION
  POSTHOOK: query: DESCRIBE FUNCTION EXTENDED std
  POSTHOOK: type: DESCFUNCTION
  std(x) - Returns the standard deviation of a set of numbers
-Synonyms: stddev_pop, stddev
+Synonyms: stddev, stddev_pop

Modified: hive/trunk/ql/src/test/results/clientpositive/udf_stddev.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/udf_stddev.q.out?rev=1647793&r1=1647792&r2=1647793&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/udf_stddev.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/udf_stddev.q.out Wed Dec 24 14:30:00 2014
@@ -8,4 +8,4 @@ PREHOOK: type: DESCFUNCTION
  POSTHOOK: query: DESCRIBE FUNCTION EXTENDED stddev
  POSTHOOK: type: DESCFUNCTION
  stddev(x) - Returns the standard deviation of a set of numbers
-Synonyms: stddev_pop, std
+Synonyms: std, stddev_pop

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupcommits @
categorieshive, hadoop
postedDec 24, '14 at 2:30p
activeDec 24, '14 at 2:30p
posts1
users1
websitehive.apache.org

1 user in discussion

Brock: 1 post

People

Translate

site design / logo © 2021 Grokbase