hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From br...@apache.org
Subject svn commit: r1546157 [2/2] - in /hive/trunk/ql/src: java/org/apache/hadoop/hive/ql/exec/ java/org/apache/hadoop/hive/ql/exec/vector/ java/org/apache/hadoop/hive/ql/optimizer/physical/ java/org/apache/hadoop/hive/ql/udf/ java/org/apache/hadoop/hive/ql/u...
Date Wed, 27 Nov 2013 18:52:41 GMT
Added: hive/trunk/ql/src/test/org/apache/hadoop/hive/ql/udf/generic/TestGenericUDFPower.java
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/org/apache/hadoop/hive/ql/udf/generic/TestGenericUDFPower.java?rev=1546157&view=auto
==============================================================================
--- hive/trunk/ql/src/test/org/apache/hadoop/hive/ql/udf/generic/TestGenericUDFPower.java
(added)
+++ hive/trunk/ql/src/test/org/apache/hadoop/hive/ql/udf/generic/TestGenericUDFPower.java
Wed Nov 27 18:52:41 2013
@@ -0,0 +1,211 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.hadoop.hive.ql.udf.generic;
+
+import org.apache.hadoop.hive.common.type.HiveDecimal;
+import org.apache.hadoop.hive.ql.metadata.HiveException;
+import org.apache.hadoop.hive.ql.udf.generic.GenericUDF.DeferredJavaObject;
+import org.apache.hadoop.hive.ql.udf.generic.GenericUDF.DeferredObject;
+import org.apache.hadoop.hive.serde2.io.ByteWritable;
+import org.apache.hadoop.hive.serde2.io.DoubleWritable;
+import org.apache.hadoop.hive.serde2.io.HiveDecimalWritable;
+import org.apache.hadoop.hive.serde2.io.HiveVarcharWritable;
+import org.apache.hadoop.hive.serde2.io.ShortWritable;
+import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector;
+import org.apache.hadoop.hive.serde2.objectinspector.PrimitiveObjectInspector;
+import org.apache.hadoop.hive.serde2.objectinspector.primitive.PrimitiveObjectInspectorFactory;
+import org.apache.hadoop.hive.serde2.typeinfo.TypeInfoFactory;
+import org.apache.hadoop.io.FloatWritable;
+import org.apache.hadoop.io.IntWritable;
+import org.apache.hadoop.io.LongWritable;
+import org.junit.Assert;
+import org.junit.Test;
+
+public class TestGenericUDFPower {
+
+  @Test
+  public void testBytePowerShort() throws HiveException {
+    GenericUDFPower udf = new GenericUDFPower();
+
+    ByteWritable left = new ByteWritable((byte) 2);
+    ShortWritable right = new ShortWritable((short) 4);
+    ObjectInspector[] inputOIs = {
+        PrimitiveObjectInspectorFactory.writableByteObjectInspector,
+        PrimitiveObjectInspectorFactory.writableShortObjectInspector
+    };
+    DeferredObject[] args = {
+        new DeferredJavaObject(left),
+        new DeferredJavaObject(right),
+    };
+
+    PrimitiveObjectInspector oi = (PrimitiveObjectInspector) udf.initialize(inputOIs);
+    Assert.assertEquals(TypeInfoFactory.doubleTypeInfo, oi.getTypeInfo());
+    DoubleWritable res = (DoubleWritable) udf.evaluate(args);
+    Assert.assertEquals(new Double(16), new Double(res.get()));
+  }
+
+  @Test
+  public void testVarcharPowerInt() throws HiveException {
+    GenericUDFPower udf = new GenericUDFPower();
+
+    HiveVarcharWritable left = new HiveVarcharWritable();
+    left.set("3.14");
+    IntWritable right = new IntWritable(2);
+    ObjectInspector[] inputOIs = {
+        PrimitiveObjectInspectorFactory.writableHiveVarcharObjectInspector,
+        PrimitiveObjectInspectorFactory.writableIntObjectInspector
+    };
+    DeferredObject[] args = {
+        new DeferredJavaObject(left),
+        new DeferredJavaObject(right),
+    };
+
+    PrimitiveObjectInspector oi = (PrimitiveObjectInspector) udf.initialize(inputOIs);
+    Assert.assertEquals(oi.getTypeInfo(), TypeInfoFactory.doubleTypeInfo);
+    DoubleWritable res = (DoubleWritable) udf.evaluate(args);
+    Assert.assertEquals(new Double(3.14 * 3.14), new Double(res.get()));
+  }
+
+  @Test
+  public void testDoublePowerLong() throws HiveException {
+    GenericUDFPower udf = new GenericUDFPower();
+
+    DoubleWritable left = new DoubleWritable(4.5);
+    LongWritable right = new LongWritable(4);
+    ObjectInspector[] inputOIs = {
+        PrimitiveObjectInspectorFactory.writableDoubleObjectInspector,
+        PrimitiveObjectInspectorFactory.writableLongObjectInspector
+    };
+    DeferredObject[] args = {
+        new DeferredJavaObject(left),
+        new DeferredJavaObject(right),
+    };
+
+    PrimitiveObjectInspector oi = (PrimitiveObjectInspector) udf.initialize(inputOIs);
+    Assert.assertEquals(TypeInfoFactory.doubleTypeInfo, oi.getTypeInfo());
+    DoubleWritable res = (DoubleWritable) udf.evaluate(args);
+    Assert.assertEquals(new Double(4.5 * 4.5 * 4.5 * 4.5), new Double(res.get()));
+  }
+
+  @Test
+  public void testLongPowerDecimal() throws HiveException {
+    GenericUDFPower udf = new GenericUDFPower();
+
+    LongWritable left = new LongWritable(10);
+    HiveDecimalWritable right = new HiveDecimalWritable(HiveDecimal.create("3.14"));
+    ObjectInspector[] inputOIs = {
+        PrimitiveObjectInspectorFactory.writableLongObjectInspector,
+        PrimitiveObjectInspectorFactory.getPrimitiveWritableObjectInspector(TypeInfoFactory.getDecimalTypeInfo(9,
4))
+    };
+    DeferredObject[] args = {
+        new DeferredJavaObject(left),
+        new DeferredJavaObject(right),
+    };
+
+    PrimitiveObjectInspector oi = (PrimitiveObjectInspector) udf.initialize(inputOIs);
+    Assert.assertEquals(TypeInfoFactory.doubleTypeInfo, oi.getTypeInfo());
+    DoubleWritable res = (DoubleWritable) udf.evaluate(args);
+    Assert.assertEquals(new Double(1380.3842646028852), new Double(res.get()));
+   }
+
+  @Test
+  public void testFloatPowerFloat() throws HiveException {
+    GenericUDFPower udf = new GenericUDFPower();
+
+    FloatWritable f1 = new FloatWritable(4.5f);
+    FloatWritable f2 = new FloatWritable(-1.5f);
+    ObjectInspector[] inputOIs = {
+        PrimitiveObjectInspectorFactory.writableFloatObjectInspector,
+        PrimitiveObjectInspectorFactory.writableFloatObjectInspector
+    };
+    DeferredObject[] args = {
+        new DeferredJavaObject(f1),
+        new DeferredJavaObject(f2),
+    };
+
+    PrimitiveObjectInspector oi = (PrimitiveObjectInspector) udf.initialize(inputOIs);
+    Assert.assertEquals(oi.getTypeInfo(), TypeInfoFactory.doubleTypeInfo);
+    DoubleWritable res = (DoubleWritable) udf.evaluate(args);
+    Assert.assertEquals(new Double(0.10475656017578482), new Double(res.get()));
+  }
+
+  @Test
+  public void testShortPowerFloat() throws HiveException {
+    GenericUDFPower udf = new GenericUDFPower();
+
+    ShortWritable base = new ShortWritable((short) 23);
+    FloatWritable power = new FloatWritable(-1.5f);
+    ObjectInspector[] inputOIs = {
+        PrimitiveObjectInspectorFactory.writableShortObjectInspector,
+        PrimitiveObjectInspectorFactory.writableFloatObjectInspector
+    };
+    DeferredObject[] args = {
+        new DeferredJavaObject(base),
+        new DeferredJavaObject(power),
+    };
+
+    PrimitiveObjectInspector oi = (PrimitiveObjectInspector) udf.initialize(inputOIs);
+    Assert.assertEquals(oi.getTypeInfo(), TypeInfoFactory.doubleTypeInfo);
+    DoubleWritable res = (DoubleWritable) udf.evaluate(args);
+    Assert.assertEquals(new Double(0.009065844089438033), new Double(res.get()));
+  }
+
+  @Test
+  public void testDoulePowerDecimal() throws HiveException {
+    GenericUDFPower udf = new GenericUDFPower();
+
+    DoubleWritable left = new DoubleWritable(-4.52);
+    HiveDecimalWritable right = new HiveDecimalWritable(HiveDecimal.create("3"));
+    ObjectInspector[] inputOIs = {
+        PrimitiveObjectInspectorFactory.writableDoubleObjectInspector,
+        PrimitiveObjectInspectorFactory.getPrimitiveWritableObjectInspector(TypeInfoFactory.getDecimalTypeInfo(5,
2))
+    };
+    DeferredObject[] args = {
+        new DeferredJavaObject(left),
+        new DeferredJavaObject(right),
+    };
+
+    PrimitiveObjectInspector oi = (PrimitiveObjectInspector) udf.initialize(inputOIs);
+    Assert.assertEquals(TypeInfoFactory.doubleTypeInfo, oi.getTypeInfo());
+    DoubleWritable res = (DoubleWritable) udf.evaluate(args);
+    Assert.assertEquals(new Double(-4.52 * 4.52 * 4.52), new Double(res.get()));
+  }
+
+  @Test
+  public void testDecimalPowerDecimal() throws HiveException {
+    GenericUDFPower udf = new GenericUDFPower();
+
+    HiveDecimalWritable left = new HiveDecimalWritable(HiveDecimal.create("14.5"));
+    HiveDecimalWritable right = new HiveDecimalWritable(HiveDecimal.create("-3.2"));
+    ObjectInspector[] inputOIs = {
+        PrimitiveObjectInspectorFactory.getPrimitiveWritableObjectInspector(TypeInfoFactory.getDecimalTypeInfo(3,
1)),
+        PrimitiveObjectInspectorFactory.getPrimitiveWritableObjectInspector(TypeInfoFactory.getDecimalTypeInfo(5,
2))
+    };
+    DeferredObject[] args = {
+        new DeferredJavaObject(left),
+        new DeferredJavaObject(right),
+    };
+
+    PrimitiveObjectInspector oi = (PrimitiveObjectInspector) udf.initialize(inputOIs);
+    Assert.assertEquals(TypeInfoFactory.doubleTypeInfo, oi.getTypeInfo());
+    DoubleWritable res = (DoubleWritable) udf.evaluate(args);
+    Assert.assertEquals(new Double(1.9214203800477838E-4), new Double(res.get()));
+  }
+
+}

