hadoop-hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From na...@apache.org
Subject svn commit: r784656 [30/30] - in /hadoop/hive/trunk: ./ common/src/java/org/apache/hadoop/hive/conf/ ql/src/java/org/apache/hadoop/hive/ql/exec/ ql/src/java/org/apache/hadoop/hive/ql/optimizer/ ql/src/java/org/apache/hadoop/hive/ql/parse/ ql/src/java/o...
Date Mon, 15 Jun 2009 05:43:29 GMT
Modified: hadoop/hive/trunk/ql/src/test/results/compiler/plan/union.q.xml
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/test/results/compiler/plan/union.q.xml?rev=784656&r1=784655&r2=784656&view=diff
==============================================================================
--- hadoop/hive/trunk/ql/src/test/results/compiler/plan/union.q.xml (original)
+++ hadoop/hive/trunk/ql/src/test/results/compiler/plan/union.q.xml Mon Jun 15 05:43:22 2009
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?> 
-<java version="1.6.0_07" class="java.beans.XMLDecoder"> 
+<java version="1.6.0_03-p3" class="java.beans.XMLDecoder"> 
  <object id="MapRedTask0" class="org.apache.hadoop.hive.ql.exec.MapRedTask"> 
   <void property="childTasks"> 
    <object class="java.util.ArrayList"> 
@@ -28,7 +28,7 @@
              <boolean>true</boolean> 
             </void> 
             <void property="sourceDir"> 
-             <string>/data/users/njain/hive3/hive3/ql/../build/ql/tmp/201829293/235267702.10000.insclause-0</string>

+             <string>file:/Users/char/Documents/workspace/Hive-460/build/ql/tmp/1370641035/10000</string>

             </void> 
             <void property="targetDir"> 
              <string>../build/ql/test/data/warehouse/union.out</string> 
@@ -109,7 +109,7 @@
            </void> 
            <void method="put"> 
             <string>location</string> 
-            <string>file:/data/users/njain/hive3/hive3/build/ql/test/data/warehouse/src</string>

+            <string>file:/Users/char/Documents/workspace/Hive-460/build/ql/test/data/warehouse/src</string>

            </void> 
           </object> 
          </void> 
@@ -177,7 +177,7 @@
            </void> 
            <void method="put"> 
             <string>location</string> 
-            <string>file:/data/users/njain/hive3/hive3/build/ql/test/data/warehouse/src</string>

+            <string>file:/Users/char/Documents/workspace/Hive-460/build/ql/test/data/warehouse/src</string>

            </void> 
           </object> 
          </void> 
@@ -220,7 +220,7 @@
                                <int>1</int> 
                               </void> 
                               <void property="dirName"> 
-                               <string>/data/users/njain/hive3/hive3/ql/../build/ql/tmp/201829293/235267702.10000.insclause-0</string>

+                               <string>file:/Users/char/Documents/workspace/Hive-460/build/ql/tmp/1370641035/10000</string>

                               </void> 
                               <void property="tableInfo"> 
                                <object class="org.apache.hadoop.hive.ql.plan.tableDesc">

@@ -263,7 +263,7 @@
                                 <void method="add"> 
                                  <object class="org.apache.hadoop.hive.ql.exec.ColumnInfo">

                                   <void property="internalName"> 
-                                   <string>0</string> 
+                                   <string>_col0</string> 
                                   </void> 
                                   <void property="type"> 
                                    <object id="PrimitiveTypeInfo0" class="org.apache.hadoop.hive.serde2.typeinfo.PrimitiveTypeInfo">

@@ -277,7 +277,7 @@
                                 <void method="add"> 
                                  <object class="org.apache.hadoop.hive.ql.exec.ColumnInfo">

                                   <void property="internalName"> 
-                                   <string>1</string> 
+                                   <string>_col1</string> 
                                   </void> 
                                   <void property="type"> 
                                    <object idref="PrimitiveTypeInfo0"/> 
@@ -295,10 +295,10 @@
                         <void property="columnExprMap"> 
                          <object class="java.util.HashMap"> 
                           <void method="put"> 
-                           <string>1</string> 
+                           <string>_col1</string> 
                            <object id="exprNodeColumnDesc0" class="org.apache.hadoop.hive.ql.plan.exprNodeColumnDesc">

                             <void property="column"> 
-                             <string>1</string> 
+                             <string>_col1</string> 
                             </void> 
                             <void property="typeInfo"> 
                              <object idref="PrimitiveTypeInfo0"/> 
@@ -306,10 +306,10 @@
                            </object> 
                           </void> 
                           <void method="put"> 
