Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SHOW STATS fails with NPE when Iceberg file has no columns with stats #9714

Closed
findepi opened this issue Oct 20, 2021 · 0 comments · Fixed by #9719
Closed

SHOW STATS fails with NPE when Iceberg file has no columns with stats #9714

findepi opened this issue Oct 20, 2021 · 0 comments · Fixed by #9719
Labels
bug Something isn't working
Milestone

Comments

@findepi
Copy link
Member

findepi commented Oct 20, 2021

java.lang.NullPointerException
	at io.trino.plugin.iceberg.TableStatisticsMaker.updatePartitionedStats(TableStatisticsMaker.java:316)
	at io.trino.plugin.iceberg.TableStatisticsMaker.updateSummaryMin(TableStatisticsMaker.java:298)
	at io.trino.plugin.iceberg.TableStatisticsMaker.makeTableStatistics(TableStatisticsMaker.java:155)
	at io.trino.plugin.iceberg.TableStatisticsMaker.getTableStatistics(TableStatisticsMaker.java:73)
	at io.trino.plugin.iceberg.IcebergMetadata.getTableStatistics(IcebergMetadata.java:693)
	at io.trino.plugin.base.classloader.ClassLoaderSafeConnectorMetadata.getTableStatistics(ClassLoaderSafeConnectorMetadata.java:303)
	at io.trino.metadata.MetadataManager.getTableStatistics(MetadataManager.java:578)
	at io.trino.cost.TableScanStatsRule.doCalculate(TableScanStatsRule.java:69)
	at io.trino.cost.TableScanStatsRule.doCalculate(TableScanStatsRule.java:40)
	at io.trino.cost.SimpleStatsRule.calculate(SimpleStatsRule.java:39)
	at io.trino.cost.ComposableStatsCalculator.calculateStats(ComposableStatsCalculator.java:85)
	at io.trino.cost.ComposableStatsCalculator.calculateStats(ComposableStatsCalculator.java:73)
	at io.trino.cost.CachingStatsProvider.getStats(CachingStatsProvider.java:80)
	at io.trino.cost.ExchangeStatsRule.doCalculate(ExchangeStatsRule.java:54)
	at io.trino.cost.ExchangeStatsRule.doCalculate(ExchangeStatsRule.java:32)
	at io.trino.cost.SimpleStatsRule.calculate(SimpleStatsRule.java:39)
	at io.trino.cost.ComposableStatsCalculator.calculateStats(ComposableStatsCalculator.java:85)
	at io.trino.cost.ComposableStatsCalculator.calculateStats(ComposableStatsCalculator.java:73)
	at io.trino.cost.CachingStatsProvider.getStats(CachingStatsProvider.java:80)
	at io.trino.cost.OutputStatsRule.calculate(OutputStatsRule.java:41)
	at io.trino.cost.OutputStatsRule.calculate(OutputStatsRule.java:27)
	at io.trino.cost.ComposableStatsCalculator.calculateStats(ComposableStatsCalculator.java:85)
	at io.trino.cost.ComposableStatsCalculator.calculateStats(ComposableStatsCalculator.java:73)
	at io.trino.cost.CachingStatsProvider.getStats(CachingStatsProvider.java:80)
	at io.trino.cost.StatsAndCosts.create(StatsAndCosts.java:87)
	at io.trino.sql.planner.LogicalPlanner.plan(LogicalPlanner.java:237)
	at io.trino.sql.analyzer.QueryExplainer.getLogicalPlan(QueryExplainer.java:214)
	at io.trino.sql.rewrite.ShowStatsRewrite$Visitor.visitShowStats(ShowStatsRewrite.java:133)
	at io.trino.sql.rewrite.ShowStatsRewrite$Visitor.visitShowStats(ShowStatsRewrite.java:109)
	at io.trino.sql.tree.ShowStats.accept(ShowStats.java:45)
@findepi findepi added the bug Something isn't working label Oct 20, 2021
This was referenced Oct 20, 2021
@findepi findepi added this to the 364 milestone Oct 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

Successfully merging a pull request may close this issue.

1 participant