Modified: hive/trunk/ql/src/test/results/clientpositive/decimal_udf.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/decimal_udf.q.out?rev=1546157&r1=1546156&r2=1546157&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/decimal_udf.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/decimal_udf.q.out Wed Nov 27 18:52:41 2013
@@ -1596,7 +1596,7 @@ STAGE PLANS:
           Select Operator
             expressions:
                   expr: ceil(key)
-                  type: decimal(38,18)
+                  type: decimal(21,0)
             outputColumnNames: _col0
             ListSink
 
@@ -1669,7 +1669,7 @@ STAGE PLANS:
           Select Operator
             expressions:
                   expr: floor(key)
-                  type: decimal(38,18)
+                  type: decimal(21,0)
             outputColumnNames: _col0
             ListSink
 
@@ -1815,7 +1815,7 @@ STAGE PLANS:
           Select Operator
             expressions:
                   expr: power(key, 2)
-                  type: decimal(38,18)
+                  type: double
             outputColumnNames: _col0
             ListSink
 
@@ -1828,44 +1828,44 @@ POSTHOOK: query: SELECT POWER(key, 2) FR
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@decimal_udf
 #### A masked pattern was here ####
-19360000
+1.936E7
 NULL
-0
-0
-10000
-100
-1
-0.01
-0.0001
-40000
-400
-4
-0
-0.04
-0.0004
+0.0
+0.0
+10000.0
+100.0
+1.0
+0.010000000000000002
+1.0E-4
+40000.0
+400.0
+4.0
+0.0
+0.04000000000000001
+4.0E-4
 0.09
