[jira] [Commented] (HIVE-19695) Year Month Day extraction functions need to add an implicit cast for column that are String types

2018-06-16 Thread Hive QA (JIRA)


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

Hive QA commented on HIVE-19695:




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

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

{color:red}ERROR:{color} -1 due to 3 failed/errored test(s), 14537 tests 
executed
*Failed tests:*
{noformat}
org.apache.hadoop.hive.cli.TestMiniDruidCliDriver.testCliDriver[druidmini_extractTime]
 (batchId=258)
org.apache.hadoop.hive.cli.TestMiniSparkOnYarnCliDriver.testCliDriver[spark_dynamic_partition_pruning]
 (batchId=184)
org.apache.hadoop.hive.cli.TestMiniSparkOnYarnCliDriver.testCliDriver[spark_vectorized_dynamic_partition_pruning]
 (batchId=184)
{noformat}

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

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: 3 tests failed
{noformat}

This message is automatically generated.

ATTACHMENT ID: 12927834 - 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
> Attachments: HIVE-19695.1.patch, HIVE-19695.2.patch, 
> HIVE-19695.patch, 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  196912  31  16 
> {code}



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


[jira] [Commented] (HIVE-19695) Year Month Day extraction functions need to add an implicit cast for column that are String types

2018-06-16 Thread Hive QA (JIRA)


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

Hive QA commented on HIVE-19695:


| (/) *{color:green}+1 overall{color}* |
\\
\\
|| Vote || Subsystem || Runtime || Comment ||
|| || || || {color:brown} Prechecks {color} ||
| {color:green}+1{color} | {color:green} @author {color} | {color:green}  0m  
0s{color} | {color:green} The patch does not contain any @author tags. {color} |
|| || || || {color:brown} master Compile Tests {color} ||
| {color:green}+1{color} | {color:green} mvninstall {color} | {color:green}  8m 
 6s{color} | {color:green} master passed {color} |
| {color:green}+1{color} | {color:green} compile {color} | {color:green}  1m 
10s{color} | {color:green} master passed {color} |
| {color:green}+1{color} | {color:green} checkstyle {color} | {color:green}  0m 
40s{color} | {color:green} master passed {color} |
| {color:blue}0{color} | {color:blue} findbugs {color} | {color:blue}  4m  
9s{color} | {color:blue} ql in master has 2277 extant Findbugs warnings. 
{color} |
| {color:green}+1{color} | {color:green} javadoc {color} | {color:green}  1m  
0s{color} | {color:green} master passed {color} |
|| || || || {color:brown} Patch Compile Tests {color} ||
| {color:green}+1{color} | {color:green} mvninstall {color} | {color:green}  1m 
31s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} compile {color} | {color:green}  1m  
8s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} javac {color} | {color:green}  1m  
8s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} checkstyle {color} | {color:green}  0m 
40s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} whitespace {color} | {color:green}  0m 
 0s{color} | {color:green} The patch has no whitespace issues. {color} |
| {color:green}+1{color} | {color:green} findbugs {color} | {color:green}  4m 
28s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} javadoc {color} | {color:green}  0m 
59s{color} | {color:green} the patch passed {color} |
|| || || || {color:brown} Other Tests {color} ||
| {color:green}+1{color} | {color:green} asflicense {color} | {color:green}  0m 
13s{color} | {color:green} The patch does not generate ASF License warnings. 
{color} |
| {color:black}{color} | {color:black} {color} | {color:black} 24m 32s{color} | 
{color:black} {color} |
\\
\\
|| Subsystem || Report/Notes ||
| Optional Tests |  asflicense  javac  javadoc  findbugs  checkstyle  compile  |
| uname | Linux hiveptest-server-upstream 3.16.0-4-amd64 #1 SMP Debian 
3.16.36-1+deb8u1 (2016-09-03) x86_64 GNU/Linux |
| Build tool | maven |
| Personality | 
/data/hiveptest/working/yetus_PreCommit-HIVE-Build-11825/dev-support/hive-personality.sh
 |
