You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "jiraposter@reviews.apache.org (JIRA)" <ji...@apache.org> on 2011/08/06 00:40:28 UTC

[jira] [Commented] (HIVE-2272) add TIMESTAMP data type

    [ https://issues.apache.org/jira/browse/HIVE-2272?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13080273#comment-13080273 ] 

jiraposter@reviews.apache.org commented on HIVE-2272:
-----------------------------------------------------


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



trunk/common/src/java/org/apache/hadoop/hive/conf/HiveConf.java
<https://reviews.apache.org/r/1135/#comment2918>

    I think we should put default timezone to be UTC and we internally in facebook have PST as default.



trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/BaseSemanticAnalyzer.java
<https://reviews.apache.org/r/1135/#comment2922>

    Only loading it in client side is sufficient?


- Siying


On 2011-07-28 21:59:38, Franklin Hu wrote:
bq.  
bq.  -----------------------------------------------------------
bq.  This is an automatically generated e-mail. To reply, visit:
bq.  https://reviews.apache.org/r/1135/
bq.  -----------------------------------------------------------
bq.  
bq.  (Updated 2011-07-28 21:59:38)
bq.  
bq.  
bq.  Review request for hive, Yongqiang He, Ning Zhang, and Siying Dong.
bq.  
bq.  
bq.  Summary
bq.  -------
bq.  
bq.  Adds TIMESTAMP type to serde2 with both string (LazySimple) and binary (LazyBinary) serialization.
bq.  Supports SQL style jdbc timestamps of the format with nanosecond precision
bq.  YYYY-MM-DD HH:MM:SS[.fff...]
bq.  
bq.  
bq.  This addresses bug HIVE-2272.
bq.      https://issues.apache.org/jira/browse/HIVE-2272
bq.  
bq.  
bq.  Diffs
bq.  -----
bq.  
bq.    trunk/common/src/java/org/apache/hadoop/hive/conf/HiveConf.java 1152003 
bq.    trunk/conf/hive-default.xml 1152003 
bq.    trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionRegistry.java 1152003 
bq.    trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/BaseSemanticAnalyzer.java 1152003 
bq.    trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/DDLSemanticAnalyzer.java 1152003 
bq.    trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/ErrorMsg.java 1152003 
bq.    trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/TypeCheckProcFactory.java 1152003 
bq.    trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/UDFDate.java 1152003 
bq.    trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/UDFDateAdd.java 1152003 
bq.    trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/UDFDateDiff.java 1152003 
bq.    trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/UDFDateSub.java 1152003 
bq.    trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/UDFDayOfMonth.java 1152003 
bq.    trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/UDFHour.java 1152003 
bq.    trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/UDFMinute.java 1152003 
bq.    trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/UDFMonth.java 1152003 
bq.    trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/UDFSecond.java 1152003 
bq.    trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/UDFToBoolean.java 1152003 
bq.    trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/UDFToByte.java 1152003 
bq.    trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/UDFToDouble.java 1152003 
bq.    trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/UDFToFloat.java 1152003 
bq.    trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/UDFToInteger.java 1152003 
bq.    trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/UDFToLong.java 1152003 
bq.    trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/UDFToShort.java 1152003 
bq.    trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/UDFToString.java 1152003 
bq.    trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/UDFUnixTimeStamp.java 1152003 
bq.    trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/UDFWeekOfYear.java 1152003 
bq.    trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/UDFYear.java 1152003 
bq.    trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFAverage.java 1152003 
bq.    trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFContextNGrams.java 1152003 
bq.    trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFCorrelation.java 1152003 
bq.    trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFCovariance.java 1152003 
bq.    trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFCovarianceSample.java 1152003 
bq.    trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFHistogramNumeric.java 1152003 
bq.    trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFPercentileApprox.java 1152003 
bq.    trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFStd.java 1152003 
bq.    trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFStdSample.java 1152003 
bq.    trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFSum.java 1152003 
bq.    trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFVariance.java 1152003 
bq.    trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFVarianceSample.java 1152003 
bq.    trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFnGrams.java 1152003 
bq.    trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFFromUtcTimestamp.java PRE-CREATION 
bq.    trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFTimestamp.java PRE-CREATION 
bq.    trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFToUtcTimestamp.java PRE-CREATION 
bq.    trunk/ql/src/test/queries/clientnegative/invalid_t_create3.q 1152003 
bq.    trunk/ql/src/test/queries/clientpositive/timestamp_1.q PRE-CREATION 
bq.    trunk/ql/src/test/queries/clientpositive/timestamp_2.q PRE-CREATION 
bq.    trunk/ql/src/test/queries/clientpositive/timestamp_3.q PRE-CREATION 
bq.    trunk/ql/src/test/queries/clientpositive/timestamp_comparison.q PRE-CREATION 
bq.    trunk/ql/src/test/queries/clientpositive/timestamp_udf.q PRE-CREATION 
bq.    trunk/ql/src/test/results/clientnegative/invalid_create_tbl1.q.out 1152003 
bq.    trunk/ql/src/test/results/clientnegative/invalid_t_alter1.q.out 1152003 
bq.    trunk/ql/src/test/results/clientnegative/invalid_t_alter2.q.out 1152003 
bq.    trunk/ql/src/test/results/clientnegative/invalid_t_create1.q.out 1152003 
bq.    trunk/ql/src/test/results/clientnegative/invalid_t_create2.q.out 1152003 
bq.    trunk/ql/src/test/results/clientnegative/invalid_t_transform.q.out 1152003 
bq.    trunk/ql/src/test/results/clientnegative/wrong_column_type.q.out 1152003 
bq.    trunk/ql/src/test/results/clientpositive/show_functions.q.out 1152003 
bq.    trunk/ql/src/test/results/clientpositive/timestamp_1.q.out PRE-CREATION 
bq.    trunk/ql/src/test/results/clientpositive/timestamp_2.q.out PRE-CREATION 
bq.    trunk/ql/src/test/results/clientpositive/timestamp_3.q.out PRE-CREATION 
bq.    trunk/ql/src/test/results/clientpositive/timestamp_comparison.q.out PRE-CREATION 
bq.    trunk/ql/src/test/results/clientpositive/timestamp_udf.q.out PRE-CREATION 
bq.    trunk/serde/src/java/org/apache/hadoop/hive/serde2/SerDeUtils.java 1152003 
bq.    trunk/serde/src/java/org/apache/hadoop/hive/serde2/binarysortable/BinarySortableSerDe.java 1152003 
bq.    trunk/serde/src/java/org/apache/hadoop/hive/serde2/io/TimestampWritable.java PRE-CREATION 
bq.    trunk/serde/src/java/org/apache/hadoop/hive/serde2/lazy/LazyFactory.java 1152003 
bq.    trunk/serde/src/java/org/apache/hadoop/hive/serde2/lazy/LazyTimestamp.java PRE-CREATION 
bq.    trunk/serde/src/java/org/apache/hadoop/hive/serde2/lazy/LazyUtils.java 1152003 
bq.    trunk/serde/src/java/org/apache/hadoop/hive/serde2/lazy/objectinspector/primitive/LazyPrimitiveObjectInspectorFactory.java 1152003 
bq.    trunk/serde/src/java/org/apache/hadoop/hive/serde2/lazy/objectinspector/primitive/LazyTimestampObjectInspector.java PRE-CREATION 
bq.    trunk/serde/src/java/org/apache/hadoop/hive/serde2/lazybinary/LazyBinaryFactory.java 1152003 
bq.    trunk/serde/src/java/org/apache/hadoop/hive/serde2/lazybinary/LazyBinarySerDe.java 1152003 
bq.    trunk/serde/src/java/org/apache/hadoop/hive/serde2/lazybinary/LazyBinaryTimestamp.java PRE-CREATION 
bq.    trunk/serde/src/java/org/apache/hadoop/hive/serde2/lazybinary/LazyBinaryUtils.java 1152003 
bq.    trunk/serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/ObjectInspectorConverters.java 1152003 
bq.    trunk/serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/ObjectInspectorUtils.java 1152003 
bq.    trunk/serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/PrimitiveObjectInspector.java 1152003 
bq.    trunk/serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/primitive/JavaTimestampObjectInspector.java PRE-CREATION 
bq.    trunk/serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/primitive/PrimitiveObjectInspectorConverter.java 1152003 
bq.    trunk/serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/primitive/PrimitiveObjectInspectorFactory.java 1152003 
bq.    trunk/serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/primitive/PrimitiveObjectInspectorUtils.java 1152003 
bq.    trunk/serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/primitive/SettableTimestampObjectInspector.java PRE-CREATION 
bq.    trunk/serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/primitive/TimestampObjectInspector.java PRE-CREATION 
bq.    trunk/serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/primitive/WritableTimestampObjectInspector.java PRE-CREATION 
bq.    trunk/serde/src/java/org/apache/hadoop/hive/serde2/typeinfo/TypeInfoFactory.java 1152003 
bq.  
bq.  Diff: https://reviews.apache.org/r/1135/diff
bq.  
bq.  
bq.  Testing
bq.  -------
bq.  
bq.  Wrote some unit tests for string/binary serialization. Also ran against test data and looked consistent
bq.  
bq.  
bq.  Thanks,
bq.  
bq.  Franklin
bq.  
bq.



> add TIMESTAMP data type
> -----------------------
>
>                 Key: HIVE-2272
>                 URL: https://issues.apache.org/jira/browse/HIVE-2272
>             Project: Hive
>          Issue Type: New Feature
>            Reporter: Franklin Hu
>            Assignee: Franklin Hu
>             Fix For: 0.8.0
>
>         Attachments: hive-2272.1.patch, hive-2272.2.patch, hive-2272.3.patch, hive-2272.4.patch, hive-2272.5.patch, hive-2272.6.patch, hive-2272.7.patch, hive-2272.8.patch, hive-2272.9.patch
>
>
> Add TIMESTAMP type to serde2 that supports unix timestamp (1970-01-01 00:00:01 UTC to 2038-01-19 03:14:07 UTC) with optional nanosecond precision using both LazyBinary and LazySimple SerDes. 
> For LazySimpleSerDe, the data is stored in jdbc compliant java.sql.Timestamp parsable strings.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira