Skip to content

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

Merged
dolfinus merged 2 commits intodevelopfrom
bugfix/DOP-23318
Jan 21, 2025
Merged

[DOP-23318] Avoid suppressing Hive Metastore errors#329
dolfinus merged 2 commits intodevelopfrom
bugfix/DOP-23318

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.

@codecov
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 82 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.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@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