| git revision | master / 5ba634a |
| Default Java | 1.8.0_111 |
| findbugs | v3.0.0 |
| modules | C: ql U: ql |
| Console output | 
http://104.198.109.242/logs//PreCommit-HIVE-Build-11825/yetus.txt |
| Powered by | Apache Yetushttp://yetus.apache.org |


This message was automatically generated.



> 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
> Attachments: HIVE-19695.1.patch, HIVE-19695.2.patch, 
> HIVE-19695.patch, 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),
> 

[jira] [Commented] (HIVE-19695) Year Month Day extraction functions need to add an implicit cast for column that are String types

2018-06-14 Thread slim bouguerra (JIRA)


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

slim bouguerra commented on HIVE-19695:
---

[~ashutoshc] i have updated the patch

> 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
> Attachments: HIVE-19695.1.patch, HIVE-19695.2.patch, 
> HIVE-19695.patch, 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  196912  31  16 
> {code}



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


[jira] [Commented] (HIVE-19695) Year Month Day extraction functions need to add an implicit cast for column that are String types

2018-06-14 Thread Nishant Bangarwa (JIRA)


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

Nishant Bangarwa commented on HIVE-19695:
-

+1

> 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
> Attachments: HIVE-19695.1.patch, HIVE-19695.patch, 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  196912  31  16 
> {code}



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


[jira] [Commented] (HIVE-19695) Year Month Day extraction functions need to add an implicit cast for column that are String types

2018-06-03 Thread Hive QA (JIRA)


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

Hive QA commented on HIVE-19695:




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

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

{color:red}ERROR:{color} -1 due to 5 failed/errored test(s), 14443 tests 
executed
*Failed tests:*
{noformat}
org.apache.hadoop.hive.cli.TestMiniLlapLocalCliDriver.testCliDriver[dynamic_partition_pruning]
 (batchId=162)
org.apache.hadoop.hive.cli.TestMiniLlapLocalCliDriver.testCliDriver[vectorized_timestamp_funcs]
 (batchId=162)
org.apache.hadoop.hive.cli.TestMiniSparkOnYarnCliDriver.testCliDriver[spark_dynamic_partition_pruning]
 (batchId=183)
org.apache.hadoop.hive.cli.TestMiniSparkOnYarnCliDriver.testCliDriver[spark_vectorized_dynamic_partition_pruning]
 (batchId=183)
org.apache.hadoop.hive.cli.TestSparkCliDriver.testCliDriver[vectorized_timestamp_funcs]
 (batchId=122)
{noformat}

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

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: 5 tests failed
{noformat}

This message is automatically generated.

ATTACHMENT ID: 12925889 - 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
> Attachments: HIVE-19695.1.patch, HIVE-19695.patch, 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  196912  31  16 
> {code}



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


[jira] [Commented] (HIVE-19695) Year Month Day extraction functions need to add an implicit cast for column that are String types

2018-06-02 Thread Hive QA (JIRA)


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

Hive QA commented on HIVE-19695:


| (/) *{color:green}+1 overall{color}* |
\\
\\
|| Vote || Subsystem || Runtime || Comment ||
|| || || || {color:brown} Prechecks {color} ||
| {color:green}+1{color} | {color:green} @author {color} | {color:green}  0m  
0s{color} | {color:green} The patch does not contain any @author tags. {color} |
|| || || || {color:brown} master Compile Tests {color} ||
| {color:green}+1{color} | {color:green} mvninstall {color} | {color:green}  6m 
22s{color} | {color:green} master passed {color} |
| {color:green}+1{color} | {color:green} compile {color} | {color:green}  0m 
56s{color} | {color:green} master passed {color} |
| {color:green}+1{color} | {color:green} checkstyle {color} | {color:green}  0m 
35s{color} | {color:green} master passed {color} |
| {color:blue}0{color} | {color:blue} findbugs {color} | {color:blue}  3m 
30s{color} | {color:blue} ql in master has 2278 extant Findbugs warnings. 
{color} |
| {color:green}+1{color} | {color:green} javadoc {color} | {color:green}  0m 
49s{color} | {color:green} master passed {color} |
|| || || || {color:brown} Patch Compile Tests {color} ||
| {color:green}+1{color} | {color:green} mvninstall {color} | {color:green}  1m 
18s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} compile {color} | {color:green}  0m 
59s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} javac {color} | {color:green}  0m 
59s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} checkstyle {color} | {color:green}  0m 
33s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} whitespace {color} | {color:green}  0m 
 0s{color} | {color:green} The patch has no whitespace issues. {color} |
