[jira] [Updated] (HIVE-19771) allowNullColumnForMissingStats should not be false when column stats are estimated
[ https://issues.apache.org/jira/browse/HIVE-19771?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jesus Camacho Rodriguez updated HIVE-19771: --- Attachment: HIVE-19771.patch > 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. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (HIVE-19771) allowNullColumnForMissingStats should not be false when column stats are estimated
[ https://issues.apache.org/jira/browse/HIVE-19771?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jesus Camacho Rodriguez updated HIVE-19771: --- Description: Otherwise we may throw an Exception. {noformat} 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.3.0.0.0-1368.jar:3.0.0-SNAPSHOT] at org.apache.hadoop.hive.ql.optimizer.calcite.RelOptHiveTable.getColStat(RelOptHiveTable.java:606) ~[hive-exec-3.0.0.3.0.0.0-1368.jar:3.0.0-SNAPSHOT] at org.apache.hadoop.hive.ql.optimizer.calcite.RelOptHiveTable.getColStat(RelOptHiveTable.java:592) ~[hive-exec-3.0.0.3.0.0.0-1368.jar:3.0.0-SNAPSHOT] at org.apache.hadoop.hive.ql.optimizer.calcite.reloperators.HiveTableScan.getColStat(HiveTableScan.java:155) ~[hive-exec-3.0.0.3.0.0.0-1368.jar:3.0.0-SNAPSHOT] at org.apache.hadoop.hive.ql.optimizer.calcite.stats.HiveRelMdDistinctRowCount.getDistinctRowCount(HiveRelMdDistinctRowCount.java:78) ~[hive-exec-3.0.0.3.0.0.0-1368.jar:3.0.0-SNAPSHOT] at org.apache.hadoop.hive.ql.optimizer.calcite.stats.HiveRelMdDistinctRowCount.getDistinctRowCount(HiveRelMdDistinctRowCount.java:65) ~[hive-exec-3.0.0.3.0.0.0-1368.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.14.0.3.0.0.0-1368.jar:1.14.0.3.0.0.0-1368] at org.apache.calcite.rel.metadata.RelMdRowCount.getRowCount(RelMdRowCount.java:207) ~[calcite-core-1.14.0.3.0.0.0-1368.jar:1.14.0.3.0.0.0-1368] 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.14.0.3.0.0.0-1368.jar:1.14.0.3.0.0.0-1368] at org.apache.calcite.rel.externalize.RelWriterImpl.explain_(RelWriterImpl.java:100) ~[calcite-core-1.14.0.3.0.0.0-1368.jar:1.14.0.3.0.0.0-1368] at org.apache.calcite.rel.externalize.RelWriterImpl.done(RelWriterImpl.java:156) ~[calcite-core-1.14.0.3.0.0.0-1368.jar:1.14.0.3.0.0.0-1368] at org.apache.calcite.rel.AbstractRelNode.explain(AbstractRelNode.java:312) ~[calcite-core-1.14.0.3.0.0.0-1368.jar:1.14.0.3.0.0.0-1368] at org.apache.calcite.plan.RelOptUtil.toString(RelOptUtil.java:1991) ~[calcite-core-1.14.0.3.0.0.0-1368.jar:1.14.0.3.0.0.0-1368] at org.apache.hadoop.hive.ql.parse.CalcitePlanner$CalcitePlannerAction.apply(CalcitePlanner.java:1898) ~[hive-exec-3.0.0.3.0.0.0-1368.jar:3.0.0-SNAPSHOT] at org.apache.hadoop.hive.ql.parse.CalcitePlanner$CalcitePlannerAction.apply(CalcitePlanner.java:1613) ~[hive-exec-3.0.0.3.0.0.0-1368.jar:3.0.0-SNAPSHOT] at org.apache.calcite.tools.Frameworks$1.apply(Frameworks.java:118) ~[calcite-core-1.14.0.3.0.0.0-1368.jar:1.14.0.3.0.0.0-1368] at org.apache.calcite.prepare.CalcitePrepareImpl.perform(CalcitePrepareImpl.java:1052) ~[calcite-core-1.14.0.3.0.0.0-1368.jar:1.14.0.3.0.0.0-1368] at org.apache.calcite.tools.Frameworks.withPrepare(Frameworks.java:154) ~[calcite-core-1.14.0.3.0.0.0-1368.jar:1.14.0.3.0.0.0-1368] at org.apache.calcite.tools.Frameworks.withPlanner(Frameworks.java:111) ~[calcite-core-1.14.0.3.0.0.0-1368.jar:1.14.0.3.0.0.0-1368] at org.apache.hadoop.hive.ql.parse.CalcitePlanner.logicalPlan(CalcitePlanner.java:1418) ~[hive-exec-3.0.0.3.0.0.0-1368.jar:3.0.0-SNAPSHOT] at org.apache.hadoop.hive.ql.parse.CalcitePlanner.genLogicalPlan(CalcitePlanner.java:369) ~[hive-exec-3.0.0.3.0.0.0-1368.jar:3.0.0-SNAPSHOT] at org.apache.hadoop.hive.ql.metadata.HiveMaterializedViewsRegistry.parseQuery(HiveMaterializedViewsRegistry.java:416) ~[hive-exec-3.0.0.3.0.0.0-1368.jar:3.0.0-SNAPSHOT] at org.apache.hadoop.hive.ql.metadata.HiveMaterializedViewsRegistry.addMaterializedView(HiveMaterializedViewsRegistry.java:225) ~[hive-exec-3.0.0.3.0.0.0-1368.jar:3.0.0-SNAPSHOT] at org.apache.hadoop.hive.ql.metadata.HiveMaterializedViewsRegistry.createMaterializedView(HiveMaterializedViewsRegistry.java:188) ~[hive-exec-3.0.0.3.0.0.0-1368.jar:3.0.0-SNAPSHOT] at org.apache.hadoop.hive.ql.exec.MaterializedViewTask.execute(MaterializedViewTask.java:61) ~[hive-exec-3.0.0.3.0.0.0-1368.jar:3.0.0-SNAPSHOT] at org.apache.hadoop.hive.ql.exec.Task.executeTask(Task.java:205) ~[hive-exec-3.0.0.3.0.0.0-1368.jar:3.0.0-SNAPSHOT] at org.apache.hadoop.hive.ql.exec.TaskRunner.runSequential(TaskRunner.java:97) ~[hive-exec-3.0
[jira] [Updated] (HIVE-19771) allowNullColumnForMissingStats should not be false when column stats are estimated
[ https://issues.apache.org/jira/browse/HIVE-19771?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jesus Camacho Rodriguez updated HIVE-19771: --- Status: Patch Available (was: In Progress) > 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. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (HIVE-19771) allowNullColumnForMissingStats should not be false when column stats are estimated
[ https://issues.apache.org/jira/browse/HIVE-19771?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jesus Camacho Rodriguez updated HIVE-19771: --- Description: 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.3.0.0.0-1368.jar:3.0.0-SNAPSHOT] at org.apache.hadoop.hive.ql.optimizer.calcite.RelOptHiveTable.getColStat(RelOptHiveTable.java:606) ~[hive-exec-3.0.0.3.0.0.0-1368.jar:3.0.0-SNAPSHOT] at org.apache.hadoop.hive.ql.optimizer.calcite.RelOptHiveTable.getColStat(RelOptHiveTable.java:592) ~[hive-exec-3.0.0.3.0.0.0-1368.jar:3.0.0-SNAPSHOT] at org.apache.hadoop.hive.ql.optimizer.calcite.reloperators.HiveTableScan.getColStat(HiveTableScan.java:155) ~[hive-exec-3.0.0.3.0.0.0-1368.jar:3.0.0-SNAPSHOT] at org.apache.hadoop.hive.ql.optimizer.calcite.stats.HiveRelMdDistinctRowCount.getDistinctRowCount(HiveRelMdDistinctRowCount.java:78) ~[hive-exec-3.0.0.3.0.0.0-1368.jar:3.0.0-SNAPSHOT] at org.apache.hadoop.hive.ql.optimizer.calcite.stats.HiveRelMdDistinctRowCount.getDistinctRowCount(HiveRelMdDistinctRowCount.java:65) ~[hive-exec-3.0.0.3.0.0.0-1368.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.14.0.3.0.0.0-1368.jar:1.14.0.3.0.0.0-1368] at org.apache.calcite.rel.metadata.RelMdRowCount.getRowCount(RelMdRowCount.java:207) ~[calcite-core-1.14.0.3.0.0.0-1368.jar:1.14.0.3.0.0.0-1368] 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.14.0.3.0.0.0-1368.jar:1.14.0.3.0.0.0-1368] at org.apache.calcite.rel.externalize.RelWriterImpl.explain_(RelWriterImpl.java:100) ~[calcite-core-1.14.0.3.0.0.0-1368.jar:1.14.0.3.0.0.0-1368] at org.apache.calcite.rel.externalize.RelWriterImpl.done(RelWriterImpl.java:156) ~[calcite-core-1.14.0.3.0.0.0-1368.jar:1.14.0.3.0.0.0-1368] at org.apache.calcite.rel.AbstractRelNode.explain(AbstractRelNode.java:312) ~[calcite-core-1.14.0.3.0.0.0-1368.jar:1.14.0.3.0.0.0-1368] at org.apache.calcite.plan.RelOptUtil.toString(RelOptUtil.java:1991) ~[calcite-core-1.14.0.3.0.0.0-1368.jar:1.14.0.3.0.0.0-1368] at org.apache.hadoop.hive.ql.parse.CalcitePlanner$CalcitePlannerAction.apply(CalcitePlanner.java:1898) ~[hive-exec-3.0.0.3.0.0.0-1368.jar:3.0.0-SNAPSHOT] at org.apache.hadoop.hive.ql.parse.CalcitePlanner$CalcitePlannerAction.apply(CalcitePlanner.java:1613) ~[hive-exec-3.0.0.3.0.0.0-1368.jar:3.0.0-SNAPSHOT] at org.apache.calcite.tools.Frameworks$1.apply(Frameworks.java:118) ~[calcite-core-1.14.0.3.0.0.0-1368.jar:1.14.0.3.0.0.0-1368] at org.apache.calcite.prepare.CalcitePrepareImpl.perform(CalcitePrepareImpl.java:1052) ~[calcite-core-1.14.0.3.0.0.0-1368.jar:1.14.0.3.0.0.0-1368] at org.apache.calcite.tools.Frameworks.withPrepare(Frameworks.java:154) ~[calcite-core-1.14.0.3.0.0.0-1368.jar:1.14.0.3.0.0.0-1368] at org.apache.calcite.tools.Frameworks.withPlanner(Frameworks.java:111) ~[calcite-core-1.14.0.3.0.0.0-1368.jar:1.14.0.3.0.0.0-1368] at org.apache.hadoop.hive.ql.parse.CalcitePlan
[jira] [Updated] (HIVE-19771) allowNullColumnForMissingStats should not be false when column stats are estimated
[ https://issues.apache.org/jira/browse/HIVE-19771?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jesus Camacho Rodriguez updated HIVE-19771: --- Description: 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 ... 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.3.0.0.0-1368.jar:3.0.0-SNAPSHOT] at org.apache.hadoop.hive.ql.optimizer.calcite.RelOptHiveTable.getColStat(RelOptHiveTable.java:606) ~[hive-exec-3.0.0.3.0.0.0-1368.jar:3.0.0-SNAPSHOT] at org.apache.hadoop.hive.ql.optimizer.calcite.RelOptHiveTable.getColStat(RelOptHiveTable.java:592) ~[hive-exec-3.0.0.3.0.0.0-1368.jar:3.0.0-SNAPSHOT] at org.apache.hadoop.hive.ql.optimizer.calcite.reloperators.HiveTableScan.getColStat(HiveTableScan.java:155) ~[hive-exec-3.0.0.3.0.0.0-1368.jar:3.0.0-SNAPSHOT] at org.apache.hadoop.hive.ql.optimizer.calcite.stats.HiveRelMdDistinctRowCount.getDistinctRowCount(HiveRelMdDistinctRowCount.java:78) ~[hive-exec-3.0.0.3.0.0.0-1368.jar:3.0.0-SNAPSHOT] at org.apache.hadoop.hive.ql.optimizer.calcite.stats.HiveRelMdDistinctRowCount.getDistinctRowCount(HiveRelMdDistinctRowCount.java:65) ~[hive-exec-3.0.0.3.0.0.0-1368.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.14.0.3.0.0.0-1368.jar:1.14.0.3.0.0.0-1368] at org.apache.calcite.rel.metadata.RelMdRowCount.getRowCount(RelMdRowCount.java:207) ~[calcite-core-1.14.0.3.0.0.0-1368.jar:1.14.0.3.0.0.0-1368] 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.14.0.3.0.0.0-1368.jar:1.14.0.3.0.0.0-1368] at org.apache.calcite.rel.externalize.RelWriterImpl.explain_(RelWriterImpl.java:100) ~[calcite-core-1.14.0.3.0.0.0-1368.jar:1.14.0.3.0.0.0-1368] at org.apache.calcite.rel.externalize.RelWriterImpl.done(RelWriterImpl.java:156) ~[calcite-core-1.14.0.3.0.0.0-1368.jar:1.14.0.3.0.0.0-1368] at org.apache.calcite.rel.AbstractRelNode.explain(AbstractRelNode.java:312) ~[calcite-core-1.14.0.3.0.0.0-1368.jar:1.14.0.3.0.0.0-1368] at org.apache.calcite.plan.RelOptUtil.toString(RelOptUtil.java:1991) ~[calcite-core-1.14.0.3.0.0.0-1368.jar:1.14.0.3.0.0.0-1368] at org.apache.hadoop.hive.ql.parse.CalcitePlanner$CalcitePlannerAction.apply(CalcitePlanner.java:1898) ~[hive-exec-3.0.0.3.0.0.0-1368.jar:3.0.0-SNAPSHOT] at org.apache.hadoop.hive.ql.parse.CalcitePlanner$CalcitePlannerAction.apply(CalcitePlanner.java:1613) ~[hive-exec-3.0.0.3.0.0.0-1368.jar:3.0.0-SNAPSHOT] at org.apache.calcite.tools.Frameworks$1.apply(Frameworks.java:118) ~[calcite-core-1.14.0.3.0.0.0-1368.jar:1.14.0.3.0.0.0-1368] at org.apache.calcite.prepare.CalcitePrepareImpl.perform(CalcitePrepareImpl.java:1052) ~[calcite-core-1.14.0.3.0.0.0-1368.jar:1.14.0.3.0.0.0-1368] at org.apache.calcite.tools.Frameworks.withPrepare(Frameworks.java:154) ~[calcite-core-1.14.0.3.0.0.0-1368.jar:1.14.0.3.0.0.0-1368] at org.apache.calcite.tools.Frameworks.withPlanner(Frameworks.java:111) ~[calcite-core-1.14.0.3.0.0.0-1368.jar:1.14.0.3.0.0.0-1368] at org.apache.hadoop.hive.ql.parse.CalcitePlanner.logicalPlan(CalcitePlanner.java:1418) ~[hive-exec-3.0.0.3.0.0.0-1368.jar:3.0.0-SNAPSHOT] at org.apache.hadoop.hive.ql.parse.CalcitePlanner.genLogic
[jira] [Updated] (HIVE-19771) allowNullColumnForMissingStats should not be false when column stats are estimated
[ https://issues.apache.org/jira/browse/HIVE-19771?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jesus Camacho Rodriguez updated HIVE-19771: --- Description: 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.3.0.0.0-1368.jar:3.0.0-SNAPSHOT] at org.apache.hadoop.hive.ql.optimizer.calcite.RelOptHiveTable.getColStat(RelOptHiveTable.java:606) ~[hive-exec-3.0.0.3.0.0.0-1368.jar:3.0.0-SNAPSHOT] at org.apache.hadoop.hive.ql.optimizer.calcite.RelOptHiveTable.getColStat(RelOptHiveTable.java:592) ~[hive-exec-3.0.0.3.0.0.0-1368.jar:3.0.0-SNAPSHOT] at org.apache.hadoop.hive.ql.optimizer.calcite.reloperators.HiveTableScan.getColStat(HiveTableScan.java:155) ~[hive-exec-3.0.0.3.0.0.0-1368.jar:3.0.0-SNAPSHOT] at org.apache.hadoop.hive.ql.optimizer.calcite.stats.HiveRelMdDistinctRowCount.getDistinctRowCount(HiveRelMdDistinctRowCount.java:78) ~[hive-exec-3.0.0.3.0.0.0-1368.jar:3.0.0-SNAPSHOT] at org.apache.hadoop.hive.ql.optimizer.calcite.stats.HiveRelMdDistinctRowCount.getDistinctRowCount(HiveRelMdDistinctRowCount.java:65) ~[hive-exec-3.0.0.3.0.0.0-1368.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.14.0.3.0.0.0-1368.jar:1.14.0.3.0.0.0-1368] at org.apache.calcite.rel.metadata.RelMdRowCount.getRowCount(RelMdRowCount.java:207) ~[calcite-core-1.14.0.3.0.0.0-1368.jar:1.14.0.3.0.0.0-1368] 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.14.0.3.0.0.0-1368.jar:1.14.0.3.0.0.0-1368] at org.apache.calcite.rel.externalize.RelWriterImpl.explain_(RelWriterImpl.java:100) ~[calcite-core-1.14.0.3.0.0.0-1368.jar:1.14.0.3.0.0.0-1368] at org.apache.calcite.rel.externalize.RelWriterImpl.done(RelWriterImpl.java:156) ~[calcite-core-1.14.0.3.0.0.0-1368.jar:1.14.0.3.0.0.0-1368] at org.apache.calcite.rel.AbstractRelNode.explain(AbstractRelNode.java:312) ~[calcite-core-1.14.0.3.0.0.0-1368.jar:1.14.0.3.0.0.0-1368] at org.apache.calcite.plan.RelOptUtil.toString(RelOptUtil.java:1991) ~[calcite-core-1.14.0.3.0.0.0-1368.jar:1.14.0.3.0.0.0-1368] at org.apache.hadoop.hive.ql.parse.CalcitePlanner$CalcitePlannerAction.apply(CalcitePlanner.java:1898) ~[hive-exec-3.0.0.3.0.0.0-1368.jar:3.0.0-SNAPSHOT] at org.apache.hadoop.hive.ql.parse.CalcitePlanner$CalcitePlannerAction.apply(CalcitePlanner.java:1613) ~[hive-exec-3.0.0.3.0.0.0-1368.jar:3.0.0-SNAPSHOT] at org.apache.calcite.tools.Frameworks$1.apply(Frameworks.java:118) ~[calcite-core-1.14.0.3.0.0.0-1368.jar:1.14.0.3.0.0.0-1368] at org.apache.calcite.prepare.CalcitePrepareImpl.perform(CalcitePrepareImpl.java:1052) ~[calcite-core-1.14.0.3.0.0.0-1368.jar:1.14.0.3.0.0.0-1368] at org.apache.calcite.tools.Frameworks.withPrepare(Frameworks.java:154) ~[calcite-core-1.14.0.3.0.0.0-1368.jar:1.14.0.3.0.0.0-1368] at org.apache.calcite.tools.Frameworks.withPlanner(Frameworks.java:111) ~[calcite-core-1.14.0.3.0.0.0-1368.jar:1.14.0.3.0.0.0-1368] at org.apache.hadoop.hive.ql.parse.CalcitePlanner.
[jira] [Updated] (HIVE-19771) allowNullColumnForMissingStats should not be false when column stats are estimated
[ https://issues.apache.org/jira/browse/HIVE-19771?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jesus Camacho Rodriguez updated HIVE-19771: --- Description: 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.3.0.0.0-1368.jar:3.0.0-SNAPSHOT] at org.apache.hadoop.hive.ql.optimizer.calcite.RelOptHiveTable.getColStat(RelOptHiveTable.java:606) ~[hive-exec-3.0.0.3.0.0.0-1368.jar:3.0.0-SNAPSHOT] at org.apache.hadoop.hive.ql.optimizer.calcite.RelOptHiveTable.getColStat(RelOptHiveTable.java:592) ~[hive-exec-3.0.0.3.0.0.0-1368.jar:3.0.0-SNAPSHOT] at org.apache.hadoop.hive.ql.optimizer.calcite.reloperators.HiveTableScan.getColStat(HiveTableScan.java:155) ~[hive-exec-3.0.0.3.0.0.0-1368.jar:3.0.0-SNAPSHOT] at org.apache.hadoop.hive.ql.optimizer.calcite.stats.HiveRelMdDistinctRowCount.getDistinctRowCount(HiveRelMdDistinctRowCount.java:78) ~[hive-exec-3.0.0.3.0.0.0-1368.jar:3.0.0-SNAPSHOT] at org.apache.hadoop.hive.ql.optimizer.calcite.stats.HiveRelMdDistinctRowCount.getDistinctRowCount(HiveRelMdDistinctRowCount.java:65) ~[hive-exec-3.0.0.3.0.0.0-1368.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.14.0.3.0.0.0-1368.jar:1.14.0.3.0.0.0-1368] at org.apache.calcite.rel.metadata.RelMdRowCount.getRowCount(RelMdRowCount.java:207) ~[calcite-core-1.14.0.3.0.0.0-1368.jar:1.14.0.3.0.0.0-1368] 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.14.0.3.0.0.0-1368.jar:1.14.0.3.0.0.0-1368] at org.apache.calcite.rel.externalize.RelWriterImpl.explain_(RelWriterImpl.java:100) ~[calcite-core-1.14.0.3.0.0.0-1368.jar:1.14.0.3.0.0.0-1368] at org.apache.calcite.rel.externalize.RelWriterImpl.done(RelWriterImpl.java:156) ~[calcite-core-1.14.0.3.0.0.0-1368.jar:1.14.0.3.0.0.0-1368] at org.apache.calcite.rel.AbstractRelNode.explain(AbstractRelNode.java:312) ~[calcite-core-1.14.0.3.0.0.0-1368.jar:1.14.0.3.0.0.0-1368] at org.apache.calcite.plan.RelOptUtil.toString(RelOptUtil.java:1991) ~[calcite-core-1.14.0.3.0.0.0-1368.jar:1.14.0.3.0.0.0-1368] at org.apache.hadoop.hive.ql.parse.CalcitePlanner$CalcitePlannerAction.apply(CalcitePlanner.java:1898) ~[hive-exec-3.0.0.3.0.0.0-1368.jar:3.0.0-SNAPSHOT] at org.apache.hadoop.hive.ql.parse.CalcitePlanner$CalcitePlannerAction.apply(CalcitePlanner.java:1613) ~[hive-exec-3.0.0.3.0.0.0-1368.jar:3.0.0-SNAPSHOT] at org.apache.calcite.tools.Frameworks$1.apply(Frameworks.java:118) ~[calcite-core-1.14.0.3.0.0.0-1368.jar:1.14.0.3.0.0.0-1368] at org.apache.calcite.prepare.CalcitePrepareImpl.perform(CalcitePrepareImpl.java:1052) ~[calcite-core-1.14.0.3.0.0.0-1368.jar:1.14.0.3.0.0.0-1368] at org.apache.calcite.tools.Frameworks.withPrepare(Frameworks.java:154) ~[calcite-core-1.14.0.3.0.0.0-1368.jar:1.14.0.3.0.0.0-1368] at org.apache.calcite.tools.Frameworks.withPlanner(Frameworks.java:111) ~[calcite-core-1.14.0.3.0.0.0-1368.jar:1.14.0.3.0.0.0-1368] at org.apache.hadoop.hive.ql.parse.CalcitePlan
[jira] [Updated] (HIVE-19771) allowNullColumnForMissingStats should not be false when column stats are estimated
[ https://issues.apache.org/jira/browse/HIVE-19771?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jesus Camacho Rodriguez updated HIVE-19771: --- Description: 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 org.apache.calcite.prepare.CalcitePrepareImpl.perform(CalcitePrepareImpl.java:1052) ~[calcite-core-1.16.0.jar:1.16.0.] at org.apache.calcite.tools.Frameworks.withPrepare(Frameworks.java:154) ~[calcite-core-1.16.0.jar:1.16.0.] at org.apache.calcite.tools.Frameworks.withPlanner(Frameworks.java:111) ~[calcite-core-1.16.0.jar:1.16.0.] at org.apache.hadoop.hive.ql.parse.CalcitePlanner.logicalPlan(CalcitePlanner.java:1418) ~[hive-exec-3.0.0.jar:3.0.0-SNAPSHOT] at org.apache.hadoop.hive.ql.parse.CalcitePlanner.genLogicalPlan(CalcitePlanner.java:369) ~[hive-exec-3.0.0.jar:3.0.0-SNAPSHOT] at org.apache.hadoop.hive.ql.metadata.HiveMaterializedViewsRegistry.parseQuery(HiveMaterializedViewsRegistry.java:416) ~[hive-exec-3.0.0.jar:3.0.0-SNAPSHO
[jira] [Updated] (HIVE-19771) allowNullColumnForMissingStats should not be false when column stats are estimated
[ https://issues.apache.org/jira/browse/HIVE-19771?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jesus Camacho Rodriguez updated HIVE-19771: --- Description: 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 org.apache.calcite.prepare.CalcitePrepareImpl.perform(CalcitePrepareImpl.java:1052) ~[calcite-core-1.16.0..jar:1.16.0.] at org.apache.calcite.tools.Frameworks.withPrepare(Frameworks.java:154) ~[calcite-core-1.16.0..jar:1.16.0.] at org.apache.calcite.tools.Frameworks.withPlanner(Frameworks.java:111) ~[calcite-core-1.16.0..jar:1.16.0.] at org.apache.hadoop.hive.ql.parse.CalcitePlanner.logicalPlan(CalcitePlanner.java:1418) ~[hive-exec-3.0.0..jar:3.0.0-SNAPSHOT] at org.apache.hadoop.hive.ql.parse.CalcitePlanner.genLogicalPlan(CalcitePlanner.java:369) ~[hive-exec-3.0.0..jar:3.0.0-SNAPSHOT] at org.apache.hadoop.hive.ql.metadata.HiveMaterializedViewsRegistry.parseQuery(HiveMaterializedViewsRegistry.java:416) ~[hive-exec-3.
[jira] [Updated] (HIVE-19771) allowNullColumnForMissingStats should not be false when column stats are estimated
[ https://issues.apache.org/jira/browse/HIVE-19771?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jesus Camacho Rodriguez updated HIVE-19771: --- Description: 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 org.apache.calcite.prepare.CalcitePrepareImpl.perform(CalcitePrepareImpl.java:1052) ~[calcite-core-1.16.0.jar:1.16.0] at org.apache.calcite.tools.Frameworks.withPrepare(Frameworks.java:154) ~[calcite-core-1.16.0.jar:1.16.0] at org.apache.calcite.tools.Frameworks.withPlanner(Frameworks.java:111) ~[calcite-core-1.16.0.jar:1.16.0] at org.apache.hadoop.hive.ql.parse.CalcitePlanner.logicalPlan(CalcitePlanner.java:1418) ~[hive-exec-3.0.0.jar:3.0.0-SNAPSHOT] at org.apache.hadoop.hive.ql.parse.CalcitePlanner.genLogicalPlan(CalcitePlanner.java:369) ~[hive-exec-3.0.0.jar:3.0.0-SNAPSHOT] at org.apache.hadoop.hive.ql.metadata.HiveMaterializedViewsRegistry.parseQuery(HiveMaterializedViewsRegistry.java:416) ~[hive-exec-3.0.0.jar:3.0.0-SNAPSHOT]
[jira] [Updated] (HIVE-19771) allowNullColumnForMissingStats should not be false when column stats are estimated
[ https://issues.apache.org/jira/browse/HIVE-19771?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jesus Camacho Rodriguez updated HIVE-19771: --- Attachment: HIVE-19771.01.patch > 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 > 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 > org.apache.calcite.prepare.CalciteP
[jira] [Updated] (HIVE-19771) allowNullColumnForMissingStats should not be false when column stats are estimated
[ https://issues.apache.org/jira/browse/HIVE-19771?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jesus Camacho Rodriguez updated HIVE-19771: --- Attachment: HIVE-19771.02.patch > 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) > ~[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 > org.apache.
[jira] [Updated] (HIVE-19771) allowNullColumnForMissingStats should not be false when column stats are estimated
[ https://issues.apache.org/jira/browse/HIVE-19771?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jesus Camacho Rodriguez updated HIVE-19771: --- Attachment: HIVE-19771.03.patch > 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) > ~[?:?] > 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] >
[jira] [Updated] (HIVE-19771) allowNullColumnForMissingStats should not be false when column stats are estimated
[ https://issues.apache.org/jira/browse/HIVE-19771?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jesus Camacho Rodriguez updated HIVE-19771: --- Attachment: HIVE-19771.04.patch > 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) > ~[calcite-core-1.16
[jira] [Updated] (HIVE-19771) allowNullColumnForMissingStats should not be false when column stats are estimated
[ https://issues.apache.org/jira/browse/HIVE-19771?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jesus Camacho Rodriguez updated HIVE-19771: --- Resolution: Fixed Fix Version/s: 3.1.0 Status: Resolved (was: Patch Available) Pushed to master, branch-3. Thanks [~ashutoshc] > 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 > Fix For: 3.1.0 > > 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:1