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

[DOP-23318] Avoid suppressing Hive Metastore errors #329

Merged
merged 2 commits into from
Jan 21, 2025

Conversation

dolfinus
Copy link
Member

Change Summary

Using code like:

try:
  spark.sql(f"SELECT * FROM {table}")
  table_exists = True
except Exception:
  table_exists = False

could lead to overriding table that really exists, but Hive Metastore returned error because it is overloaded. Replace this with solution which doesn't catch all exceptions.

Related issue number

Checklist

  • Commit message and PR title is comprehensive
  • Keep the change as small as possible
  • Unit and integration tests for the changes exist
  • Tests pass on CI and coverage does not decrease
  • Documentation reflects the changes where applicable
  • docs/changelog/next_release/<pull request or issue id>.<change type>.rst file added describing change
    (see CONTRIBUTING.rst for details.)
  • My PR is ready to review.

Copy link

codecov bot commented Jan 17, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.84%. Comparing base (58ec531) to head (a087a21).
Report is 2 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop     #329   +/-   ##
========================================
  Coverage    91.84%   91.84%           
========================================
  Files          227      227           
  Lines         9784     9790    +6     
  Branches       998      999    +1     
========================================
+ Hits          8986     8992    +6     
- Misses         604      606    +2     
+ Partials       194      192    -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@dolfinus dolfinus marked this pull request as ready for review January 21, 2025 07:33
dolfinus and others added 2 commits January 21, 2025 12:36
Co-authored-by: Aleksey Nikoalev <98986158+piece-of-iron@users.noreply.github.com>
@dolfinus dolfinus merged commit 5a3d541 into develop Jan 21, 2025
33 checks passed
@dolfinus dolfinus deleted the bugfix/DOP-23318 branch January 21, 2025 09:48
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.

3 participants