[jira] [Commented] (HIVE-19771) allowNullColumnForMissingStats should not be false when column stats are estimated

2018-06-12 Thread Ashutosh Chauhan (JIRA)


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

Ashutosh Chauhan commented on HIVE-19771:
-

+1

> allowNullColumnForMissingStats should not be false when column stats are 
> estimated
> --
>
> Key: HIVE-19771
> URL: https://issues.apache.org/jira/browse/HIVE-19771
> Project: Hive
>  Issue Type: Bug
>  Components: CBO
>Affects Versions: 3.0.0
>Reporter: Jesus Camacho Rodriguez
>Assignee: Jesus Camacho Rodriguez
>Priority: Major
> Attachments: HIVE-19771.01.patch, HIVE-19771.02.patch, 
> HIVE-19771.03.patch, HIVE-19771.04.patch, HIVE-19771.patch
>
>
> Otherwise we may throw an Exception.
> {noformat}
> 2018-05-26T00:30:22,335 DEBUG [HiveServer2-Background-Pool: Thread-631]: 
> stats.StatsUtils (:()) - Estimated average row size: 372
> 2018-05-26T00:30:22,352 DEBUG [HiveServer2-Background-Pool: Thread-631]: 
> calcite.RelOptHiveTable (:()) - Stats for column a in table basetable_rebuild 
> stored in cache
> 2018-05-26T00:30:22,352 DEBUG [HiveServer2-Background-Pool: Thread-631]: 
> calcite.RelOptHiveTable (:()) -  colName: a colType: int countDistincts: 4 
> numNulls: 1 avgColLen: 4.0 numTrues: 0 numFalses: 0 Range: [ min: 
> -9223372036854775808 max: 9223372036854775807 ] isPrimaryKey: false 
> isEstimated: true
> 2018-05-26T00:30:22,352 DEBUG [HiveServer2-Background-Pool: Thread-631]: 
> calcite.RelOptHiveTable (:()) - Stats for column b in table basetable_rebuild 
> stored in cache
> 2018-05-26T00:30:22,352 DEBUG [HiveServer2-Background-Pool: Thread-631]: 
> calcite.RelOptHiveTable (:()) -  colName: b colType: varchar(256) 
> countDistincts: 4 numNulls: 1 avgColLen: 256.0 numTrues: 0 numFalses: 0 
> isPrimaryKey: false isEstimated: true
> 2018-05-26T00:30:22,352 ERROR [HiveServer2-Background-Pool: Thread-631]: 
> calcite.RelOptHiveTable (:()) - No Stats for default@basetable_rebuild, 
> Columns: a, b
> java.lang.RuntimeException: No Stats for default@basetable_rebuild, Columns: 
> a, b
> at 
> org.apache.hadoop.hive.ql.optimizer.calcite.RelOptHiveTable.updateColStats(RelOptHiveTable.java:586)
>  ~[hive-exec-3.0.0.jar:3.0.0-SNAPSHOT]
> at 
> org.apache.hadoop.hive.ql.optimizer.calcite.RelOptHiveTable.getColStat(RelOptHiveTable.java:606)
>  ~[hive-exec-3.0.0.jar:3.0.0-SNAPSHOT]
> at 
> org.apache.hadoop.hive.ql.optimizer.calcite.RelOptHiveTable.getColStat(RelOptHiveTable.java:592)
>  ~[hive-exec-3.0.0.jar:3.0.0-SNAPSHOT]
> at 
> org.apache.hadoop.hive.ql.optimizer.calcite.reloperators.HiveTableScan.getColStat(HiveTableScan.java:155)
>  ~[hive-exec-3.0.0.jar:3.0.0-SNAPSHOT]
> at 
> org.apache.hadoop.hive.ql.optimizer.calcite.stats.HiveRelMdDistinctRowCount.getDistinctRowCount(HiveRelMdDistinctRowCount.java:78)
>  ~[hive-exec-3.0.0.jar:3.0.0-SNAPSHOT]
> at 
> org.apache.hadoop.hive.ql.optimizer.calcite.stats.HiveRelMdDistinctRowCount.getDistinctRowCount(HiveRelMdDistinctRowCount.java:65)
>  ~[hive-exec-3.0.0.jar:3.0.0-SNAPSHOT]
> at 
> GeneratedMetadataHandler_DistinctRowCount.getDistinctRowCount_$(Unknown 
> Source) ~[?:?]
> at 
> GeneratedMetadataHandler_DistinctRowCount.getDistinctRowCount(Unknown Source) 
> ~[?:?]
> at 
> org.apache.calcite.rel.metadata.RelMetadataQuery.getDistinctRowCount(RelMetadataQuery.java:781)
>  ~[calcite-core-1.16.0.jar:1.16.0]
> at 
> org.apache.calcite.rel.metadata.RelMdRowCount.getRowCount(RelMdRowCount.java:207)
>  ~[calcite-core-1.16.0.jar:1.16.0]
> at GeneratedMetadataHandler_RowCount.getRowCount_$(Unknown Source) 
> ~[?:?]
> at GeneratedMetadataHandler_RowCount.getRowCount(Unknown Source) 
> ~[?:?]
> at 
> org.apache.calcite.rel.metadata.RelMetadataQuery.getRowCount(RelMetadataQuery.java:235)
>  ~[calcite-core-1.16.0.jar:1.16.0]
> at 
> org.apache.calcite.rel.externalize.RelWriterImpl.explain_(RelWriterImpl.java:100)
>  ~[calcite-core-1.16.0.jar:1.16.0]
> at 
> org.apache.calcite.rel.externalize.RelWriterImpl.done(RelWriterImpl.java:156) 
> ~[calcite-core-1.16.0.jar:1.16.0]
> at 
> org.apache.calcite.rel.AbstractRelNode.explain(AbstractRelNode.java:312) 
> ~[calcite-core-1.16.0.jar:1.16.0]
> at org.apache.calcite.plan.RelOptUtil.toString(RelOptUtil.java:1991) 
> ~[calcite-core-1.16.0.jar:1.16.0]
> at 
> org.apache.hadoop.hive.ql.parse.CalcitePlanner$CalcitePlannerAction.apply(CalcitePlanner.java:1898)
>  ~[hive-exec-3.0.0.jar:3.0.0-SNAPSHOT]
> at 
> org.apache.hadoop.hive.ql.parse.CalcitePlanner$CalcitePlannerAction.apply(CalcitePlanner.java:1613)
>  ~[hive-exec-3.0.0.jar:3.0.0-SNAPSHOT]
> at org.apache.calcite.tools.Frameworks$1.apply(Frameworks.java:118) 
> 

[jira] [Commented] (HIVE-19771) allowNullColumnForMissingStats should not be false when column stats are estimated

2018-06-12 Thread Jesus Camacho Rodriguez (JIRA)


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

Jesus Camacho Rodriguez commented on HIVE-19771:


[~ashutoshc], this came back with a clean run. Could you take a look? Thanks