-                           <string>0</string> 
+                           <string>_col0</string> 
                            <object id="exprNodeColumnDesc1" class="org.apache.hadoop.hive.ql.plan.exprNodeColumnDesc">

                             <void property="column"> 
-                             <string>0</string> 
+                             <string>_col0</string> 
                             </void> 
                             <void property="typeInfo"> 
                              <object idref="PrimitiveTypeInfo0"/> 
@@ -330,6 +330,16 @@
                             </void> 
                            </object> 
                           </void> 
+                          <void property="outputColumnNames"> 
+                           <object class="java.util.ArrayList"> 
+                            <void method="add"> 
+                             <string>_col0</string> 
+                            </void> 
+                            <void method="add"> 
+                             <string>_col1</string> 
+                            </void> 
+                           </object> 
+                          </void> 
                           <void property="selectStar"> 
                            <boolean>true</boolean> 
                           </void> 
@@ -373,7 +383,7 @@
                         <void property="columnExprMap"> 
                          <object class="java.util.HashMap"> 
                           <void method="put"> 
-                           <string>1</string> 
+                           <string>_col1</string> 
                            <object id="exprNodeColumnDesc2" class="org.apache.hadoop.hive.ql.plan.exprNodeColumnDesc">

                             <void property="column"> 
                              <string>value</string> 
@@ -384,7 +394,7 @@
                            </object> 
                           </void> 
                           <void method="put"> 
-                           <string>0</string> 
+                           <string>_col0</string> 
                            <object id="exprNodeColumnDesc3" class="org.apache.hadoop.hive.ql.plan.exprNodeColumnDesc">

                             <void property="column"> 
                              <string>key</string> 
@@ -408,6 +418,16 @@
                             </void> 
                            </object> 
                           </void> 
+                          <void property="outputColumnNames"> 
+                           <object class="java.util.ArrayList"> 
+                            <void method="add"> 
+                             <string>_col0</string> 
+                            </void> 
+                            <void method="add"> 
+                             <string>_col1</string> 
+                            </void> 
+                           </object> 
+                          </void> 
                           <void property="selectStar"> 
                            <boolean>true</boolean> 
                           </void> 
@@ -596,7 +616,7 @@
                             <void method="add"> 
                              <object class="org.apache.hadoop.hive.ql.exec.ColumnInfo">

                               <void property="internalName"> 
-                               <string>0</string> 
+                               <string>_col0</string> 
                               </void> 
                               <void property="type"> 
                                <object idref="PrimitiveTypeInfo0"/> 
@@ -606,7 +626,7 @@
                             <void method="add"> 
                              <object class="org.apache.hadoop.hive.ql.exec.ColumnInfo">

                               <void property="internalName"> 
-                               <string>1</string> 
+                               <string>_col1</string> 
                               </void> 
                               <void property="type"> 
                                <object idref="PrimitiveTypeInfo0"/> 
@@ -628,7 +648,7 @@
                         <void method="add"> 
                          <object id="ColumnInfo0" class="org.apache.hadoop.hive.ql.exec.ColumnInfo">

                           <void property="internalName"> 
-                           <string>0</string> 
+                           <string>_col0</string> 
                           </void> 
                           <void property="type"> 
                            <object idref="PrimitiveTypeInfo0"/> 
@@ -638,7 +658,7 @@
                         <void method="add"> 
                          <object id="ColumnInfo1" class="org.apache.hadoop.hive.ql.exec.ColumnInfo">

                           <void property="internalName"> 
-                           <string>1</string> 
+                           <string>_col1</string> 
                           </void> 
                           <void property="type"> 
                            <object idref="PrimitiveTypeInfo0"/> 
@@ -656,7 +676,7 @@
                 <void property="columnExprMap"> 
                  <object class="java.util.HashMap"> 
                   <void method="put"> 
-                   <string>1</string> 
+                   <string>_col1</string> 
                    <object id="exprNodeColumnDesc4" class="org.apache.hadoop.hive.ql.plan.exprNodeColumnDesc">

                     <void property="column"> 
                      <string>value</string> 
@@ -667,7 +687,7 @@
                    </object> 
                   </void> 
                   <void method="put"> 
-                   <string>0</string> 
+                   <string>_col0</string> 
                    <object id="exprNodeColumnDesc5" class="org.apache.hadoop.hive.ql.plan.exprNodeColumnDesc">

                     <void property="column"> 
                      <string>key</string> 
@@ -691,6 +711,16 @@
                     </void> 
                    </object> 
                   </void> 
+                  <void property="outputColumnNames"> 
+                   <object class="java.util.ArrayList"> 
+                    <void method="add"> 
+                     <string>_col0</string> 
+                    </void> 
+                    <void method="add"> 
+                     <string>_col1</string> 
+                    </void> 
+                   </object> 
+                  </void> 
                  </object> 
                 </void> 
                 <void property="parentOperators"> 
@@ -874,7 +904,7 @@
     <void property="pathToAliases"> 
      <object class="java.util.LinkedHashMap"> 
       <void method="put"> 
-       <string>file:/data/users/njain/hive3/hive3/build/ql/test/data/warehouse/src</string>

+       <string>file:/Users/char/Documents/workspace/Hive-460/build/ql/test/data/warehouse/src</string>

        <object class="java.util.ArrayList"> 
         <void method="add"> 
          <string>null-subquery1:unioninput-subquery1:src</string> 
@@ -889,7 +919,7 @@
     <void property="pathToPartitionInfo"> 
      <object class="java.util.LinkedHashMap"> 
       <void method="put"> 
-       <string>file:/data/users/njain/hive3/hive3/build/ql/test/data/warehouse/src</string>

+       <string>file:/Users/char/Documents/workspace/Hive-460/build/ql/test/data/warehouse/src</string>

        <object class="org.apache.hadoop.hive.ql.plan.partitionDesc"> 
         <void property="partSpec"> 
          <object idref="LinkedHashMap0"/> 

Modified: hadoop/hive/trunk/serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/MetadataListStructObjectInspector.java
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/MetadataListStructObjectInspector.java?rev=784656&r1=784655&r2=784656&view=diff
==============================================================================
--- hadoop/hive/trunk/serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/MetadataListStructObjectInspector.java
(original)
+++ hadoop/hive/trunk/serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/MetadataListStructObjectInspector.java
Mon Jun 15 05:43:22 2009
@@ -38,9 +38,9 @@
 
   static HashMap<List<String>, MetadataListStructObjectInspector> cached
      = new HashMap<List<String>, MetadataListStructObjectInspector>();
-  public static MetadataListStructObjectInspector getInstance(int fields) {
-    return getInstance(ObjectInspectorUtils.getIntegerArray(fields));
-  }
+//  public static MetadataListStructObjectInspector getInstance(int fields) {
+//    return getInstance(ObjectInspectorUtils.getIntegerArray(fields));
+//  }
   public static MetadataListStructObjectInspector getInstance(List<String> columnNames)
{
     MetadataListStructObjectInspector result = cached.get(columnNames);
     if (result == null) {

Modified: hadoop/hive/trunk/serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/ObjectInspectorUtils.java
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/ObjectInspectorUtils.java?rev=784656&r1=784655&r2=784656&view=diff
==============================================================================
--- hadoop/hive/trunk/serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/ObjectInspectorUtils.java
(original)
+++ hadoop/hive/trunk/serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/ObjectInspectorUtils.java
Mon Jun 15 05:43:22 2009
@@ -60,24 +60,6 @@
   
   
   static ArrayList<ArrayList<String>> integerArrayCache = new ArrayList<ArrayList<String>>();
-  /**
-   * Returns an array of Integer strings, starting from "0".
-   * This function caches the arrays to provide a better performance. 
-   */
-  public static ArrayList<String> getIntegerArray(int size) {
-    while (integerArrayCache.size() <= size) {
-      integerArrayCache.add(null);
-    }
-    ArrayList<String> result = integerArrayCache.get(size);
-    if (result == null) {
-      result = new ArrayList<String>();
-      for (int i=0; i<size; i++) {
-        result.add(Integer.valueOf(i).toString());
-      }
-      integerArrayCache.set(size, result);
-    }
-    return result;
-  }
 
   static ArrayList<String> integerCSVCache = new ArrayList<String>(); 
   public static String getIntegerCSV(int size) {

Modified: hadoop/hive/trunk/serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/StandardStructObjectInspector.java
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/StandardStructObjectInspector.java?rev=784656&r1=784655&r2=784656&view=diff
==============================================================================
--- hadoop/hive/trunk/serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/StandardStructObjectInspector.java
(original)
+++ hadoop/hive/trunk/serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/StandardStructObjectInspector.java
Mon Jun 15 05:43:22 2009
@@ -118,6 +118,9 @@
     // We support both List<Object> and Object[]
     // so we have to do differently.
     boolean isArray = data.getClass().isArray();
+    if(!isArray && !(data instanceof List)) {
+      return data;
+    }
     int listSize = (isArray
         ? ((Object[])data).length
         : ((List<Object>)data).size());



Mime
View raw message