hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xu...@apache.org
Subject svn commit: r1576858 - in /hive/trunk/ql/src: java/org/apache/hadoop/hive/ql/io/parquet/serde/ test/queries/clientnegative/ test/results/clientnegative/
Date Wed, 12 Mar 2014 19:02:33 GMT
Author: xuefu
Date: Wed Mar 12 19:02:33 2014
New Revision: 1576858

URL: http://svn.apache.org/r1576858
Log:
HIVE-6457: Ensure Parquet integration has good error messages for data types not supported
(Brock via Xuefu)

Added:
    hive/trunk/ql/src/test/queries/clientnegative/parquet_char.q
    hive/trunk/ql/src/test/queries/clientnegative/parquet_date.q
    hive/trunk/ql/src/test/queries/clientnegative/parquet_decimal.q
    hive/trunk/ql/src/test/queries/clientnegative/parquet_timestamp.q
    hive/trunk/ql/src/test/queries/clientnegative/parquet_varchar.q
    hive/trunk/ql/src/test/results/clientnegative/parquet_char.q.out
    hive/trunk/ql/src/test/results/clientnegative/parquet_date.q.out
    hive/trunk/ql/src/test/results/clientnegative/parquet_decimal.q.out
    hive/trunk/ql/src/test/results/clientnegative/parquet_timestamp.q.out
    hive/trunk/ql/src/test/results/clientnegative/parquet_varchar.q.out
Modified:
    hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/io/parquet/serde/ArrayWritableObjectInspector.java

Modified: hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/io/parquet/serde/ArrayWritableObjectInspector.java
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/io/parquet/serde/ArrayWritableObjectInspector.java?rev=1576858&r1=1576857&r2=1576858&view=diff
==============================================================================
--- hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/io/parquet/serde/ArrayWritableObjectInspector.java
(original)
+++ hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/io/parquet/serde/ArrayWritableObjectInspector.java
Wed Mar 12 19:02:33 2014
@@ -19,6 +19,7 @@ import java.util.HashMap;
 import java.util.List;
 
 import org.apache.hadoop.hive.ql.io.parquet.serde.primitive.ParquetPrimitiveInspectorFactory;
+import org.apache.hadoop.hive.serde.serdeConstants;
 import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector;
 import org.apache.hadoop.hive.serde2.objectinspector.SettableStructObjectInspector;
 import org.apache.hadoop.hive.serde2.objectinspector.StructField;
@@ -89,14 +90,22 @@ public class ArrayWritableObjectInspecto
       } else {
         return new StandardParquetHiveMapInspector(getObjectInspector(keyTypeInfo), getObjectInspector(valueTypeInfo));
       }
-    } else if (typeInfo.equals(TypeInfoFactory.timestampTypeInfo)) {
-      throw new UnsupportedOperationException("timestamp not implemented yet");
     } else if (typeInfo.equals(TypeInfoFactory.byteTypeInfo)) {
       return ParquetPrimitiveInspectorFactory.parquetByteInspector;
     } else if (typeInfo.equals(TypeInfoFactory.shortTypeInfo)) {
       return ParquetPrimitiveInspectorFactory.parquetShortInspector;
+    } else if (typeInfo.equals(TypeInfoFactory.timestampTypeInfo)) {
+      throw new UnsupportedOperationException("Parquet does not support timestamp. See HIVE-6384");
+    } else if (typeInfo.equals(TypeInfoFactory.dateTypeInfo)) {
+      throw new UnsupportedOperationException("Parquet does not support date. See HIVE-6384");
+    } else if (typeInfo.getTypeName().toLowerCase().startsWith(serdeConstants.DECIMAL_TYPE_NAME))
{
+      throw new UnsupportedOperationException("Parquet does not support decimal. See HIVE-6384");
+    } else if (typeInfo.getTypeName().toLowerCase().startsWith(serdeConstants.CHAR_TYPE_NAME))
{
+      throw new UnsupportedOperationException("Parquet does not support char. See HIVE-6384");
+    } else if (typeInfo.getTypeName().toLowerCase().startsWith(serdeConstants.VARCHAR_TYPE_NAME))
{
+      throw new UnsupportedOperationException("Parquet does not support varchar. See HIVE-6384");
     } else {
-      throw new IllegalArgumentException("Unknown field info: " + typeInfo);
+      throw new UnsupportedOperationException("Unknown field type: " + typeInfo);
     }
 
   }

