[jira] [Commented] (HIVE-20098) Statistics: NPE when getting Date column partition statistics
[ https://issues.apache.org/jira/browse/HIVE-20098?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16590767#comment-16590767 ] Piotr Findeisen commented on HIVE-20098: [~ashutoshc] will this fix be backported to earlier Hive releases? > Statistics: NPE when getting Date column partition statistics > - > > Key: HIVE-20098 > URL: https://issues.apache.org/jira/browse/HIVE-20098 > Project: Hive > Issue Type: Bug > Components: Metastore, Standalone Metastore >Affects Versions: 1.2.1, 4.0.0 > Environment: Tested on versions `1.2.1` and the latest 4.0.0-SNAPSHOT >Reporter: Andy Rosa >Assignee: Andy Rosa >Priority: Major > Labels: Branch3Candidate > Fix For: 4.0.0 > > Attachments: > 0001-Fix-NPE-when-getting-statistics-for-date-column.patch, HIVE-20098.1.patch > > > The issue reproduces only for a date column for a partitioned table. It > reproduces only if the date column has all the values set to null, and if the > partition is not empty. > Here is a quick reproducer: > > > {code:java} > CREATE TABLE dummy_table ( > c_date DATE, > c_bigint BIGINT > ) > PARTITIONED BY (ds STRING); > INSERT OVERWRITE TABLE dummy_table PARTITION (ds='2018-01-01') SELECT > CAST(null AS DATE), CAST(null AS BIGINT) FROM ; > ANALYZE TABLE dummy_table COMPUTE STATISTICS FOR COLUMNS; > DESCRIBE FORMATTED dummy_table.c_bigint PARTITION (ds='2018-01-01'); > DESCRIBE FORMATTED dummy_table.c_date PARTITION (ds='2018-01-01'); > {code} > > > The first `DESCRIBE FORMATTED` statement succeeds, when the second fails with > an `NPE` > > It happens because the null check is missing when converting Object from the > ObjectStore to the Thrift object. The null check is missing only in the date > statistics conversion for the partitioned table. > Missing: > [https://github.com/apache/hive/blob/master/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/StatObjectConverter.java#L469] > Present: > https://github.com/apache/hive/blob/master/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/StatObjectConverter.java#L298 > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (HIVE-20098) Statistics: NPE when getting Date column partition statistics
[ https://issues.apache.org/jira/browse/HIVE-20098?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16535443#comment-16535443 ] Hive QA commented on HIVE-20098: Here are the results of testing the latest attachment: https://issues.apache.org/jira/secure/attachment/12930466/HIVE-20098.1.patch {color:red}ERROR:{color} -1 due to no test(s) being added or modified. {color:green}SUCCESS:{color} +1 due to 14631 tests passed Test results: https://builds.apache.org/job/PreCommit-HIVE-Build/12431/testReport Console output: https://builds.apache.org/job/PreCommit-HIVE-Build/12431/console Test logs: http://104.198.109.242/logs/PreCommit-HIVE-Build-12431/ 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 {noformat} This message is automatically generated. ATTACHMENT ID: 12930466 - PreCommit-HIVE-Build > Statistics: NPE when getting Date column partition statistics > - > > Key: HIVE-20098 > URL: https://issues.apache.org/jira/browse/HIVE-20098 > Project: Hive > Issue Type: Bug > Components: Metastore, Standalone Metastore >Affects Versions: 1.2.1, 4.0.0 > Environment: Tested on versions `1.2.1` and the latest 4.0.0-SNAPSHOT >Reporter: Andy Rosa >Assignee: Andy Rosa >Priority: Major > Attachments: > 0001-Fix-NPE-when-getting-statistics-for-date-column.patch, HIVE-20098.1.patch > > > The issue reproduces only for a date column for a partitioned table. It > reproduces only if the date column has all the values set to null, and if the > partition is not empty. > Here is a quick reproducer: > > > {code:java} > CREATE TABLE dummy_table ( > c_date DATE, > c_bigint BIGINT > ) > PARTITIONED BY (ds STRING); > INSERT OVERWRITE TABLE dummy_table PARTITION (ds='2018-01-01') SELECT > CAST(null AS DATE), CAST(null AS BIGINT) FROM ; > ANALYZE TABLE dummy_table COMPUTE STATISTICS FOR COLUMNS; > DESCRIBE FORMATTED dummy_table.c_bigint PARTITION (ds='2018-01-01'); > DESCRIBE FORMATTED dummy_table.c_date PARTITION (ds='2018-01-01'); > {code} > > > The first `DESCRIBE FORMATTED` statement succeeds, when the second fails with > an `NPE` > > It happens because the null check is missing when converting Object from the > ObjectStore to the Thrift object. The null check is missing only in the date > statistics conversion for the partitioned table. > Missing: > [https://github.com/apache/hive/blob/master/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/StatObjectConverter.java#L469] > Present: > https://github.com/apache/hive/blob/master/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/StatObjectConverter.java#L298 > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (HIVE-20098) Statistics: NPE when getting Date column partition statistics
[ https://issues.apache.org/jira/browse/HIVE-20098?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16535398#comment-16535398 ] Hive QA commented on HIVE-20098: | (/) *{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 15s{color} | {color:green} master passed {color} | | {color:green}+1{color} | {color:green} compile {color} | {color:green} 0m 41s{color} | {color:green} master passed {color} | | {color:green}+1{color} | {color:green} checkstyle {color} | {color:green} 0m 18s{color} | {color:green} master passed {color} | | {color:blue}0{color} | {color:blue} findbugs {color} | {color:blue} 3m 19s{color} | {color:blue} standalone-metastore in master has 217 extant Findbugs warnings. {color} | | {color:green}+1{color} | {color:green} javadoc {color} | {color:green} 0m 58s{color} | {color:green} master passed {color} | || || || || {color:brown} Patch Compile Tests {color} || | {color:green}+1{color} | {color:green} mvninstall {color} | {color:green} 0m 50s{color} | {color:green} the patch passed {color} | | {color:green}+1{color} | {color:green} compile {color} | {color:green} 0m 41s{color} | {color:green} the patch passed {color} | | {color:green}+1{color} | {color:green} javac {color} | {color:green} 0m 41s{color} | {color:green} the patch passed {color} | | {color:green}+1{color} | {color:green} checkstyle {color} | {color:green} 0m 17s{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 28s{color} | {color:green} the patch passed {color} | | {color:green}+1{color} | {color:green} javadoc {color} | {color:green} 0m 57s{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} 20m 23s{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-12431/dev-support/hive-personality.sh | | git revision | master / eae5225 | | Default Java | 1.8.0_111 | | findbugs | v3.0.0 | | modules | C: standalone-metastore U: standalone-metastore | | Console output | http://104.198.109.242/logs//PreCommit-HIVE-Build-12431/yetus.txt | | Powered by | Apache Yetushttp://yetus.apache.org | This message was automatically generated. > Statistics: NPE when getting Date column partition statistics > - > > Key: HIVE-20098 > URL: https://issues.apache.org/jira/browse/HIVE-20098 > Project: Hive > Issue Type: Bug > Components: Metastore, Standalone Metastore >Affects Versions: 1.2.1, 4.0.0 > Environment: Tested on versions `1.2.1` and the latest 4.0.0-SNAPSHOT >Reporter: Andy Rosa >Assignee: Andy Rosa >Priority: Major > Attachments: > 0001-Fix-NPE-when-getting-statistics-for-date-column.patch, HIVE-20098.1.patch > > > The issue reproduces only for a date column for a partitioned table. It > reproduces only if the date column has all the values set to null, and if the > partition is not empty. > Here is a quick reproducer: > > > {code:java} > CREATE TABLE dummy_table ( > c_date DATE, > c_bigint BIGINT > ) > PARTITIONED BY (ds STRING); > INSERT OVERWRITE TABLE dummy_table PARTITION (ds='2018-01-01') SELECT > CAST(null AS DATE), CAST(null AS BIGINT) FROM ; > ANALYZE TABLE dummy_table COMPUTE STATISTICS FOR COLUMNS; > DESCRIBE FORMATTED dummy_table.c_bigint PARTITION (ds='2018-01-01'); > DESCRIBE FORMATTED dummy_table.c_date PARTITION (ds='2018-01-01'); > {code} > > > The first `DESCRIBE FORMATTED` statement succeeds, when the second fails with > an `NPE` > > It happens because the null check is missing when converting Object from the > ObjectStore to the Thrift object. The null check is missing only in the date > statistics conversion for the partitioned table. > Missing: >
[jira] [Commented] (HIVE-20098) Statistics: NPE when getting Date column partition statistics
[ https://issues.apache.org/jira/browse/HIVE-20098?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16534271#comment-16534271 ] Gopal V commented on HIVE-20098: [~arhimondr]: I've reattached the patch for QE. LGTM - +1 tests pending > Statistics: NPE when getting Date column partition statistics > - > > Key: HIVE-20098 > URL: https://issues.apache.org/jira/browse/HIVE-20098 > Project: Hive > Issue Type: Bug > Components: Metastore, Standalone Metastore >Affects Versions: 1.2.1, 4.0.0 > Environment: Tested on versions `1.2.1` and the latest 4.0.0-SNAPSHOT >Reporter: Andy Rosa >Assignee: Andy Rosa >Priority: Major > Attachments: > 0001-Fix-NPE-when-getting-statistics-for-date-column.patch, HIVE-20098.1.patch > > > The issue reproduces only for a date column for a partitioned table. It > reproduces only if the date column has all the values set to null, and if the > partition is not empty. > Here is a quick reproducer: > > > {code:java} > CREATE TABLE dummy_table ( > c_date DATE, > c_bigint BIGINT > ) > PARTITIONED BY (ds STRING); > INSERT OVERWRITE TABLE dummy_table PARTITION (ds='2018-01-01') SELECT > CAST(null AS DATE), CAST(null AS BIGINT) FROM ; > ANALYZE TABLE dummy_table COMPUTE STATISTICS FOR COLUMNS; > DESCRIBE FORMATTED dummy_table.c_bigint PARTITION (ds='2018-01-01'); > DESCRIBE FORMATTED dummy_table.c_date PARTITION (ds='2018-01-01'); > {code} > > > The first `DESCRIBE FORMATTED` statement succeeds, when the second fails with > an `NPE` > > It happens because the null check is missing when converting Object from the > ObjectStore to the Thrift object. The null check is missing only in the date > statistics conversion for the partitioned table. > Missing: > [https://github.com/apache/hive/blob/master/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/StatObjectConverter.java#L469] > Present: > https://github.com/apache/hive/blob/master/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/StatObjectConverter.java#L298 > -- This message was sent by Atlassian JIRA (v7.6.3#76005)