hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Franklin Hu" <frank...@fb.com>
Subject Re: Review Request: HIVE-2272: add TIMESTAMP data type
Date Mon, 18 Jul 2011 19:12:08 GMT

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/1135/
-----------------------------------------------------------

(Updated 2011-07-18 19:12:08.745755)


Review request for hive.


Summary (updated)
-------

Adds TIMESTAMP type to serde2 with both string (LazySimple) and binary (LazyBinary) serialization.
Supports SQL style jdbc timestamps of the format with nanosecond precision
YYYY-MM-DD HH:MM:SS[.fff...]


This addresses bug HIVE-2272.
    https://issues.apache.org/jira/browse/HIVE-2272


Diffs
-----

  trunk/serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/primitive/PrimitiveObjectInspectorFactory.java
1146895 
  trunk/serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/primitive/PrimitiveObjectInspectorUtils.java
1146895 
  trunk/serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/primitive/SettableTimestampObjectInspector.java
PRE-CREATION 
  trunk/serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/primitive/TimestampObjectInspector.java
PRE-CREATION 
  trunk/serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/primitive/WritableTimestampObjectInspector.java
PRE-CREATION 
  trunk/serde/src/java/org/apache/hadoop/hive/serde2/lazy/LazyFactory.java 1146895 
  trunk/serde/src/java/org/apache/hadoop/hive/serde2/lazy/LazyTimestamp.java PRE-CREATION

  trunk/serde/src/java/org/apache/hadoop/hive/serde2/lazy/LazyUtils.java 1146895 
  trunk/serde/src/java/org/apache/hadoop/hive/serde2/lazy/objectinspector/primitive/LazyPrimitiveObjectInspectorFactory.java
1146895 
  trunk/serde/src/java/org/apache/hadoop/hive/serde2/lazy/objectinspector/primitive/LazyTimestampObjectInspector.java
PRE-CREATION 
  trunk/serde/src/java/org/apache/hadoop/hive/serde2/lazybinary/LazyBinaryFactory.java 1146895

  trunk/serde/src/java/org/apache/hadoop/hive/serde2/lazybinary/LazyBinarySerDe.java 1146895

  trunk/serde/src/java/org/apache/hadoop/hive/serde2/lazybinary/LazyBinaryTimestamp.java PRE-CREATION

  trunk/serde/src/java/org/apache/hadoop/hive/serde2/lazybinary/LazyBinaryUtils.java 1146895

  trunk/serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/ObjectInspectorConverters.java
1146895 
  trunk/serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/ObjectInspectorUtils.java
1146895 
  trunk/serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/PrimitiveObjectInspector.java
1146895 
  trunk/serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/primitive/JavaTimestampObjectInspector.java
PRE-CREATION 
  trunk/serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/primitive/PrimitiveObjectInspectorConverter.java
1146895 
  trunk/ql/src/test/results/clientpositive/timestamp_3.q.out PRE-CREATION 
  trunk/ql/src/test/results/clientpositive/timestamp_comparison.q.out PRE-CREATION 
  trunk/ql/src/test/results/clientpositive/timestamp_udf.q.out PRE-CREATION 
  trunk/serde/src/java/org/apache/hadoop/hive/serde2/SerDeUtils.java 1146895 
  trunk/serde/src/java/org/apache/hadoop/hive/serde2/binarysortable/BinarySortableSerDe.java
1146895 
  trunk/serde/src/java/org/apache/hadoop/hive/serde2/io/TimestampWritable.java PRE-CREATION

  trunk/ql/src/test/results/clientpositive/timestamp_2.q.out PRE-CREATION 
  trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/UDFToFloat.java 1146895 
  trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/UDFToInteger.java 1146895 
  trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/UDFToLong.java 1146895 
  trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/UDFToShort.java 1146895 
  trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/UDFToString.java 1146895 
  trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/UDFUnixTimeStamp.java 1146895 
  trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/UDFWeekOfYear.java 1146895 
  trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/UDFYear.java 1146895 
  trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFAverage.java 1146895

  trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFContextNGrams.java 1146895

  trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFCorrelation.java 1146895

  trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFCovariance.java 1146895

  trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFCovarianceSample.java
1146895 
  trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFHistogramNumeric.java
1146895 
  trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFPercentileApprox.java
1146895 
  trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFStd.java 1146895 
  trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFStdSample.java 1146895

  trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFSum.java 1146895 
  trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFVariance.java 1146895

  trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFVarianceSample.java 1146895

  trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFnGrams.java 1146895 
  trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFTimestamp.java PRE-CREATION

  trunk/ql/src/test/queries/clientnegative/invalid_t_create3.q 1146895 
  trunk/ql/src/test/queries/clientpositive/timestamp_1.q PRE-CREATION 
  trunk/ql/src/test/queries/clientpositive/timestamp_2.q PRE-CREATION 
  trunk/ql/src/test/queries/clientpositive/timestamp_3.q PRE-CREATION 
  trunk/ql/src/test/queries/clientpositive/timestamp_comparison.q PRE-CREATION 
  trunk/ql/src/test/queries/clientpositive/timestamp_udf.q PRE-CREATION 
  trunk/ql/src/test/results/clientnegative/invalid_create_tbl1.q.out 1146895 
  trunk/ql/src/test/results/clientnegative/invalid_t_alter1.q.out 1146895 
  trunk/ql/src/test/results/clientnegative/invalid_t_alter2.q.out 1146895 
  trunk/ql/src/test/results/clientnegative/invalid_t_create1.q.out 1146895 
  trunk/ql/src/test/results/clientnegative/invalid_t_create2.q.out 1146895 
  trunk/ql/src/test/results/clientnegative/invalid_t_transform.q.out 1146895 
  trunk/ql/src/test/results/clientnegative/wrong_column_type.q.out 1146895 
  trunk/ql/src/test/results/clientpositive/show_functions.q.out 1146895 
  trunk/ql/src/test/results/clientpositive/timestamp_1.q.out PRE-CREATION 
  trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionRegistry.java 1146895 
  trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/DDLSemanticAnalyzer.java 1146895 
  trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/ErrorMsg.java 1146895 
  trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/TypeCheckProcFactory.java 1146895 
  trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/UDFDate.java 1146895 
  trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/UDFDateAdd.java 1146895 
  trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/UDFDateDiff.java 1146895 
  trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/UDFDateSub.java 1146895 
  trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/UDFDayOfMonth.java 1146895 
  trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/UDFHour.java 1146895 
  trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/UDFMinute.java 1146895 
  trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/UDFMonth.java 1146895 
  trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/UDFSecond.java 1146895 
  trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/UDFToBoolean.java 1146895 
  trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/UDFToByte.java 1146895 
  trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/UDFToDouble.java 1146895 

Diff: https://reviews.apache.org/r/1135/diff


Testing
-------

Wrote some unit tests for string/binary serialization. Also ran against test data and looked
consistent


Thanks,

Franklin


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message