Added: hive/trunk/ql/src/test/queries/clientnegative/parquet_char.q
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/queries/clientnegative/parquet_char.q?rev=1576858&view=auto
==============================================================================
--- hive/trunk/ql/src/test/queries/clientnegative/parquet_char.q (added)
+++ hive/trunk/ql/src/test/queries/clientnegative/parquet_char.q Wed Mar 12 19:02:33 2014
@@ -0,0 +1,3 @@
+drop table if exists parquet_char;
+
+create table parquet_char (t char(10)) stored as parquet;

Added: hive/trunk/ql/src/test/queries/clientnegative/parquet_date.q
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/queries/clientnegative/parquet_date.q?rev=1576858&view=auto
==============================================================================
--- hive/trunk/ql/src/test/queries/clientnegative/parquet_date.q (added)
+++ hive/trunk/ql/src/test/queries/clientnegative/parquet_date.q Wed Mar 12 19:02:33 2014
@@ -0,0 +1,3 @@
+drop table if exists parquet_date;
+
+create table parquet_date (t date) stored as parquet;

Added: hive/trunk/ql/src/test/queries/clientnegative/parquet_decimal.q
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/queries/clientnegative/parquet_decimal.q?rev=1576858&view=auto
==============================================================================
--- hive/trunk/ql/src/test/queries/clientnegative/parquet_decimal.q (added)
+++ hive/trunk/ql/src/test/queries/clientnegative/parquet_decimal.q Wed Mar 12 19:02:33 2014
@@ -0,0 +1,3 @@
+drop table if exists parquet_decimal;
+
+create table parquet_decimal (t decimal(4,2)) stored as parquet;

Added: hive/trunk/ql/src/test/queries/clientnegative/parquet_timestamp.q
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/queries/clientnegative/parquet_timestamp.q?rev=1576858&view=auto
==============================================================================
--- hive/trunk/ql/src/test/queries/clientnegative/parquet_timestamp.q (added)
+++ hive/trunk/ql/src/test/queries/clientnegative/parquet_timestamp.q Wed Mar 12 19:02:33
2014
@@ -0,0 +1,3 @@
+drop table if exists parquet_timestamp;
+
+create table parquet_timestamp (t timestamp) stored as parquet;

Added: hive/trunk/ql/src/test/queries/clientnegative/parquet_varchar.q
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/queries/clientnegative/parquet_varchar.q?rev=1576858&view=auto
==============================================================================
--- hive/trunk/ql/src/test/queries/clientnegative/parquet_varchar.q (added)
+++ hive/trunk/ql/src/test/queries/clientnegative/parquet_varchar.q Wed Mar 12 19:02:33 2014
@@ -0,0 +1,3 @@
+drop table if exists parquet_varchar;
+
+create table parquet_varchar (t varchar(10)) stored as parquet;

Added: hive/trunk/ql/src/test/results/clientnegative/parquet_char.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientnegative/parquet_char.q.out?rev=1576858&view=auto
==============================================================================
--- hive/trunk/ql/src/test/results/clientnegative/parquet_char.q.out (added)
+++ hive/trunk/ql/src/test/results/clientnegative/parquet_char.q.out Wed Mar 12 19:02:33 2014
@@ -0,0 +1,8 @@
+PREHOOK: query: drop table if exists parquet_char
+PREHOOK: type: DROPTABLE
+POSTHOOK: query: drop table if exists parquet_char
+POSTHOOK: type: DROPTABLE
+PREHOOK: query: create table parquet_char (t char(10)) stored as parquet
+PREHOOK: type: CREATETABLE
+PREHOOK: Output: database:default
+FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. java.lang.UnsupportedOperationException:
Parquet does not support char. See HIVE-6384

Added: hive/trunk/ql/src/test/results/clientnegative/parquet_date.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientnegative/parquet_date.q.out?rev=1576858&view=auto
==============================================================================
--- hive/trunk/ql/src/test/results/clientnegative/parquet_date.q.out (added)
+++ hive/trunk/ql/src/test/results/clientnegative/parquet_date.q.out Wed Mar 12 19:02:33 2014
@@ -0,0 +1,8 @@
+PREHOOK: query: drop table if exists parquet_date
+PREHOOK: type: DROPTABLE
+POSTHOOK: query: drop table if exists parquet_date
+POSTHOOK: type: DROPTABLE
+PREHOOK: query: create table parquet_date (t date) stored as parquet
+PREHOOK: type: CREATETABLE
+PREHOOK: Output: database:default
+FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. java.lang.UnsupportedOperationException:
Parquet does not support date. See HIVE-6384

Added: hive/trunk/ql/src/test/results/clientnegative/parquet_decimal.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientnegative/parquet_decimal.q.out?rev=1576858&view=auto
==============================================================================
--- hive/trunk/ql/src/test/results/clientnegative/parquet_decimal.q.out (added)
+++ hive/trunk/ql/src/test/results/clientnegative/parquet_decimal.q.out Wed Mar 12 19:02:33
2014
@@ -0,0 +1,8 @@
+PREHOOK: query: drop table if exists parquet_decimal
+PREHOOK: type: DROPTABLE
+POSTHOOK: query: drop table if exists parquet_decimal
+POSTHOOK: type: DROPTABLE
+PREHOOK: query: create table parquet_decimal (t decimal(4,2)) stored as parquet
+PREHOOK: type: CREATETABLE
+PREHOOK: Output: database:default
+FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. java.lang.UnsupportedOperationException:
Parquet does not support decimal. See HIVE-6384

Added: hive/trunk/ql/src/test/results/clientnegative/parquet_timestamp.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientnegative/parquet_timestamp.q.out?rev=1576858&view=auto
==============================================================================
--- hive/trunk/ql/src/test/results/clientnegative/parquet_timestamp.q.out (added)
+++ hive/trunk/ql/src/test/results/clientnegative/parquet_timestamp.q.out Wed Mar 12 19:02:33
2014
@@ -0,0 +1,8 @@
+PREHOOK: query: drop table if exists parquet_timestamp
+PREHOOK: type: DROPTABLE
+POSTHOOK: query: drop table if exists parquet_timestamp
+POSTHOOK: type: DROPTABLE
+PREHOOK: query: create table parquet_timestamp (t timestamp) stored as parquet
+PREHOOK: type: CREATETABLE
+PREHOOK: Output: database:default
+FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. java.lang.UnsupportedOperationException:
Parquet does not support timestamp. See HIVE-6384

Added: hive/trunk/ql/src/test/results/clientnegative/parquet_varchar.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientnegative/parquet_varchar.q.out?rev=1576858&view=auto
==============================================================================
--- hive/trunk/ql/src/test/results/clientnegative/parquet_varchar.q.out (added)
+++ hive/trunk/ql/src/test/results/clientnegative/parquet_varchar.q.out Wed Mar 12 19:02:33
2014
@@ -0,0 +1,8 @@
+PREHOOK: query: drop table if exists parquet_varchar
+PREHOOK: type: DROPTABLE
+POSTHOOK: query: drop table if exists parquet_varchar
+POSTHOOK: type: DROPTABLE
+PREHOOK: query: create table parquet_varchar (t varchar(10)) stored as parquet
+PREHOOK: type: CREATETABLE
+PREHOOK: Output: database:default
+FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. java.lang.UnsupportedOperationException:
Parquet does not support varchar. See HIVE-6384



Mime
View raw message