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

Hive QA commented on HIVE-12192:
--------------------------------



Here are the results of testing the latest attachment:
https://issues.apache.org/jira/secure/attachment/12926360/HIVE-12192.09.patch

{color:green}SUCCESS:{color} +1 due to 72 test(s) being added or modified.

{color:red}ERROR:{color} -1 due to 60 failed/errored test(s), 14466 tests 
executed
*Failed tests:*
{noformat}
org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver[vectorized_timestamp_funcs]
 (batchId=31)
org.apache.hadoop.hive.cli.TestMiniLlapLocalCliDriver.testCliDriver[vectorized_timestamp_funcs]
 (batchId=161)
org.apache.hadoop.hive.cli.TestSparkCliDriver.testCliDriver[vectorized_timestamp_funcs]
 (batchId=121)
org.apache.hadoop.hive.ql.exec.tez.TestWorkloadManager.testAsyncSessionInitFailures
 (batchId=295)
org.apache.hadoop.hive.ql.exec.vector.expressions.TestVectorCastStatement.testDecimal
 (batchId=293)
org.apache.hadoop.hive.ql.exec.vector.expressions.TestVectorDateExpressions.testVectorUDFDayOfMonth
 (batchId=290)
org.apache.hadoop.hive.ql.exec.vector.expressions.TestVectorDateExpressions.testVectorUDFMonth
 (batchId=290)
org.apache.hadoop.hive.ql.exec.vector.expressions.TestVectorDateExpressions.testVectorUDFWeekOfYear
 (batchId=290)
org.apache.hadoop.hive.ql.exec.vector.expressions.TestVectorDateExpressions.testVectorUDFYear
 (batchId=290)
org.apache.hadoop.hive.ql.io.orc.TestVectorizedORCReader.createFile 
(batchId=279)
org.apache.hadoop.hive.ql.io.parquet.serde.TestParquetTimestampUtils.testTimezoneValues
 (batchId=277)
org.apache.hadoop.hive.ql.io.parquet.serde.TestParquetTimestampUtils.testTimezoneless
 (batchId=277)
org.apache.hadoop.hive.ql.io.parquet.serde.TestParquetTimestampUtils.testTimezonelessValues
 (batchId=277)
org.apache.hadoop.hive.ql.parse.TestSemanticAnalyzer.testNormalizeColSpec 
(batchId=280)
org.apache.hadoop.hive.ql.udf.TestUDFDateFormatGranularity.testTimestampToTimestampWithGranularity
 (batchId=273)
org.apache.hadoop.hive.ql.udf.generic.TestGenericUDFDate.testDateWritablepToDate
 (batchId=270)
org.apache.hadoop.hive.ql.udf.generic.TestGenericUDFDate.testTimestampToDate 
(batchId=270)
org.apache.hadoop.hive.ql.udf.generic.TestGenericUDFDateAdd.testByteDataTypeAsDays
 (batchId=267)
org.apache.hadoop.hive.ql.udf.generic.TestGenericUDFDateAdd.testDateWritablepToDate
 (batchId=267)
org.apache.hadoop.hive.ql.udf.generic.TestGenericUDFDateAdd.testShortDataTypeAsDays
 (batchId=267)
org.apache.hadoop.hive.ql.udf.generic.TestGenericUDFDateAdd.testTimestampToDate 
(batchId=267)
org.apache.hadoop.hive.ql.udf.generic.TestGenericUDFDateFormat.testWrongDateStr 
(batchId=268)
org.apache.hadoop.hive.ql.udf.generic.TestGenericUDFDateSub.testByteDataTypeAsDays
 (batchId=270)
org.apache.hadoop.hive.ql.udf.generic.TestGenericUDFDateSub.testDateWritablepToDate
 (batchId=270)
org.apache.hadoop.hive.ql.udf.generic.TestGenericUDFDateSub.testShortDataTypeAsDays
 (batchId=270)
org.apache.hadoop.hive.ql.udf.generic.TestGenericUDFDateSub.testTimestampToDate 
(batchId=270)
org.apache.hadoop.hive.ql.udf.generic.TestGenericUDFFromUtcTimestamp.testFromUtcTimestamp
 (batchId=270)
org.apache.hadoop.hive.ql.udf.generic.TestGenericUDFFromUtcTimestamp.testToUtcTimestamp
 (batchId=270)
org.apache.hadoop.hive.ql.udf.generic.TestGenericUDFLastDay.testWrongDateStr 
(batchId=269)
org.apache.hadoop.hive.ql.udf.generic.TestGenericUDFLastDay.testWrongTsStr 
(batchId=269)
org.apache.hadoop.hive.ql.udf.generic.TestGenericUDFMonthsBetween.testWrongDateStr
 (batchId=271)
org.apache.hadoop.hive.ql.udf.generic.TestGenericUDFNextDay.testNotValidValues 
(batchId=271)
org.apache.hadoop.hive.ql.udf.generic.TestGenericUDFOPMinus.testTimestampMinusIntervalDayTime
 (batchId=268)
org.apache.hadoop.hive.ql.udf.generic.TestGenericUDFOPPlus.testDatePlusIntervalDayTime
 (batchId=267)
org.apache.hadoop.hive.ql.udf.generic.TestGenericUDFOPPlus.testIntervalDayTimePlusDate
 (batchId=267)
org.apache.hadoop.hive.ql.udf.generic.TestGenericUDFOPPlus.testIntervalDayTimePlusTimestamp
 (batchId=267)
org.apache.hadoop.hive.ql.udf.generic.TestGenericUDFOPPlus.testTimestampPlusIntervalDayTime
 (batchId=267)