> allowNullColumnForMissingStats should not be false when column stats are 
> estimated
> --
>
> Key: HIVE-19771
> URL: https://issues.apache.org/jira/browse/HIVE-19771
> Project: Hive
>  Issue Type: Bug
>  Components: CBO
>Affects Versions: 3.0.0
>Reporter: Jesus Camacho Rodriguez
>Assignee: Jesus Camacho Rodriguez
>Priority: Major
> Attachments: HIVE-19771.01.patch, HIVE-19771.02.patch, 
> HIVE-19771.03.patch, HIVE-19771.04.patch, HIVE-19771.patch
>
>
> Otherwise we may throw an Exception.
> {noformat}
> 2018-05-26T00:30:22,335 DEBUG [HiveServer2-Background-Pool: Thread-631]: 
> stats.StatsUtils (:()) - Estimated average row size: 372
> 2018-05-26T00:30:22,352 DEBUG [HiveServer2-Background-Pool: Thread-631]: 
> calcite.RelOptHiveTable (:()) - Stats for column a in table basetable_rebuild 
> stored in cache
> 2018-05-26T00:30:22,352 DEBUG [HiveServer2-Background-Pool: Thread-631]: 
> calcite.RelOptHiveTable (:()) -  colName: a colType: int countDistincts: 4 
> numNulls: 1 avgColLen: 4.0 numTrues: 0 numFalses: 0 Range: [ min: 
> -9223372036854775808 max: 9223372036854775807 ] isPrimaryKey: false 
> isEstimated: true
> 2018-05-26T00:30:22,352 DEBUG [HiveServer2-Background-Pool: Thread-631]: 
> calcite.RelOptHiveTable (:()) - Stats for column b in table basetable_rebuild 
> stored in cache
> 2018-05-26T00:30:22,352 DEBUG [HiveServer2-Background-Pool: Thread-631]: 
> calcite.RelOptHiveTable (:()) -  colName: b colType: varchar(256) 
> countDistincts: 4 numNulls: 1 avgColLen: 256.0 numTrues: 0 numFalses: 0 
> isPrimaryKey: false isEstimated: true
> 2018-05-26T00:30:22,352 ERROR [HiveServer2-Background-Pool: Thread-631]: 
> calcite.RelOptHiveTable (:()) - No Stats for default@basetable_rebuild, 
> Columns: a, b
> java.lang.RuntimeException: No Stats for default@basetable_rebuild, Columns: 
> a, b
> at 
> org.apache.hadoop.hive.ql.optimizer.calcite.RelOptHiveTable.updateColStats(RelOptHiveTable.java:586)
>  ~[hive-exec-3.0.0.jar:3.0.0-SNAPSHOT]
> at 
> org.apache.hadoop.hive.ql.optimizer.calcite.RelOptHiveTable.getColStat(RelOptHiveTable.java:606)
>  ~[hive-exec-3.0.0.jar:3.0.0-SNAPSHOT]
> at 
> org.apache.hadoop.hive.ql.optimizer.calcite.RelOptHiveTable.getColStat(RelOptHiveTable.java:592)
>  ~[hive-exec-3.0.0.jar:3.0.0-SNAPSHOT]
> at 
> org.apache.hadoop.hive.ql.optimizer.calcite.reloperators.HiveTableScan.getColStat(HiveTableScan.java:155)
>  ~[hive-exec-3.0.0.jar:3.0.0-SNAPSHOT]
> at 
> org.apache.hadoop.hive.ql.optimizer.calcite.stats.HiveRelMdDistinctRowCount.getDistinctRowCount(HiveRelMdDistinctRowCount.java:78)
>  ~[hive-exec-3.0.0.jar:3.0.0-SNAPSHOT]
> at 
> org.apache.hadoop.hive.ql.optimizer.calcite.stats.HiveRelMdDistinctRowCount.getDistinctRowCount(HiveRelMdDistinctRowCount.java:65)
>  ~[hive-exec-3.0.0.jar:3.0.0-SNAPSHOT]
> at 
> GeneratedMetadataHandler_DistinctRowCount.getDistinctRowCount_$(Unknown 
> Source) ~[?:?]
> at 
> GeneratedMetadataHandler_DistinctRowCount.getDistinctRowCount(Unknown Source) 
> ~[?:?]
> at 
> org.apache.calcite.rel.metadata.RelMetadataQuery.getDistinctRowCount(RelMetadataQuery.java:781)
>  ~[calcite-core-1.16.0.jar:1.16.0]
> at 
> org.apache.calcite.rel.metadata.RelMdRowCount.getRowCount(RelMdRowCount.java:207)
>  ~[calcite-core-1.16.0.jar:1.16.0]
> at GeneratedMetadataHandler_RowCount.getRowCount_$(Unknown Source) 
> ~[?:?]
> at GeneratedMetadataHandler_RowCount.getRowCount(Unknown Source) 
> ~[?:?]
> at 
> org.apache.calcite.rel.metadata.RelMetadataQuery.getRowCount(RelMetadataQuery.java:235)
>  ~[calcite-core-1.16.0.jar:1.16.0]
> at 
> org.apache.calcite.rel.externalize.RelWriterImpl.explain_(RelWriterImpl.java:100)
>  ~[calcite-core-1.16.0.jar:1.16.0]
> at 
> org.apache.calcite.rel.externalize.RelWriterImpl.done(RelWriterImpl.java:156) 
> ~[calcite-core-1.16.0.jar:1.16.0]
> at 
> org.apache.calcite.rel.AbstractRelNode.explain(AbstractRelNode.java:312) 
> ~[calcite-core-1.16.0.jar:1.16.0]
> at org.apache.calcite.plan.RelOptUtil.toString(RelOptUtil.java:1991) 
> ~[calcite-core-1.16.0.jar:1.16.0]
> at 
> org.apache.hadoop.hive.ql.parse.CalcitePlanner$CalcitePlannerAction.apply(CalcitePlanner.java:1898)
>  ~[hive-exec-3.0.0.jar:3.0.0-SNAPSHOT]
> at 
> org.apache.hadoop.hive.ql.parse.CalcitePlanner$CalcitePlannerAction.apply(CalcitePlanner.java:1613)
>  ~[hive-exec-3.0.0.jar:3.0.0-SNAPSHOT]
> at 

[jira] [Commented] (HIVE-19771) allowNullColumnForMissingStats should not be false when column stats are estimated

2018-06-12 Thread Hive QA (JIRA)


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

Hive QA commented on HIVE-19771:




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

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

{color:green}SUCCESS:{color} +1 due to 14521 tests passed

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

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: 12927345 - PreCommit-HIVE-Build