| {color:green}+1{color} | {color:green} findbugs {color} | {color:green}  3m 
49s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} javadoc {color} | {color:green}  0m 
51s{color} | {color:green} the patch passed {color} |
|| || || || {color:brown} Other Tests {color} ||
| {color:green}+1{color} | {color:green} asflicense {color} | {color:green}  0m 
11s{color} | {color:green} The patch does not generate ASF License warnings. 
{color} |
| {color:black}{color} | {color:black} {color} | {color:black} 20m 26s{color} | 
{color:black} {color} |
\\
\\
|| Subsystem || Report/Notes ||
| Optional Tests |  asflicense  javac  javadoc  findbugs  checkstyle  compile  |
| uname | Linux hiveptest-server-upstream 3.16.0-4-amd64 #1 SMP Debian 
3.16.36-1+deb8u1 (2016-09-03) x86_64 GNU/Linux |
| Build tool | maven |
| Personality | 
/data/hiveptest/working/yetus_PreCommit-HIVE-Build-11461/dev-support/hive-personality.sh
 |
| git revision | master / 3bccc4e |
| Default Java | 1.8.0_111 |
| findbugs | v3.0.0 |
| modules | C: ql U: ql |
| Console output | 
http://104.198.109.242/logs//PreCommit-HIVE-Build-11461/yetus.txt |
| Powered by | Apache Yetushttp://yetus.apache.org |


This message was automatically generated.



> 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
> Attachments: HIVE-19695.1.patch, HIVE-19695.patch, 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), 

[jira] [Commented] (HIVE-19695) Year Month Day extraction functions need to add an implicit cast for column that are String types

2018-05-28 Thread Hive QA (JIRA)


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

Hive QA commented on HIVE-19695:




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

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

{color:red}ERROR:{color} -1 due to 10 failed/errored test(s), 14409 tests 
executed
*Failed tests:*
{noformat}
org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver[interval_udf] 
(batchId=26)
org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver[udf_hour] (batchId=3)
org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver[udf_minute] (batchId=8)
org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver[udf_second] (batchId=30)
org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver[vectorized_timestamp_funcs]
 (batchId=31)
org.apache.hadoop.hive.cli.TestMiniLlapLocalCliDriver.testCliDriver[dynamic_partition_pruning]
 (batchId=162)
org.apache.hadoop.hive.cli.TestMiniLlapLocalCliDriver.testCliDriver[vectorized_timestamp_funcs]
 (batchId=162)
org.apache.hadoop.hive.cli.TestMiniSparkOnYarnCliDriver.testCliDriver[spark_dynamic_partition_pruning]
 (batchId=183)
org.apache.hadoop.hive.cli.TestMiniSparkOnYarnCliDriver.testCliDriver[spark_vectorized_dynamic_partition_pruning]
 (batchId=183)
org.apache.hadoop.hive.cli.TestSparkCliDriver.testCliDriver[vectorized_timestamp_funcs]
 (batchId=122)
{noformat}

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

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: 10 tests failed
{noformat}

This message is automatically generated.

ATTACHMENT ID: 12925301 - 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
> Attachments: HIVE-19695.patch, 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  196912  31  16 
> {code}



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


[jira] [Commented] (HIVE-19695) Year Month Day extraction functions need to add an implicit cast for column that are String types

2018-05-28 Thread Hive QA (JIRA)


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