org.apache.hadoop.hive.ql.udf.generic.TestGenericUDFQuarter.testWrongDateStr 
(batchId=271)
org.apache.hadoop.hive.ql.util.TestDateTimeMath.testTimestampIntervalDayTimeArithmetic
 (batchId=265)
org.apache.hadoop.hive.ql.util.TestDateTimeMath.testTimestampIntervalYearMonthArithmetic
 (batchId=265)
org.apache.hadoop.hive.ql.util.TestDateTimeMath.testTimestampSubtraction 
(batchId=265)
org.apache.hadoop.hive.serde2.io.TestTimestampWritable.testDecimalToTimestampCornerCases
 (batchId=307)
org.apache.hadoop.hive.serde2.io.TestTimestampWritable.testDecimalToTimestampRandomly
 (batchId=307)
org.apache.hadoop.hive.serde2.io.TestTimestampWritable.testToFromDouble 
(batchId=307)
org.apache.hadoop.hive.serde2.lazy.TestLazyPrimitive.testLazyDate (batchId=307)
org.apache.hadoop.hive.serde2.lazy.TestLazyPrimitive.testLazyTimestamp 
(batchId=307)
org.apache.hadoop.hive.serde2.objectinspector.TestStandardObjectInspectors.testStandardPrimitiveObjectInspector
 (batchId=308)
org.apache.hadoop.hive.serde2.objectinspector.primitive.TestPrimitiveObjectInspectorUtils.testGetTimestampFromString
 (batchId=308)
org.apache.hadoop.hive.serde2.objectinspector.primitive.TestPrimitiveObjectInspectorUtils.testgetTimestampWithMillisecondsInt
 (batchId=308)
org.apache.hadoop.hive.serde2.objectinspector.primitive.TestPrimitiveObjectInspectorUtils.testgetTimestampWithSecondsInt
 (batchId=308)
org.apache.hive.hcatalog.data.TestDefaultHCatRecord.testRYW (batchId=205)
org.apache.hive.hcatalog.data.TestJsonSerDe.testRW (batchId=205)
org.apache.hive.hcatalog.data.TestJsonSerDe.testRobustRead (batchId=205)
org.apache.hive.hcatalog.pig.TestOrcHCatStorer.testWriteTimestamp (batchId=197)
org.apache.hive.hcatalog.pig.TestParquetHCatStorer.testWriteTimestamp 
(batchId=197)
org.apache.hive.hcatalog.pig.TestRCFileHCatStorer.testWriteTimestamp 
(batchId=197)
org.apache.hive.hcatalog.pig.TestSequenceFileHCatStorer.testWriteTimestamp 
(batchId=197)
org.apache.hive.hcatalog.pig.TestTextFileHCatStorer.testWriteTimestamp 
(batchId=197)
org.apache.hive.jdbc.TestJdbcWithMiniLlapArrow.testDataTypes (batchId=241)
org.apache.hive.jdbc.TestJdbcWithMiniLlapRow.testDataTypes (batchId=241)
{noformat}

Test results: 
https://builds.apache.org/job/PreCommit-HIVE-Build/11517/testReport
Console output: https://builds.apache.org/job/PreCommit-HIVE-Build/11517/console
Test logs: http://104.198.109.242/logs/PreCommit-HIVE-Build-11517/

Messages:
{noformat}
Executing org.apache.hive.ptest.execution.TestCheckPhase
Executing org.apache.hive.ptest.execution.PrepPhase
Executing org.apache.hive.ptest.execution.YetusPhase
Executing org.apache.hive.ptest.execution.ExecutionPhase
Executing org.apache.hive.ptest.execution.ReportingPhase
Tests exited with: TestsFailedException: 60 tests failed
{noformat}

This message is automatically generated.

ATTACHMENT ID: 12926360 - PreCommit-HIVE-Build

> Hive should carry out timestamp computations in UTC
> ---------------------------------------------------
>
>                 Key: HIVE-12192
>                 URL: https://issues.apache.org/jira/browse/HIVE-12192
>             Project: Hive
>          Issue Type: Sub-task
>          Components: Hive
>            Reporter: Ryan Blue
>            Assignee: Jesus Camacho Rodriguez
>            Priority: Blocker
>              Labels: timestamp
>         Attachments: HIVE-12192.01.patch, HIVE-12192.02.patch, 
> HIVE-12192.03.patch, HIVE-12192.04.patch, HIVE-12192.05.patch, 
> HIVE-12192.06.patch, HIVE-12192.07.patch, HIVE-12192.08.patch, 
> HIVE-12192.09.patch, HIVE-12192.patch
>
>
> Hive currently uses the "local" time of a java.sql.Timestamp to represent the 
> SQL data type TIMESTAMP WITHOUT TIME ZONE. The purpose is to be able to use 
> {{Timestamp#getYear()}} and similar methods to implement SQL functions like 
> {{year}}.
> When the SQL session's time zone is a DST zone, such as America/Los_Angeles 
> that alternates between PST and PDT, there are times that cannot be 
> represented because the effective zone skips them.
> {code}
> hive> select TIMESTAMP '2015-03-08 02:10:00.101';
> 2015-03-08 03:10:00.101
> {code}
> Using UTC instead of the SQL session time zone as the underlying zone for a 
> java.sql.Timestamp avoids this bug, while still returning correct values for 
> {{getYear}} etc. Using UTC as the convenience representation (timestamp 
> without time zone has no real zone) would make timestamp calculations more 
> consistent and avoid similar problems in the future.
> Notably, this would break the {{unix_timestamp}} UDF that specifies the 
> result is with respect to ["the default timezone and default 
> locale"|https://cwiki.apache.org/confluence/display/Hive/LanguageManual+UDF#LanguageManualUDF-DateFunctions].
>  That function would need to be updated to use the 
> {{System.getProperty("user.timezone")}} zone.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to