> allowNullColumnForMissingStats should not be false when column stats are 
> estimated
> --
>
> Key: HIVE-19771
> URL: https://issues.apache.org/jira/browse/HIVE-19771
> Project: Hive
>  Issue Type: Bug
>  Components: CBO
>Affects Versions: 3.0.0
>Reporter: Jesus Camacho Rodriguez
>Assignee: Jesus Camacho Rodriguez
>Priority: Major
> Attachments: HIVE-19771.01.patch, HIVE-19771.02.patch, 
> HIVE-19771.03.patch, HIVE-19771.04.patch, HIVE-19771.patch
>
>
> Otherwise we may throw an Exception.
> {noformat}
> 2018-05-26T00:30:22,335 DEBUG [HiveServer2-Background-Pool: Thread-631]: 
> stats.StatsUtils (:()) - Estimated average row size: 372
> 2018-05-26T00:30:22,352 DEBUG [HiveServer2-Background-Pool: Thread-631]: 
> calcite.RelOptHiveTable (:()) - Stats for column a in table basetable_rebuild 
> stored in cache
> 2018-05-26T00:30:22,352 DEBUG [HiveServer2-Background-Pool: Thread-631]: 
> calcite.RelOptHiveTable (:()) -  colName: a colType: int countDistincts: 4 
> numNulls: 1 avgColLen: 4.0 numTrues: 0 numFalses: 0 Range: [ min: 
> -9223372036854775808 max: 9223372036854775807 ] isPrimaryKey: false 
> isEstimated: true
> 2018-05-26T00:30:22,352 DEBUG [HiveServer2-Background-Pool: Thread-631]: 
> calcite.RelOptHiveTable (:()) - Stats for column b in table basetable_rebuild 
> stored in cache
> 2018-05-26T00:30:22,352 DEBUG [HiveServer2-Background-Pool: Thread-631]: 
> calcite.RelOptHiveTable (:()) -  colName: b colType: varchar(256) 
> countDistincts: 4 numNulls: 1 avgColLen: 256.0 numTrues: 0 numFalses: 0 
> isPrimaryKey: false isEstimated: true
> 2018-05-26T00:30:22,352 ERROR [HiveServer2-Background-Pool: Thread-631]: 
> calcite.RelOptHiveTable (:()) - No Stats for default@basetable_rebuild, 
> Columns: a, b
> java.lang.RuntimeException: No Stats for default@basetable_rebuild, Columns: 
> a, b
> at 
> org.apache.hadoop.hive.ql.optimizer.calcite.RelOptHiveTable.updateColStats(RelOptHiveTable.java:586)
>  ~[hive-exec-3.0.0.jar:3.0.0-SNAPSHOT]
> at 
> org.apache.hadoop.hive.ql.optimizer.calcite.RelOptHiveTable.getColStat(RelOptHiveTable.java:606)
>  ~[hive-exec-3.0.0.jar:3.0.0-SNAPSHOT]
> at 
> org.apache.hadoop.hive.ql.optimizer.calcite.RelOptHiveTable.getColStat(RelOptHiveTable.java:592)
>  ~[hive-exec-3.0.0.jar:3.0.0-SNAPSHOT]
> at 
> org.apache.hadoop.hive.ql.optimizer.calcite.reloperators.HiveTableScan.getColStat(HiveTableScan.java:155)
>  ~[hive-exec-3.0.0.jar:3.0.0-SNAPSHOT]
> at 
> org.apache.hadoop.hive.ql.optimizer.calcite.stats.HiveRelMdDistinctRowCount.getDistinctRowCount(HiveRelMdDistinctRowCount.java:78)
>  ~[hive-exec-3.0.0.jar:3.0.0-SNAPSHOT]
> at 
> org.apache.hadoop.hive.ql.optimizer.calcite.stats.HiveRelMdDistinctRowCount.getDistinctRowCount(HiveRelMdDistinctRowCount.java:65)
>  ~[hive-exec-3.0.0.jar:3.0.0-SNAPSHOT]
> at 
> GeneratedMetadataHandler_DistinctRowCount.getDistinctRowCount_$(Unknown 
> Source) ~[?:?]
> at 
> GeneratedMetadataHandler_DistinctRowCount.getDistinctRowCount(Unknown Source) 
> ~[?:?]
> at 
> org.apache.calcite.rel.metadata.RelMetadataQuery.getDistinctRowCount(RelMetadataQuery.java:781)
>  ~[calcite-core-1.16.0.jar:1.16.0]
> at 
> org.apache.calcite.rel.metadata.RelMdRowCount.getRowCount(RelMdRowCount.java:207)
>  ~[calcite-core-1.16.0.jar:1.16.0]
> at GeneratedMetadataHandler_RowCount.getRowCount_$(Unknown Source) 
> ~[?:?]
> at GeneratedMetadataHandler_RowCount.getRowCount(Unknown Source) 
> ~[?:?]
> at 
> org.apache.calcite.rel.metadata.RelMetadataQuery.getRowCount(RelMetadataQuery.java:235)
>  ~[calcite-core-1.16.0.jar:1.16.0]
> at 
> 

[jira] [Commented] (HIVE-19771) allowNullColumnForMissingStats should not be false when column stats are estimated

2018-06-12 Thread Hive QA (JIRA)


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

Hive QA commented on HIVE-19771:


| (x) *{color:red}-1 overall{color}* |
\\
\\
|| Vote || Subsystem || Runtime || Comment ||
|| || || || {color:brown} Prechecks {color} ||
| {color:green}+1{color} | {color:green} @author {color} | {color:green}  0m  
1s{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 
48s{color} | {color:green} master passed {color} |
| {color:green}+1{color} | {color:green} compile {color} | {color:green}  0m 
57s{color} | {color:green} master passed {color} |
| {color:green}+1{color} | {color:green} checkstyle {color} | {color:green}  0m 
31s{color} | {color:green} master passed {color} |
| {color:blue}0{color} | {color:blue} findbugs {color} | {color:blue}  3m 
25s{color} | {color:blue} ql in master has 2279 extant Findbugs warnings. 
{color} |
| {color:green}+1{color} | {color:green} javadoc {color} | {color:green}  0m 
48s{color} | {color:green} master passed {color} |
|| || || || {color:brown} Patch Compile Tests {color} ||
| {color:green}+1{color} | {color:green} mvninstall {color} | {color:green}  1m 
14s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} compile {color} | {color:green}  0m 
55s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} javac {color} | {color:green}  0m 
55s{color} | {color:green} the patch passed {color} |
| {color:red}-1{color} | {color:red} checkstyle {color} | {color:red}  0m 
33s{color} | {color:red} ql: The patch generated 2 new + 34 unchanged - 1 fixed 
= 36 total (was 35) {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 
36s{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 
11s{color} | {color:green} The patch does not generate ASF License warnings. 
{color} |
| {color:black}{color} | {color:black} {color} | {color:black} 20m 13s{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-11729/dev-support/hive-personality.sh
 |
| git revision | master / e7cee30 |
| Default Java | 1.8.0_111 |
| findbugs | v3.0.0 |
| checkstyle | 
http://104.198.109.242/logs//PreCommit-HIVE-Build-11729/yetus/diff-checkstyle-ql.txt
 |
| modules | C: ql U: ql |
| Console output | 
http://104.198.109.242/logs//PreCommit-HIVE-Build-11729/yetus.txt |
| Powered by | Apache Yetushttp://yetus.apache.org |


This message was automatically generated.



> allowNullColumnForMissingStats should not be false when column stats are 
> estimated
> --
>
> Key: HIVE-19771
> URL: https://issues.apache.org/jira/browse/HIVE-19771
> Project: Hive
>  Issue Type: Bug
>  Components: CBO
>Affects Versions: 3.0.0
>Reporter: Jesus Camacho Rodriguez
>Assignee: Jesus Camacho Rodriguez
>Priority: Major
> Attachments: HIVE-19771.01.patch, HIVE-19771.02.patch, 
> HIVE-19771.03.patch, HIVE-19771.04.patch, HIVE-19771.patch
>
>
> Otherwise we may throw an Exception.
> {noformat}
> 2018-05-26T00:30:22,335 DEBUG [HiveServer2-Background-Pool: Thread-631]: 
> stats.StatsUtils (:()) - Estimated average row size: 372
> 2018-05-26T00:30:22,352 DEBUG [HiveServer2-Background-Pool: Thread-631]: 
> calcite.RelOptHiveTable (:()) - Stats for column a in table basetable_rebuild 
> stored in cache
> 2018-05-26T00:30:22,352 DEBUG [HiveServer2-Background-Pool: Thread-631]: 
> calcite.RelOptHiveTable (:()) -  colName: a colType: int countDistincts: 4 
> numNulls: 1 avgColLen: 4.0 numTrues: 0 numFalses: 0 Range: [ min: 
> -9223372036854775808 max: 9223372036854775807 ] isPrimaryKey: false 
> isEstimated: true
> 2018-05-26T00:30:22,352 DEBUG [HiveServer2-Background-Pool: Thread-631]: 
> calcite.RelOptHiveTable (:()) - Stats for column b in table basetable_rebuild 
> stored in cache
> 2018-05-26T00:30:22,352 DEBUG [HiveServer2-Background-Pool: Thread-631]: 

[jira] [Commented] (HIVE-19771) allowNullColumnForMissingStats should not be false when column stats are estimated

2018-06-11 Thread Hive QA (JIRA)


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

Hive QA commented on HIVE-19771:




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

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

{color:red}ERROR:{color} -1 due to 2 failed/errored test(s), 14517 tests 
executed
*Failed tests:*
{noformat}
org.apache.hadoop.hive.cli.TestMiniLlapLocalCliDriver.testCliDriver[orc_llap] 
(batchId=165)
org.apache.hadoop.hive.ql.stats.TestStatsUpdaterThread.testQueueingWithThreads 
(batchId=276)
{noformat}

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

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

This message is automatically generated.

ATTACHMENT ID: 12927234 - PreCommit-HIVE-Build

> allowNullColumnForMissingStats should not be false when column stats are 
> estimated
> --
>
> Key: HIVE-19771
> URL: https://issues.apache.org/jira/browse/HIVE-19771
> Project: Hive
>  Issue Type: Bug
>  Components: CBO
>Affects Versions: 3.0.0
>Reporter: Jesus Camacho Rodriguez
>Assignee: Jesus Camacho Rodriguez
>Priority: Major
> Attachments: HIVE-19771.01.patch, HIVE-19771.02.patch, 
> HIVE-19771.03.patch, HIVE-19771.patch
>
>
> Otherwise we may throw an Exception.
> {noformat}
> 2018-05-26T00:30:22,335 DEBUG [HiveServer2-Background-Pool: Thread-631]: 
> stats.StatsUtils (:()) - Estimated average row size: 372
> 2018-05-26T00:30:22,352 DEBUG [HiveServer2-Background-Pool: Thread-631]: 
> calcite.RelOptHiveTable (:()) - Stats for column a in table basetable_rebuild 
> stored in cache
> 2018-05-26T00:30:22,352 DEBUG [HiveServer2-Background-Pool: Thread-631]: 
> calcite.RelOptHiveTable (:()) -  colName: a colType: int countDistincts: 4 
> numNulls: 1 avgColLen: 4.0 numTrues: 0 numFalses: 0 Range: [ min: 
> -9223372036854775808 max: 9223372036854775807 ] isPrimaryKey: false 
> isEstimated: true
> 2018-05-26T00:30:22,352 DEBUG [HiveServer2-Background-Pool: Thread-631]: 
> calcite.RelOptHiveTable (:()) - Stats for column b in table basetable_rebuild 
> stored in cache
> 2018-05-26T00:30:22,352 DEBUG [HiveServer2-Background-Pool: Thread-631]: 
> calcite.RelOptHiveTable (:()) -  colName: b colType: varchar(256) 
> countDistincts: 4 numNulls: 1 avgColLen: 256.0 numTrues: 0 numFalses: 0 
> isPrimaryKey: false isEstimated: true
> 2018-05-26T00:30:22,352 ERROR [HiveServer2-Background-Pool: Thread-631]: 
> calcite.RelOptHiveTable (:()) - No Stats for default@basetable_rebuild, 
> Columns: a, b
> java.lang.RuntimeException: No Stats for default@basetable_rebuild, Columns: 
> a, b
> at 
> org.apache.hadoop.hive.ql.optimizer.calcite.RelOptHiveTable.updateColStats(RelOptHiveTable.java:586)
>  ~[hive-exec-3.0.0.jar:3.0.0-SNAPSHOT]
> at 
> org.apache.hadoop.hive.ql.optimizer.calcite.RelOptHiveTable.getColStat(RelOptHiveTable.java:606)
>  ~[hive-exec-3.0.0.jar:3.0.0-SNAPSHOT]
> at 
> org.apache.hadoop.hive.ql.optimizer.calcite.RelOptHiveTable.getColStat(RelOptHiveTable.java:592)
>  ~[hive-exec-3.0.0.jar:3.0.0-SNAPSHOT]
> at 
> org.apache.hadoop.hive.ql.optimizer.calcite.reloperators.HiveTableScan.getColStat(HiveTableScan.java:155)
>  ~[hive-exec-3.0.0.jar:3.0.0-SNAPSHOT]
> at 
> org.apache.hadoop.hive.ql.optimizer.calcite.stats.HiveRelMdDistinctRowCount.getDistinctRowCount(HiveRelMdDistinctRowCount.java:78)
>  ~[hive-exec-3.0.0.jar:3.0.0-SNAPSHOT]
> at 
> org.apache.hadoop.hive.ql.optimizer.calcite.stats.HiveRelMdDistinctRowCount.getDistinctRowCount(HiveRelMdDistinctRowCount.java:65)
>  ~[hive-exec-3.0.0.jar:3.0.0-SNAPSHOT]
> at 
> GeneratedMetadataHandler_DistinctRowCount.getDistinctRowCount_$(Unknown 
> Source) ~[?:?]
> at 
> GeneratedMetadataHandler_DistinctRowCount.getDistinctRowCount(Unknown Source) 
> ~[?:?]
> at 
> org.apache.calcite.rel.metadata.RelMetadataQuery.getDistinctRowCount(RelMetadataQuery.java:781)
>  ~[calcite-core-1.16.0.jar:1.16.0]
> at 
> org.apache.calcite.rel.metadata.RelMdRowCount.getRowCount(RelMdRowCount.java:207)
>  ~[calcite-core-1.16.0.jar:1.16.0]
> at GeneratedMetadataHandler_RowCount.getRowCount_$(Unknown Source) 

[jira] [Commented] (HIVE-19771) allowNullColumnForMissingStats should not be false when column stats are estimated

2018-06-11 Thread Hive QA (JIRA)


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

Hive QA commented on HIVE-19771:


| (x) *{color:red}-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 
46s{color} | {color:green} master passed {color} |
| {color:green}+1{color} | {color:green} compile {color} | {color:green}  0m 
54s{color} | {color:green} master passed {color} |
| {color:green}+1{color} | {color:green} checkstyle {color} | {color:green}  0m 
33s{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 2279 extant Findbugs warnings. 
{color} |
| {color:green}+1{color} | {color:green} javadoc {color} | {color:green}  0m 
51s{color} | {color:green} master passed {color} |
|| || || || {color:brown} Patch Compile Tests {color} ||
| {color:green}+1{color} | {color:green} mvninstall {color} | {color:green}  1m 
15s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} compile {color} | {color:green}  0m 
55s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} javac {color} | {color:green}  0m 
55s{color} | {color:green} the patch passed {color} |
| {color:red}-1{color} | {color:red} checkstyle {color} | {color:red}  0m 
34s{color} | {color:red} ql: The patch generated 2 new + 34 unchanged - 1 fixed 
= 36 total (was 35) {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 
37s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} javadoc {color} | {color:green}  0m 
49s{color} | {color:green} the patch passed {color} |
|| || || || {color:brown} Other Tests {color} ||
| {color:green}+1{color} | {color:green} asflicense {color} | {color:green}  0m 
10s{color} | {color:green} The patch does not generate ASF License warnings. 
{color} |
| {color:black}{color} | {color:black} {color} | {color:black} 20m 24s{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-11703/dev-support/hive-personality.sh
 |
| git revision | master / f37fef0 |
| Default Java | 1.8.0_111 |
| findbugs | v3.0.0 |
| checkstyle | 
http://104.198.109.242/logs//PreCommit-HIVE-Build-11703/yetus/diff-checkstyle-ql.txt
 |
| modules | C: ql U: ql |
| Console output | 
http://104.198.109.242/logs//PreCommit-HIVE-Build-11703/yetus.txt |
| Powered by | Apache Yetushttp://yetus.apache.org |


This message was automatically generated.



> allowNullColumnForMissingStats should not be false when column stats are 
> estimated
> --
>
> Key: HIVE-19771
> URL: https://issues.apache.org/jira/browse/HIVE-19771
> Project: Hive
>  Issue Type: Bug
>  Components: CBO
>Affects Versions: 3.0.0
>Reporter: Jesus Camacho Rodriguez
>Assignee: Jesus Camacho Rodriguez
>Priority: Major
> Attachments: HIVE-19771.01.patch, HIVE-19771.02.patch, 
> HIVE-19771.03.patch, HIVE-19771.patch
>
>
> Otherwise we may throw an Exception.
> {noformat}
> 2018-05-26T00:30:22,335 DEBUG [HiveServer2-Background-Pool: Thread-631]: 
> stats.StatsUtils (:()) - Estimated average row size: 372
> 2018-05-26T00:30:22,352 DEBUG [HiveServer2-Background-Pool: Thread-631]: 
> calcite.RelOptHiveTable (:()) - Stats for column a in table basetable_rebuild 
> stored in cache
> 2018-05-26T00:30:22,352 DEBUG [HiveServer2-Background-Pool: Thread-631]: 
> calcite.RelOptHiveTable (:()) -  colName: a colType: int countDistincts: 4 
> numNulls: 1 avgColLen: 4.0 numTrues: 0 numFalses: 0 Range: [ min: 
> -9223372036854775808 max: 9223372036854775807 ] isPrimaryKey: false 
> isEstimated: true
> 2018-05-26T00:30:22,352 DEBUG [HiveServer2-Background-Pool: Thread-631]: 
> calcite.RelOptHiveTable (:()) - Stats for column b in table basetable_rebuild 
> stored in cache
> 2018-05-26T00:30:22,352 DEBUG [HiveServer2-Background-Pool: Thread-631]: 
> 

[jira] [Commented] (HIVE-19771) allowNullColumnForMissingStats should not be false when column stats are estimated

2018-06-10 Thread Hive QA (JIRA)


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

Hive QA commented on HIVE-19771:




Here are the results of testing the latest attachment:
https://issues.apache.org/jira/secure/attachment/12927190/HIVE-19771.02.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), 14514 tests 
executed
*Failed tests:*
{noformat}
org.apache.hive.jdbc.TestTriggersWorkloadManager.testMultipleTriggers2 
(batchId=242)
org.apache.hive.jdbc.TestTriggersWorkloadManager.testTriggerCustomCreatedDynamicPartitions
 (batchId=242)
org.apache.hive.jdbc.TestTriggersWorkloadManager.testTriggerCustomCreatedDynamicPartitionsMultiInsert
 (batchId=242)
org.apache.hive.jdbc.TestTriggersWorkloadManager.testTriggerCustomCreatedDynamicPartitionsUnionAll
 (batchId=242)
org.apache.hive.jdbc.TestTriggersWorkloadManager.testTriggerCustomCreatedFiles 
(batchId=242)
org.apache.hive.jdbc.TestTriggersWorkloadManager.testTriggerCustomNonExistent 
(batchId=242)
org.apache.hive.jdbc.TestTriggersWorkloadManager.testTriggerCustomReadOps 
(batchId=242)
org.apache.hive.jdbc.TestTriggersWorkloadManager.testTriggerHighBytesRead 
(batchId=242)
org.apache.hive.jdbc.TestTriggersWorkloadManager.testTriggerHighShuffleBytes 
(batchId=242)
org.apache.hive.jdbc.TestTriggersWorkloadManager.testTriggerVertexRawInputSplitsNoKill
 (batchId=242)
{noformat}

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

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: 12927190 - PreCommit-HIVE-Build

> allowNullColumnForMissingStats should not be false when column stats are 
> estimated
> --
>
> Key: HIVE-19771
> URL: https://issues.apache.org/jira/browse/HIVE-19771
> Project: Hive
>  Issue Type: Bug
>  Components: CBO
>Affects Versions: 3.0.0
>Reporter: Jesus Camacho Rodriguez
>Assignee: Jesus Camacho Rodriguez
>Priority: Major
> Attachments: HIVE-19771.01.patch, HIVE-19771.02.patch, 
> HIVE-19771.patch
>
>
> Otherwise we may throw an Exception.
> {noformat}
> 2018-05-26T00:30:22,335 DEBUG [HiveServer2-Background-Pool: Thread-631]: 
> stats.StatsUtils (:()) - Estimated average row size: 372
> 2018-05-26T00:30:22,352 DEBUG [HiveServer2-Background-Pool: Thread-631]: 
> calcite.RelOptHiveTable (:()) - Stats for column a in table basetable_rebuild 
> stored in cache
> 2018-05-26T00:30:22,352 DEBUG [HiveServer2-Background-Pool: Thread-631]: 
> calcite.RelOptHiveTable (:()) -  colName: a colType: int countDistincts: 4 
> numNulls: 1 avgColLen: 4.0 numTrues: 0 numFalses: 0 Range: [ min: 
> -9223372036854775808 max: 9223372036854775807 ] isPrimaryKey: false 
> isEstimated: true
> 2018-05-26T00:30:22,352 DEBUG [HiveServer2-Background-Pool: Thread-631]: 
> calcite.RelOptHiveTable (:()) - Stats for column b in table basetable_rebuild 
> stored in cache
> 2018-05-26T00:30:22,352 DEBUG [HiveServer2-Background-Pool: Thread-631]: 
> calcite.RelOptHiveTable (:()) -  colName: b colType: varchar(256) 
> countDistincts: 4 numNulls: 1 avgColLen: 256.0 numTrues: 0 numFalses: 0 
> isPrimaryKey: false isEstimated: true
> 2018-05-26T00:30:22,352 ERROR [HiveServer2-Background-Pool: Thread-631]: 
> calcite.RelOptHiveTable (:()) - No Stats for default@basetable_rebuild, 
> Columns: a, b
> java.lang.RuntimeException: No Stats for default@basetable_rebuild, Columns: 
> a, b
> at 
> org.apache.hadoop.hive.ql.optimizer.calcite.RelOptHiveTable.updateColStats(RelOptHiveTable.java:586)
>  ~[hive-exec-3.0.0.jar:3.0.0-SNAPSHOT]
> at 
> org.apache.hadoop.hive.ql.optimizer.calcite.RelOptHiveTable.getColStat(RelOptHiveTable.java:606)
>  ~[hive-exec-3.0.0.jar:3.0.0-SNAPSHOT]
> at 
> org.apache.hadoop.hive.ql.optimizer.calcite.RelOptHiveTable.getColStat(RelOptHiveTable.java:592)
>  ~[hive-exec-3.0.0.jar:3.0.0-SNAPSHOT]
> at 
> org.apache.hadoop.hive.ql.optimizer.calcite.reloperators.HiveTableScan.getColStat(HiveTableScan.java:155)
>  ~[hive-exec-3.0.0.jar:3.0.0-SNAPSHOT]
> at 
> org.apache.hadoop.hive.ql.optimizer.calcite.stats.HiveRelMdDistinctRowCount.getDistinctRowCount(HiveRelMdDistinctRowCount.java:78)
>  

[jira] [Commented] (HIVE-19771) allowNullColumnForMissingStats should not be false when column stats are estimated

2018-06-10 Thread Hive QA (JIRA)


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

Hive QA commented on HIVE-19771:


| (x) *{color:red}-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 
55s{color} | {color:green} master passed {color} |
| {color:green}+1{color} | {color:green} compile {color} | {color:green}  1m  
8s{color} | {color:green} master passed {color} |
| {color:green}+1{color} | {color:green} checkstyle {color} | {color:green}  0m 
45s{color} | {color:green} master passed {color} |
| {color:blue}0{color} | {color:blue} findbugs {color} | {color:blue}  4m 
50s{color} | {color:blue} ql in master has 2286 extant Findbugs warnings. 
{color} |
| {color:green}+1{color} | {color:green} javadoc {color} | {color:green}  1m 
11s{color} | {color:green} master passed {color} |
|| || || || {color:brown} Patch Compile Tests {color} ||
| {color:green}+1{color} | {color:green} mvninstall {color} | {color:green}  2m 
 8s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} compile {color} | {color:green}  1m 
31s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} javac {color} | {color:green}  1m 
31s{color} | {color:green} the patch passed {color} |
| {color:red}-1{color} | {color:red} checkstyle {color} | {color:red}  0m 
59s{color} | {color:red} ql: The patch generated 2 new + 34 unchanged - 1 fixed 
= 36 total (was 35) {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 
57s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} javadoc {color} | {color:green}  1m 
26s{color} | {color:green} the patch passed {color} |
|| || || || {color:brown} Other Tests {color} ||
| {color:green}+1{color} | {color:green} asflicense {color} | {color:green}  0m 
17s{color} | {color:green} The patch does not generate ASF License warnings. 
{color} |
| {color:black}{color} | {color:black} {color} | {color:black} 28m 51s{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-11690/dev-support/hive-personality.sh
 |
| git revision | master / 773034f |
| Default Java | 1.8.0_111 |
| findbugs | v3.0.0 |
| checkstyle | 
http://104.198.109.242/logs//PreCommit-HIVE-Build-11690/yetus/diff-checkstyle-ql.txt
 |
| modules | C: ql U: ql |
| Console output | 
http://104.198.109.242/logs//PreCommit-HIVE-Build-11690/yetus.txt |
| Powered by | Apache Yetushttp://yetus.apache.org |


This message was automatically generated.



> allowNullColumnForMissingStats should not be false when column stats are 
> estimated
> --
>
> Key: HIVE-19771
> URL: https://issues.apache.org/jira/browse/HIVE-19771
> Project: Hive
>  Issue Type: Bug
>  Components: CBO
>Affects Versions: 3.0.0
>Reporter: Jesus Camacho Rodriguez
>Assignee: Jesus Camacho Rodriguez
>Priority: Major
> Attachments: HIVE-19771.01.patch, HIVE-19771.02.patch, 
> HIVE-19771.patch
>
>
> Otherwise we may throw an Exception.
> {noformat}
> 2018-05-26T00:30:22,335 DEBUG [HiveServer2-Background-Pool: Thread-631]: 
> stats.StatsUtils (:()) - Estimated average row size: 372
> 2018-05-26T00:30:22,352 DEBUG [HiveServer2-Background-Pool: Thread-631]: 
> calcite.RelOptHiveTable (:()) - Stats for column a in table basetable_rebuild 
> stored in cache
> 2018-05-26T00:30:22,352 DEBUG [HiveServer2-Background-Pool: Thread-631]: 
> calcite.RelOptHiveTable (:()) -  colName: a colType: int countDistincts: 4 
> numNulls: 1 avgColLen: 4.0 numTrues: 0 numFalses: 0 Range: [ min: 
> -9223372036854775808 max: 9223372036854775807 ] isPrimaryKey: false 
> isEstimated: true
> 2018-05-26T00:30:22,352 DEBUG [HiveServer2-Background-Pool: Thread-631]: 
> calcite.RelOptHiveTable (:()) - Stats for column b in table basetable_rebuild 
> stored in cache
> 2018-05-26T00:30:22,352 DEBUG [HiveServer2-Background-Pool: Thread-631]: 
> calcite.RelOptHiveTable (:()) -  

[jira] [Commented] (HIVE-19771) allowNullColumnForMissingStats should not be false when column stats are estimated

2018-06-09 Thread Hive QA (JIRA)


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

Hive QA commented on HIVE-19771:




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

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

{color:red}ERROR:{color} -1 due to 7 failed/errored test(s), 14513 tests 
executed
*Failed tests:*
{noformat}
org.apache.hadoop.hive.cli.TestTezPerfCliDriver.testCliDriver[query64] 
(batchId=255)
org.apache.hadoop.hive.ql.optimizer.calcite.rules.TestHiveReduceExpressionsWithStatsRule.testGreaterThan_Below
 (batchId=285)
org.apache.hadoop.hive.ql.optimizer.calcite.rules.TestHiveReduceExpressionsWithStatsRule.testIsNotNull
 (batchId=285)
org.apache.hadoop.hive.ql.optimizer.calcite.rules.TestHiveReduceExpressionsWithStatsRule.testIsNull_all
 (batchId=285)
org.apache.hadoop.hive.ql.optimizer.calcite.rules.TestHiveReduceExpressionsWithStatsRule.testIsNull_one
 (batchId=285)
org.apache.hadoop.hive.ql.optimizer.calcite.rules.TestHiveReduceExpressionsWithStatsRule.testIsNull_zero
 (batchId=285)
org.apache.hive.jdbc.TestJdbcWithMiniLlapArrow.testComplexQuery (batchId=242)
{noformat}

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

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

This message is automatically generated.

ATTACHMENT ID: 12927111 - PreCommit-HIVE-Build

> allowNullColumnForMissingStats should not be false when column stats are 
> estimated
> --
>
> Key: HIVE-19771
> URL: https://issues.apache.org/jira/browse/HIVE-19771
> Project: Hive
>  Issue Type: Bug
>  Components: CBO
>Affects Versions: 3.0.0
>Reporter: Jesus Camacho Rodriguez
>Assignee: Jesus Camacho Rodriguez
>Priority: Major
> Attachments: HIVE-19771.01.patch, HIVE-19771.patch
>
>
> Otherwise we may throw an Exception.
> {noformat}
> 2018-05-26T00:30:22,335 DEBUG [HiveServer2-Background-Pool: Thread-631]: 
> stats.StatsUtils (:()) - Estimated average row size: 372
> 2018-05-26T00:30:22,352 DEBUG [HiveServer2-Background-Pool: Thread-631]: 
> calcite.RelOptHiveTable (:()) - Stats for column a in table basetable_rebuild 
> stored in cache
> 2018-05-26T00:30:22,352 DEBUG [HiveServer2-Background-Pool: Thread-631]: 
> calcite.RelOptHiveTable (:()) -  colName: a colType: int countDistincts: 4 
> numNulls: 1 avgColLen: 4.0 numTrues: 0 numFalses: 0 Range: [ min: 
> -9223372036854775808 max: 9223372036854775807 ] isPrimaryKey: false 
> isEstimated: true
> 2018-05-26T00:30:22,352 DEBUG [HiveServer2-Background-Pool: Thread-631]: 
> calcite.RelOptHiveTable (:()) - Stats for column b in table basetable_rebuild 
> stored in cache
> 2018-05-26T00:30:22,352 DEBUG [HiveServer2-Background-Pool: Thread-631]: 
> calcite.RelOptHiveTable (:()) -  colName: b colType: varchar(256) 
> countDistincts: 4 numNulls: 1 avgColLen: 256.0 numTrues: 0 numFalses: 0 
> isPrimaryKey: false isEstimated: true
> 2018-05-26T00:30:22,352 ERROR [HiveServer2-Background-Pool: Thread-631]: 
> calcite.RelOptHiveTable (:()) - No Stats for default@basetable_rebuild, 
> Columns: a, b
> java.lang.RuntimeException: No Stats for default@basetable_rebuild, Columns: 
> a, b
> at 
> org.apache.hadoop.hive.ql.optimizer.calcite.RelOptHiveTable.updateColStats(RelOptHiveTable.java:586)
>  ~[hive-exec-3.0.0.jar:3.0.0-SNAPSHOT]
> at 
> org.apache.hadoop.hive.ql.optimizer.calcite.RelOptHiveTable.getColStat(RelOptHiveTable.java:606)
>  ~[hive-exec-3.0.0.jar:3.0.0-SNAPSHOT]
> at 
> org.apache.hadoop.hive.ql.optimizer.calcite.RelOptHiveTable.getColStat(RelOptHiveTable.java:592)
>  ~[hive-exec-3.0.0.jar:3.0.0-SNAPSHOT]
> at 
> org.apache.hadoop.hive.ql.optimizer.calcite.reloperators.HiveTableScan.getColStat(HiveTableScan.java:155)
>  ~[hive-exec-3.0.0.jar:3.0.0-SNAPSHOT]
> at 
> org.apache.hadoop.hive.ql.optimizer.calcite.stats.HiveRelMdDistinctRowCount.getDistinctRowCount(HiveRelMdDistinctRowCount.java:78)
>  ~[hive-exec-3.0.0.jar:3.0.0-SNAPSHOT]
> at 
> org.apache.hadoop.hive.ql.optimizer.calcite.stats.HiveRelMdDistinctRowCount.getDistinctRowCount(HiveRelMdDistinctRowCount.java:65)
>  ~[hive-exec-3.0.0.jar:3.0.0-SNAPSHOT]
> at 
> 

[jira] [Commented] (HIVE-19771) allowNullColumnForMissingStats should not be false when column stats are estimated

2018-06-09 Thread Hive QA (JIRA)


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

Hive QA commented on HIVE-19771:


| (x) *{color:red}-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 
57s{color} | {color:green} master passed {color} |
| {color:green}+1{color} | {color:green} compile {color} | {color:green}  0m 
55s{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 
21s{color} | {color:blue} ql in master has 2285 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 
15s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} compile {color} | {color:green}  0m 
55s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} javac {color} | {color:green}  0m 
55s{color} | {color:green} the patch passed {color} |
| {color:red}-1{color} | {color:red} checkstyle {color} | {color:red}  0m 
32s{color} | {color:red} ql: The patch generated 1 new + 34 unchanged - 1 fixed 
= 35 total (was 35) {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 
32s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} javadoc {color} | {color:green}  0m 
48s{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 13s{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-11667/dev-support/hive-personality.sh
 |
| git revision | master / 95ea9f5 |
| Default Java | 1.8.0_111 |
| findbugs | v3.0.0 |
| checkstyle | 
http://104.198.109.242/logs//PreCommit-HIVE-Build-11667/yetus/diff-checkstyle-ql.txt
 |
| modules | C: ql U: ql |
| Console output | 
http://104.198.109.242/logs//PreCommit-HIVE-Build-11667/yetus.txt |
| Powered by | Apache Yetushttp://yetus.apache.org |


This message was automatically generated.



> allowNullColumnForMissingStats should not be false when column stats are 
> estimated
> --
>
> Key: HIVE-19771
> URL: https://issues.apache.org/jira/browse/HIVE-19771
> Project: Hive
>  Issue Type: Bug
>  Components: CBO
>Affects Versions: 3.0.0
>Reporter: Jesus Camacho Rodriguez
>Assignee: Jesus Camacho Rodriguez
>Priority: Major
> Attachments: HIVE-19771.01.patch, HIVE-19771.patch
>
>
> Otherwise we may throw an Exception.
> {noformat}
> 2018-05-26T00:30:22,335 DEBUG [HiveServer2-Background-Pool: Thread-631]: 
> stats.StatsUtils (:()) - Estimated average row size: 372
> 2018-05-26T00:30:22,352 DEBUG [HiveServer2-Background-Pool: Thread-631]: 
> calcite.RelOptHiveTable (:()) - Stats for column a in table basetable_rebuild 
> stored in cache
> 2018-05-26T00:30:22,352 DEBUG [HiveServer2-Background-Pool: Thread-631]: 
> calcite.RelOptHiveTable (:()) -  colName: a colType: int countDistincts: 4 
> numNulls: 1 avgColLen: 4.0 numTrues: 0 numFalses: 0 Range: [ min: 
> -9223372036854775808 max: 9223372036854775807 ] isPrimaryKey: false 
> isEstimated: true
> 2018-05-26T00:30:22,352 DEBUG [HiveServer2-Background-Pool: Thread-631]: 
> calcite.RelOptHiveTable (:()) - Stats for column b in table basetable_rebuild 
> stored in cache
> 2018-05-26T00:30:22,352 DEBUG [HiveServer2-Background-Pool: Thread-631]: 
> calcite.RelOptHiveTable (:()) -  colName: b colType: 

[jira] [Commented] (HIVE-19771) allowNullColumnForMissingStats should not be false when column stats are estimated

2018-06-05 Thread Hive QA (JIRA)


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

Hive QA commented on HIVE-19771:




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

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

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

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-06-05 18:50:45.390
+ [[ -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-11530/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-06-05 18:50:45.392
+ cd apache-github-source-source
+ git fetch origin
+ git reset --hard HEAD
HEAD is now at 98982e6 HIVE-19079: Add extended query string to Spark job 
description (Sahil Takiar, reviewed by Aihua Xu)
+ 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 98982e6 HIVE-19079: Add extended query string to Spark job 
description (Sahil Takiar, reviewed by Aihua Xu)
+ git merge --ff-only origin/master
Already up-to-date.
+ date '+%Y-%m-%d %T.%3N'
2018-06-05 18:50:46.243
+ rm -rf ../yetus_PreCommit-HIVE-Build-11530
+ mkdir ../yetus_PreCommit-HIVE-Build-11530
+ git gc
+ cp -R . ../yetus_PreCommit-HIVE-Build-11530
+ mkdir /data/hiveptest/logs/PreCommit-HIVE-Build-11530/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: 
a/ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/RelOptHiveTable.java: 
does not exist in index
error: 
a/ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/rules/HiveReduceExpressionsWithStatsRule.java:
 does not exist in index
error: 
a/ql/src/test/org/apache/hadoop/hive/ql/optimizer/calcite/rules/TestHiveReduceExpressionsWithStatsRule.java:
 does not exist in index
error: patch failed: 
ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/rules/HiveReduceExpressionsWithStatsRule.java:295
Falling back to three-way merge...
Applied patch to 
'ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/rules/HiveReduceExpressionsWithStatsRule.java'
 with conflicts.
Going to apply patch with: git apply -p1
error: patch failed: 
ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/rules/HiveReduceExpressionsWithStatsRule.java:295
Falling back to three-way merge...
Applied patch to 
'ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/rules/HiveReduceExpressionsWithStatsRule.java'
 with conflicts.
U 
ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/rules/HiveReduceExpressionsWithStatsRule.java
+ result=1
+ '[' 1 -ne 0 ']'
+ rm -rf yetus_PreCommit-HIVE-Build-11530
+ exit 1
'
{noformat}

This message is automatically generated.

ATTACHMENT ID: 12926192 - PreCommit-HIVE-Build

> allowNullColumnForMissingStats should not be false when column stats are 
> estimated
> --
>
> Key: HIVE-19771
> URL: https://issues.apache.org/jira/browse/HIVE-19771
> Project: Hive
>  Issue Type: Bug
>  Components: CBO
>Affects Versions: 3.0.0
>Reporter: Jesus Camacho Rodriguez
>Assignee: Jesus Camacho Rodriguez
>Priority: Major
> Attachments: HIVE-19771.patch
>
>
> Otherwise we may throw an Exception.
> {noformat}
> 2018-05-26T00:30:22,335 DEBUG [HiveServer2-Background-Pool: 

[jira] [Commented] (HIVE-19771) allowNullColumnForMissingStats should not be false when column stats are estimated

2018-06-01 Thread Jesus Camacho Rodriguez (JIRA)


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

Jesus Camacho Rodriguez commented on HIVE-19771:


Cc [~ashutoshc] [~vgarg]

> allowNullColumnForMissingStats should not be false when column stats are 
> estimated
> --
>
> Key: HIVE-19771
> URL: https://issues.apache.org/jira/browse/HIVE-19771
> Project: Hive
>  Issue Type: Bug
>  Components: CBO
>Affects Versions: 3.0.0
>Reporter: Jesus Camacho Rodriguez
>Assignee: Jesus Camacho Rodriguez
>Priority: Major
> Attachments: HIVE-19771.patch
>
>
> Otherwise we may throw an Exception.
> {noformat}
> 2018-05-26T00:30:22,335 DEBUG [HiveServer2-Background-Pool: Thread-631]: 
> stats.StatsUtils (:()) - Estimated average row size: 372
> 2018-05-26T00:30:22,352 DEBUG [HiveServer2-Background-Pool: Thread-631]: 
> calcite.RelOptHiveTable (:()) - Stats for column a in table basetable_rebuild 
> stored in cache
> 2018-05-26T00:30:22,352 DEBUG [HiveServer2-Background-Pool: Thread-631]: 
> calcite.RelOptHiveTable (:()) -  colName: a colType: int countDistincts: 4 
> numNulls: 1 avgColLen: 4.0 numTrues: 0 numFalses: 0 Range: [ min: 
> -9223372036854775808 max: 9223372036854775807 ] isPrimaryKey: false 
> isEstimated: true
> 2018-05-26T00:30:22,352 DEBUG [HiveServer2-Background-Pool: Thread-631]: 
> calcite.RelOptHiveTable (:()) - Stats for column b in table basetable_rebuild 
> stored in cache
> 2018-05-26T00:30:22,352 DEBUG [HiveServer2-Background-Pool: Thread-631]: 
> calcite.RelOptHiveTable (:()) -  colName: b colType: varchar(256) 
> countDistincts: 4 numNulls: 1 avgColLen: 256.0 numTrues: 0 numFalses: 0 
> isPrimaryKey: false isEstimated: true
> 2018-05-26T00:30:22,352 ERROR [HiveServer2-Background-Pool: Thread-631]: 
> calcite.RelOptHiveTable (:()) - No Stats for default@basetable_rebuild, 
> Columns: a, b
> java.lang.RuntimeException: No Stats for default@basetable_rebuild, Columns: 
> a, b
> at 
> org.apache.hadoop.hive.ql.optimizer.calcite.RelOptHiveTable.updateColStats(RelOptHiveTable.java:586)
>  ~[hive-exec-3.0.0.jar:3.0.0-SNAPSHOT]
> at 
> org.apache.hadoop.hive.ql.optimizer.calcite.RelOptHiveTable.getColStat(RelOptHiveTable.java:606)
>  ~[hive-exec-3.0.0.jar:3.0.0-SNAPSHOT]
> at 
> org.apache.hadoop.hive.ql.optimizer.calcite.RelOptHiveTable.getColStat(RelOptHiveTable.java:592)
>  ~[hive-exec-3.0.0.jar:3.0.0-SNAPSHOT]
> at 
> org.apache.hadoop.hive.ql.optimizer.calcite.reloperators.HiveTableScan.getColStat(HiveTableScan.java:155)
>  ~[hive-exec-3.0.0.jar:3.0.0-SNAPSHOT]
> at 
> org.apache.hadoop.hive.ql.optimizer.calcite.stats.HiveRelMdDistinctRowCount.getDistinctRowCount(HiveRelMdDistinctRowCount.java:78)
>  ~[hive-exec-3.0.0.jar:3.0.0-SNAPSHOT]
> at 
> org.apache.hadoop.hive.ql.optimizer.calcite.stats.HiveRelMdDistinctRowCount.getDistinctRowCount(HiveRelMdDistinctRowCount.java:65)
>  ~[hive-exec-3.0.0.jar:3.0.0-SNAPSHOT]
> at 
> GeneratedMetadataHandler_DistinctRowCount.getDistinctRowCount_$(Unknown 
> Source) ~[?:?]
> at 
> GeneratedMetadataHandler_DistinctRowCount.getDistinctRowCount(Unknown Source) 
> ~[?:?]
> at 
> org.apache.calcite.rel.metadata.RelMetadataQuery.getDistinctRowCount(RelMetadataQuery.java:781)
>  ~[calcite-core-1.16.0.jar:1.16.0]
> at 
> org.apache.calcite.rel.metadata.RelMdRowCount.getRowCount(RelMdRowCount.java:207)
>  ~[calcite-core-1.16.0.jar:1.16.0]
> at GeneratedMetadataHandler_RowCount.getRowCount_$(Unknown Source) 
> ~[?:?]
> at GeneratedMetadataHandler_RowCount.getRowCount(Unknown Source) 
> ~[?:?]
> at 
> org.apache.calcite.rel.metadata.RelMetadataQuery.getRowCount(RelMetadataQuery.java:235)
>  ~[calcite-core-1.16.0.jar:1.16.0]
> at 
> org.apache.calcite.rel.externalize.RelWriterImpl.explain_(RelWriterImpl.java:100)
>  ~[calcite-core-1.16.0.jar:1.16.0]
> at 
> org.apache.calcite.rel.externalize.RelWriterImpl.done(RelWriterImpl.java:156) 
> ~[calcite-core-1.16.0.jar:1.16.0]
> at 
> org.apache.calcite.rel.AbstractRelNode.explain(AbstractRelNode.java:312) 
> ~[calcite-core-1.16.0.jar:1.16.0]
> at org.apache.calcite.plan.RelOptUtil.toString(RelOptUtil.java:1991) 
> ~[calcite-core-1.16.0.jar:1.16.0]
> at 
> org.apache.hadoop.hive.ql.parse.CalcitePlanner$CalcitePlannerAction.apply(CalcitePlanner.java:1898)
>  ~[hive-exec-3.0.0.jar:3.0.0-SNAPSHOT]
> at 
> org.apache.hadoop.hive.ql.parse.CalcitePlanner$CalcitePlannerAction.apply(CalcitePlanner.java:1613)
>  ~[hive-exec-3.0.0.jar:3.0.0-SNAPSHOT]
> at org.apache.calcite.tools.Frameworks$1.apply(Frameworks.java:118) 
> ~[calcite-core-1.16.0.jar:1.16.0]
> at 
>