-0.1089
-0.110889
+0.10890000000000001
+0.11088900000000002
 0.09
-0.1089
-0.110889
-1
-4
+0.10890000000000001
+0.11088900000000002
+1.0
+4.0
 9.8596
-1.2544
-1.2544
-1.258884
-1.2544
-1.258884
-15376
+1.2544000000000002
+1.2544000000000002
+1.2588840000000003
+1.2544000000000002
+1.2588840000000003
+15376.0
 15675.04
 1576255.1401
 9.8596
 9.8596
 9.8596
-1
-1524157875323883675.019051998750190521
-1524157875323883652.7968299765279684
+1.0
+1.52415787532388352E18
+1.52415787532388352E18
 PREHOOK: query: -- modulo
 EXPLAIN SELECT (key + 1) % (key / 2) FROM DECIMAL_UDF
 PREHOOK: type: QUERY

Modified: hive/trunk/ql/src/test/results/clientpositive/literal_decimal.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/literal_decimal.q.out?rev=1546157&r1=1546156&r2=1546157&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/literal_decimal.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/literal_decimal.q.out Wed Nov 27 18:52:41
2013
@@ -18,7 +18,7 @@ STAGE PLANS:
           Select Operator
             expressions:
                   expr: (- 1)
-                  type: decimal(38,18)
+                  type: decimal(1,0)
                   expr: 0
                   type: decimal(1,0)
                   expr: 1