Hive QA commented on HIVE-19695:


| (/) *{color:green}+1 overall{color}* |
\\
\\
|| Vote || Subsystem || Runtime || Comment ||
|| || || || {color:brown} Prechecks {color} ||
| {color:green}+1{color} | {color:green} @author {color} | {color:green}  0m  
0s{color} | {color:green} The patch does not contain any @author tags. {color} |
|| || || || {color:brown} master Compile Tests {color} ||
| {color:green}+1{color} | {color:green} mvninstall {color} | {color:green}  6m 
51s{color} | {color:green} master passed {color} |
| {color:green}+1{color} | {color:green} compile {color} | {color:green}  0m 
56s{color} | {color:green} master passed {color} |
| {color:green}+1{color} | {color:green} checkstyle {color} | {color:green}  0m 
34s{color} | {color:green} master passed {color} |
| {color:blue}0{color} | {color:blue} findbugs {color} | {color:blue}  3m 
35s{color} | {color:blue} ql in master has 2324 extant Findbugs warnings. 
{color} |
| {color:green}+1{color} | {color:green} javadoc {color} | {color:green}  0m 
50s{color} | {color:green} master passed {color} |
|| || || || {color:brown} Patch Compile Tests {color} ||
| {color:green}+1{color} | {color:green} mvninstall {color} | {color:green}  1m 
17s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} compile {color} | {color:green}  0m 
58s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} javac {color} | {color:green}  0m 
58s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} checkstyle {color} | {color:green}  0m 
34s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} whitespace {color} | {color:green}  0m 
 0s{color} | {color:green} The patch has no whitespace issues. {color} |
| {color:green}+1{color} | {color:green} findbugs {color} | {color:green}  3m 
52s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} javadoc {color} | {color:green}  0m 
50s{color} | {color:green} the patch passed {color} |
|| || || || {color:brown} Other Tests {color} ||
| {color:green}+1{color} | {color:green} asflicense {color} | {color:green}  0m 
12s{color} | {color:green} The patch does not generate ASF License warnings. 
{color} |
| {color:black}{color} | {color:black} {color} | {color:black} 20m 57s{color} | 
{color:black} {color} |
\\
\\
|| Subsystem || Report/Notes ||
| Optional Tests |  asflicense  javac  javadoc  findbugs  checkstyle  compile  |
| uname | Linux hiveptest-server-upstream 3.16.0-4-amd64 #1 SMP Debian 
3.16.36-1+deb8u1 (2016-09-03) x86_64 GNU/Linux |
| Build tool | maven |
| Personality | 
/data/hiveptest/working/yetus_PreCommit-HIVE-Build-11319/dev-support/hive-personality.sh
 |
| git revision | master / 780b012 |
| Default Java | 1.8.0_111 |
| findbugs | v3.0.0 |
| modules | C: ql U: ql |
| Console output | 
http://104.198.109.242/logs//PreCommit-HIVE-Build-11319/yetus.txt |
| Powered by | Apache Yetushttp://yetus.apache.org |


This message was automatically generated.



> 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
> Attachments: HIVE-19695.patch, 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), 

[jira] [Commented] (HIVE-19695) Year Month Day extraction functions need to add an implicit cast for column that are String types

2018-05-26 Thread Hive QA (JIRA)

[ 
https://issues.apache.org/jira/browse/HIVE-19695?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=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 

[jira] [Commented] (HIVE-19695) Year Month Day extraction functions need to add an implicit cast for column that are String types

2018-05-25 Thread Ashutosh Chauhan (JIRA)

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

Ashutosh Chauhan commented on HIVE-19695:
-

+1

> 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  196912  31  16 
> {code}



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


[jira] [Commented] (HIVE-19695) Year Month Day extraction functions need to add an implicit cast for column that are String types

2018-05-24 Thread slim bouguerra (JIRA)

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

slim bouguerra commented on HIVE-19695:
---

[~ashutoshc] can you please take a look at this?

> 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  196912  31  16 
> {code}



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