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

Hive QA commented on HIVE-19695:
--------------------------------



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

{color:red}ERROR:{color} -1 due to build exiting with an error

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

Messages:
{noformat}
Executing org.apache.hive.ptest.execution.TestCheckPhase
Executing org.apache.hive.ptest.execution.PrepPhase
Tests exited with: NonZeroExitCodeException
Command 'bash /data/hiveptest/working/scratch/source-prep.sh' failed with exit 
status 1 and output '+ date '+%Y-%m-%d %T.%3N'
2018-05-27 02:42:37.828
+ [[ -n /usr/lib/jvm/java-8-openjdk-amd64 ]]
+ export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
+ JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
+ export 
PATH=/usr/lib/jvm/java-8-openjdk-amd64/bin/:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
+ 
PATH=/usr/lib/jvm/java-8-openjdk-amd64/bin/:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
+ export 'ANT_OPTS=-Xmx1g -XX:MaxPermSize=256m '
+ ANT_OPTS='-Xmx1g -XX:MaxPermSize=256m '
+ export 'MAVEN_OPTS=-Xmx1g '
+ MAVEN_OPTS='-Xmx1g '
+ cd /data/hiveptest/working/
+ tee /data/hiveptest/logs/PreCommit-HIVE-Build-11244/source-prep.txt
+ [[ false == \t\r\u\e ]]
+ mkdir -p maven ivy
+ [[ git = \s\v\n ]]
+ [[ git = \g\i\t ]]
+ [[ -z master ]]
+ [[ -d apache-github-source-source ]]
+ [[ ! -d apache-github-source-source/.git ]]
+ [[ ! -d apache-github-source-source ]]
+ date '+%Y-%m-%d %T.%3N'
2018-05-27 02:42:37.837
+ cd apache-github-source-source
+ git fetch origin
+ git reset --hard HEAD
HEAD is now at f9f4340 HIVE-19684 : Hive stats optimizer wrongly uses stats 
against non native tables (Slim Bouguerra via Ashutosh Chauhan)
+ git clean -f -d
+ git checkout master
Already on 'master'
Your branch is up-to-date with 'origin/master'.
+ git reset --hard origin/master
HEAD is now at f9f4340 HIVE-19684 : Hive stats optimizer wrongly uses stats 
against non native tables (Slim Bouguerra via Ashutosh Chauhan)
+ git merge --ff-only origin/master
Already up-to-date.
+ date '+%Y-%m-%d %T.%3N'
2018-05-27 02:42:39.320
+ rm -rf ../yetus_PreCommit-HIVE-Build-11244
+ mkdir ../yetus_PreCommit-HIVE-Build-11244
+ git gc
+ cp -R . ../yetus_PreCommit-HIVE-Build-11244
+ mkdir /data/hiveptest/logs/PreCommit-HIVE-Build-11244/yetus
+ patchCommandPath=/data/hiveptest/working/scratch/smart-apply-patch.sh
+ patchFilePath=/data/hiveptest/working/scratch/build.patch
+ [[ -f /data/hiveptest/working/scratch/build.patch ]]
+ chmod +x /data/hiveptest/working/scratch/smart-apply-patch.sh
+ /data/hiveptest/working/scratch/smart-apply-patch.sh 
/data/hiveptest/working/scratch/build.patch
error: patch failed: 
ql/src/test/results/clientpositive/druid/druidmini_extractTime.q.out:1015
Falling back to three-way merge...
Applied patch to 
'ql/src/test/results/clientpositive/druid/druidmini_extractTime.q.out' with 
conflicts.
Going to apply patch with: git apply -p0
error: patch failed: 
ql/src/test/results/clientpositive/druid/druidmini_extractTime.q.out:1015
Falling back to three-way merge...
Applied patch to 
'ql/src/test/results/clientpositive/druid/druidmini_extractTime.q.out' with 
conflicts.
U ql/src/test/results/clientpositive/druid/druidmini_extractTime.q.out
+ exit 1
'
{noformat}

This message is automatically generated.

ATTACHMENT ID: 12924995 - PreCommit-HIVE-Build

> Year Month Day extraction functions need to add an implicit cast for column 
> that are String types
> -------------------------------------------------------------------------------------------------
>
>                 Key: HIVE-19695
>                 URL: https://issues.apache.org/jira/browse/HIVE-19695
>             Project: Hive
>          Issue Type: Bug
>          Components: Druid integration, Query Planning
>    Affects Versions: 3.0.0
>            Reporter: slim bouguerra
>            Assignee: slim bouguerra
>            Priority: Major
>             Fix For: 3.1.0
>
>         Attachments: HIVE-19695.patch
>
>
> To avoid surprising/wrong results, Hive Query plan shall add an explicit cast 
> over non date/timestamp column type when user try to extract Year/Month/Hour 
> etc..
> This is an example of misleading results.
> {code}
> create table test_base_table(`timecolumn` timestamp, `date_c` string, 
> `timestamp_c` string,  `metric_c` double);
> insert into test_base_table values ('2015-03-08 00:00:00', '2015-03-10', 
> '2015-03-08 00:00:00', 5.0);
> CREATE TABLE druid_test_table
> STORED BY 'org.apache.hadoop.hive.druid.DruidStorageHandler'
> TBLPROPERTIES ("druid.segment.granularity" = "DAY")
> AS select
> cast(`timecolumn` as timestamp with local time zone) as `__time`, `date_c`, 
> `timestamp_c`, `metric_c` FROM test_base_table;
> select
> year(date_c), month(date_c),day(date_c), hour(date_c),
> year(timestamp_c), month(timestamp_c),day(timestamp_c), hour(timestamp_c)
> from druid_test_table;
> {code} 
> will return the following wrong results:
> {code}
> PREHOOK: query: select
> year(date_c), month(date_c),day(date_c), hour(date_c),
> year(timestamp_c), month(timestamp_c),day(timestamp_c), hour(timestamp_c)
> from druid_test_table
> PREHOOK: type: QUERY
> PREHOOK: Input: default@druid_test_table
> #### A masked pattern was here ####
> POSTHOOK: query: select
> year(date_c), month(date_c),day(date_c), hour(date_c),
> year(timestamp_c), month(timestamp_c),day(timestamp_c), hour(timestamp_c)
> from druid_test_table
> POSTHOOK: type: QUERY
> POSTHOOK: Input: default@druid_test_table
> #### A masked pattern was here ####
> 1969  12      31      16      1969    12      31      16 
> {code}



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

Reply via email to