@@ -26,7 +26,7 @@ STAGE PLANS:
                   expr: 3.14
                   type: decimal(3,2)
                   expr: (- 3.14)
-                  type: decimal(38,18)
+                  type: decimal(3,2)
                   expr: 99999999999999999
                   type: decimal(17,0)
                   expr: 99999999999999999.9999999999999

Modified: hive/trunk/ql/src/test/results/clientpositive/udf4.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/udf4.q.out?rev=1546157&r1=1546156&r2=1546157&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/udf4.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/udf4.q.out Wed Nov 27 18:52:41 2013
@@ -103,7 +103,7 @@ STAGE PLANS:
                     type: bigint
                     expr: ceil((- 1.5))
                     type: bigint
-                    expr: ceiling(1.0)
+                    expr: ceil(1.0)
                     type: bigint
                     expr: rand(3)
                     type: double

Modified: hive/trunk/ql/src/test/results/clientpositive/udf7.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/udf7.q.out?rev=1546157&r1=1546156&r2=1546157&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/udf7.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/udf7.q.out Wed Nov 27 18:52:41 2013
@@ -85,7 +85,7 @@ STAGE PLANS:
                     type: double
                     expr: round(exp(2.0), 12)
                     type: double
-                    expr: pow(2, 3)
+                    expr: power(2, 3)
                     type: double
                     expr: power(2, 3)
                     type: double
@@ -100,11 +100,11 @@ STAGE PLANS:
                     expr: power((- 1), 2)
                     type: double
                     expr: power(CAST( 1 AS decimal(10,0)), 0)
-                    type: decimal(38,18)
+                    type: double
                     expr: power(CAST( 2 AS decimal(10,0)), 3)
-                    type: decimal(38,18)
-                    expr: pow(CAST( 2 AS decimal(10,0)), 3)
-                    type: decimal(38,18)
+                    type: double
+                    expr: power(CAST( 2 AS decimal(10,0)), 3)
+                    type: double
               outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7,
_col8, _col9, _col10, _col11, _col12, _col13, _col14, _col15, _col16, _col17, _col18, _col19,
_col20, _col21, _col22, _col23, _col24, _col25, _col26, _col27
               File Output Operator
                 compressed: false
@@ -142,4 +142,4 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@dest1
 #### A masked pattern was here ####
 POSTHOOK: Lineage: dest1.c1 SIMPLE []
-1.098612288668	NULL	NULL	1.098612288668	NULL	NULL	1.584962500721	NULL	NULL	0.47712125472
NULL	NULL	1.584962500721	NULL	NULL	NULL	-1.0	7.389056098931	8.0	8.0	0.125	8.0	2.0	NaN	1.0
1	8	8
+1.098612288668	NULL	NULL	1.098612288668	NULL	NULL	1.584962500721	NULL	NULL	0.47712125472
NULL	NULL	1.584962500721	NULL	NULL	NULL	-1.0	7.389056098931	8.0	8.0	0.125	8.0	2.0	NaN	1.0
1.0	8.0	8.0

Modified: hive/trunk/ql/src/test/results/clientpositive/vectorization_short_regress.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/vectorization_short_regress.q.out?rev=1546157&r1=1546156&r2=1546157&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/vectorization_short_regress.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/vectorization_short_regress.q.out Wed Nov
27 18:52:41 2013
@@ -560,7 +560,7 @@ STAGE PLANS:
                   expr: _col7
                   type: double
                   expr: (- (_col0 / (- 3728)))
-                  type: decimal(38,18)
+                  type: decimal(16,6)
                   expr: ((- (_col0 * (- 3728))) % ((- 563) % (_col0 * (- 3728))))
                   type: int
                   expr: ((_col0 / (- 3728)) - _col4)
@@ -2740,7 +2740,7 @@ STAGE PLANS:
                       expr: (cbigint % 79.553)
                       type: double
                       expr: (- (cint / cbigint))
-                      type: decimal(38,18)
+                      type: decimal(30,20)
                       expr: (10.175 % cfloat)
                       type: double
                       expr: (- cfloat)
@@ -2855,8 +2855,8 @@ WHERE  (((197 > ctinyint)
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@alltypesorc
 #### A masked pattern was here ####
--462839731	988888	ss	false	-51.0	NULL	NULL	NULL	Lml5J2QBU77	false	-468.04059812638033831941
44.210000000033915	468.040598126380338319	10.175	51.0	-102.0	-102.0	NULL	NULL	-988888	417.04059812638036
NULL	3569	NULL	NULL
--635141101	-89010	ss	false	-51.0	NULL	NULL	NULL	rVWAj4N1MCg8Scyp7wj2C	true	7135.61511066172340186496
-69.74600000000305	-7135.615110661723401865	10.175	51.0	-102.0	-102.0	NULL	NULL	89010	-7186.6151106617235
NULL	3569	NULL	NULL
+-462839731	988888	ss	false	-51.0	NULL	NULL	NULL	Lml5J2QBU77	false	-468.04059812638033831941
44.210000000033915	468.04059812638033831941	10.175	51.0	-102.0	-102.0	NULL	NULL	-988888	417.04059812638036
NULL	3569	NULL	NULL
+-635141101	-89010	ss	false	-51.0	NULL	NULL	NULL	rVWAj4N1MCg8Scyp7wj2C	true	7135.61511066172340186496
-69.74600000000305	-7135.61511066172340186496	10.175	51.0	-102.0	-102.0	NULL	NULL	89010	-7186.6151106617235
NULL	3569	NULL	NULL
 WARNING: Comparing a bigint and a double may result in a loss of precision.
 PREHOOK: query: -- TargetTypeClasses: String, Bool, Double, Long, Timestamp
 -- Functions: Sum, Max, Avg, Var, StDevP, VarP

Modified: hive/trunk/ql/src/test/results/clientpositive/vectorized_math_funcs.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/vectorized_math_funcs.q.out?rev=1546157&r1=1546156&r2=1546157&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/vectorized_math_funcs.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/vectorized_math_funcs.q.out Wed Nov 27 18:52:41
2013
@@ -157,7 +157,7 @@ STAGE PLANS:
                       type: double
                       expr: log(2.0, cdouble)
                       type: double
-                      expr: pow(log2(cdouble), 2.0)
+                      expr: power(log2(cdouble), 2.0)
                       type: double
                       expr: power(log2(cdouble), 2.0)
                       type: double

Modified: hive/trunk/ql/src/test/results/compiler/plan/udf4.q.xml
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/compiler/plan/udf4.q.xml?rev=1546157&r1=1546156&r2=1546157&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/compiler/plan/udf4.q.xml (original)
+++ hive/trunk/ql/src/test/results/compiler/plan/udf4.q.xml Wed Nov 27 18:52:41 2013
@@ -591,17 +591,7 @@
                      </object> 
                     </void> 
                     <void property="genericUDF"> 
-                     <object class="org.apache.hadoop.hive.ql.udf.generic.GenericUDFBridge">

-                      <void property="operator"> 
-                       <boolean>true</boolean> 
-                      </void> 
-                      <void property="udfClassName"> 
-                       <string>org.apache.hadoop.hive.ql.udf.UDFOPNegative</string>

-                      </void> 
-                      <void property="udfName"> 
-                       <string>-</string> 
-                      </void> 
-                     </object> 
+                     <object class="org.apache.hadoop.hive.ql.udf.generic.GenericUDFOPNegative"/>

                     </void> 
                     <void property="typeInfo"> 
                      <object idref="PrimitiveTypeInfo0"/> 
@@ -679,17 +669,7 @@
                      </object> 
                     </void> 
                     <void property="genericUDF"> 
-                     <object class="org.apache.hadoop.hive.ql.udf.generic.GenericUDFBridge">

-                      <void property="operator"> 
-                       <boolean>true</boolean> 
-                      </void> 
-                      <void property="udfClassName"> 
-                       <string>org.apache.hadoop.hive.ql.udf.UDFOPNegative</string>

-                      </void> 
-                      <void property="udfName"> 
-                       <string>-</string> 
-                      </void> 
-                     </object> 
+                     <object class="org.apache.hadoop.hive.ql.udf.generic.GenericUDFOPNegative"/>

                     </void> 
                     <void property="typeInfo"> 
                      <object idref="PrimitiveTypeInfo0"/> 
@@ -699,14 +679,7 @@
                  </object> 
                 </void> 
                 <void property="genericUDF"> 
-                 <object class="org.apache.hadoop.hive.ql.udf.generic.GenericUDFBridge">

-                  <void property="udfClassName"> 
-                   <string>org.apache.hadoop.hive.ql.udf.UDFFloor</string> 
-                  </void> 
-                  <void property="udfName"> 
-                   <string>floor</string> 
-                  </void> 
-                 </object> 
+                 <object class="org.apache.hadoop.hive.ql.udf.generic.GenericUDFFloor"/>

                 </void> 
                 <void property="typeInfo"> 
                  <object idref="PrimitiveTypeInfo1"/> 
@@ -731,14 +704,7 @@
                  </object> 
                 </void> 
                 <void property="genericUDF"> 
-                 <object class="org.apache.hadoop.hive.ql.udf.generic.GenericUDFBridge">

-                  <void property="udfClassName"> 
-                   <string>org.apache.hadoop.hive.ql.udf.UDFFloor</string> 
-                  </void> 
-                  <void property="udfName"> 
-                   <string>floor</string> 
-                  </void> 
-                 </object> 
+                 <object class="org.apache.hadoop.hive.ql.udf.generic.GenericUDFFloor"/>

                 </void> 
                 <void property="typeInfo"> 
                  <object idref="PrimitiveTypeInfo1"/> 
@@ -763,14 +729,7 @@
                  </object> 
                 </void> 
                 <void property="genericUDF"> 
-                 <object class="org.apache.hadoop.hive.ql.udf.generic.GenericUDFBridge">

-                  <void property="udfClassName"> 
-                   <string>org.apache.hadoop.hive.ql.udf.UDFFloor</string> 
-                  </void> 
-                  <void property="udfName"> 
-                   <string>floor</string> 
-                  </void> 
-                 </object> 
+                 <object class="org.apache.hadoop.hive.ql.udf.generic.GenericUDFFloor"/>

                 </void> 
                 <void property="typeInfo"> 
                  <object idref="PrimitiveTypeInfo1"/> 
@@ -799,17 +758,7 @@
                      </object> 
                     </void> 
                     <void property="genericUDF"> 
-                     <object class="org.apache.hadoop.hive.ql.udf.generic.GenericUDFBridge">

-                      <void property="operator"> 
-                       <boolean>true</boolean> 
-                      </void> 
-                      <void property="udfClassName"> 
-                       <string>org.apache.hadoop.hive.ql.udf.UDFOPNegative</string>

-                      </void> 
-                      <void property="udfName"> 
-                       <string>-</string> 
-                      </void> 
-                     </object> 
+                     <object class="org.apache.hadoop.hive.ql.udf.generic.GenericUDFOPNegative"/>

                     </void> 
                     <void property="typeInfo"> 
                      <object idref="PrimitiveTypeInfo0"/> 
@@ -869,14 +818,7 @@
                  </object> 
                 </void> 
                 <void property="genericUDF"> 
-                 <object class="org.apache.hadoop.hive.ql.udf.generic.GenericUDFBridge">

-                  <void property="udfClassName"> 
-                   <string>org.apache.hadoop.hive.ql.udf.UDFCeil</string> 
-                  </void> 
-                  <void property="udfName"> 
-                   <string>ceil</string> 
-                  </void> 
-                 </object> 
+                 <object class="org.apache.hadoop.hive.ql.udf.generic.GenericUDFCeil"/>

                 </void> 
                 <void property="typeInfo"> 
                  <object idref="PrimitiveTypeInfo1"/> 
@@ -933,14 +875,7 @@
                  </object> 
                 </void> 
                 <void property="genericUDF"> 
-                 <object class="org.apache.hadoop.hive.ql.udf.generic.GenericUDFBridge">

-                  <void property="udfClassName"> 
-                   <string>org.apache.hadoop.hive.ql.udf.UDFCeil</string> 
-                  </void> 
-                  <void property="udfName"> 
-                   <string>ceiling</string> 
-                  </void> 
-                 </object> 
+                 <object class="org.apache.hadoop.hive.ql.udf.generic.GenericUDFCeil"/>

                 </void> 
                 <void property="typeInfo"> 
                  <object idref="PrimitiveTypeInfo1"/> 
@@ -969,17 +904,7 @@
                      </object> 
                     </void> 
                     <void property="genericUDF"> 
-                     <object class="org.apache.hadoop.hive.ql.udf.generic.GenericUDFBridge">

-                      <void property="operator"> 
-                       <boolean>true</boolean> 
-                      </void> 
-                      <void property="udfClassName"> 
-                       <string>org.apache.hadoop.hive.ql.udf.UDFOPNegative</string>

-                      </void> 
-                      <void property="udfName"> 
-                       <string>-</string> 
-                      </void> 
-                     </object> 
+                     <object class="org.apache.hadoop.hive.ql.udf.generic.GenericUDFOPNegative"/>

                     </void> 
                     <void property="typeInfo"> 
                      <object idref="PrimitiveTypeInfo0"/> 
@@ -989,14 +914,7 @@
                  </object> 
                 </void> 
                 <void property="genericUDF"> 
-                 <object class="org.apache.hadoop.hive.ql.udf.generic.GenericUDFBridge">

-                  <void property="udfClassName"> 
-                   <string>org.apache.hadoop.hive.ql.udf.UDFCeil</string> 
-                  </void> 
-                  <void property="udfName"> 
-                   <string>ceil</string> 
-                  </void> 
-                 </object> 
+                 <object class="org.apache.hadoop.hive.ql.udf.generic.GenericUDFCeil"/>

                 </void> 
                 <void property="typeInfo"> 
                  <object idref="PrimitiveTypeInfo1"/> 
@@ -1021,14 +939,7 @@
                  </object> 
                 </void> 
                 <void property="genericUDF"> 
-                 <object class="org.apache.hadoop.hive.ql.udf.generic.GenericUDFBridge">

-                  <void property="udfClassName"> 
-                   <string>org.apache.hadoop.hive.ql.udf.UDFCeil</string> 
-                  </void> 
-                  <void property="udfName"> 
-                   <string>ceil</string> 
-                  </void> 
-                 </object> 
+                 <object class="org.apache.hadoop.hive.ql.udf.generic.GenericUDFCeil"/>

                 </void> 
                 <void property="typeInfo"> 
                  <object idref="PrimitiveTypeInfo1"/> 
@@ -1067,17 +978,7 @@
                      </object> 
                     </void> 
                     <void property="genericUDF"> 
-                     <object class="org.apache.hadoop.hive.ql.udf.generic.GenericUDFBridge">

-                      <void property="operator"> 
-                       <boolean>true</boolean> 
-                      </void> 
-                      <void property="udfClassName"> 
-                       <string>org.apache.hadoop.hive.ql.udf.UDFOPNegative</string>

-                      </void> 
-                      <void property="udfName"> 
-                       <string>-</string> 
-                      </void> 
-                     </object> 
+                     <object class="org.apache.hadoop.hive.ql.udf.generic.GenericUDFOPNegative"/>

                     </void> 
                     <void property="typeInfo"> 
                      <object idref="PrimitiveTypeInfo2"/> 
@@ -1147,17 +1048,7 @@
                  </object> 
                 </void> 
                 <void property="genericUDF"> 
-                 <object class="org.apache.hadoop.hive.ql.udf.generic.GenericUDFBridge">

-                  <void property="operator"> 
-                   <boolean>true</boolean> 
-                  </void> 
-                  <void property="udfClassName"> 
-                   <string>org.apache.hadoop.hive.ql.udf.UDFOPNegative</string>

-                  </void> 
-                  <void property="udfName"> 
-                   <string>-</string> 
-                  </void> 
-                 </object> 
+                 <object class="org.apache.hadoop.hive.ql.udf.generic.GenericUDFOPNegative"/>

                 </void> 
                 <void property="typeInfo"> 
                  <object idref="PrimitiveTypeInfo2"/> 



Mime
View raw message