Skip to content

Honor ignore_stats_calculator_failures in getTableStatistics#14849

Merged
rschlussel merged 1 commit intoprestodb:masterfrom
rschlussel:fix-ignore-stats
Jul 17, 2020
Merged

Honor ignore_stats_calculator_failures in getTableStatistics#14849
rschlussel merged 1 commit intoprestodb:masterfrom
rschlussel:fix-ignore-stats

Conversation

@rschlussel
Copy link
Contributor

@rschlussel rschlussel commented Jul 16, 2020

ignore_stats_calculator_failures was getting enforced in
cachingStatsProvider and cachingCostProvider. However, InputExtractor
was calling getTableStatistics directly, so queries could still fail due
to errors computing stats. This was particularly a problem when filters
were pushed down to the table scan, because we compute filter stats as
part of getTableStatistics().

== RELEASE NOTES ==

General Changes
* Fix an issue where the property ``ignore_stats_calculator_failures`` would not be honored for certain queries that had filters pushed down to the table scan. 

@rschlussel rschlussel requested a review from arhimondr July 16, 2020 20:23
Copy link
Contributor

@mbasmanova mbasmanova left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Would it be possible to add a test?

@rschlussel rschlussel force-pushed the fix-ignore-stats branch 2 times, most recently from 18cbb51 to 14b3683 Compare July 16, 2020 22:30
@rschlussel
Copy link
Contributor Author

Thanks @mbasmanova. test added

Copy link
Contributor

@mbasmanova mbasmanova left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

perhaps, use com.facebook.presto.SystemSessionProperties#IGNORE_STATS_CALCULATOR_FAILURES constant

ignore_stats_calculator_failures was getting enforced in
cachingStatsProvider and cachingCostProvider.  However, InputExtractor
was calling getTableStatistics directly, so queries could still fail due
to errors computing stats.  This was particularly a problem when filters
were pushed down to the table scan, because we compute filter stats as
part of getTableStatistics().
@rschlussel rschlussel merged commit aa049cc into prestodb:master Jul 17, 2020
@rschlussel rschlussel deleted the fix-ignore-stats branch July 17, 2020 15:01
@caithagoras caithagoras mentioned this pull request Jul 28, 2020
13 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants