-
Notifications
You must be signed in to change notification settings - Fork 14k
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
fix(hive): Update _latest_partition_from_df in HiveEngineSpec to work on tables with multiple indexes #14302
Conversation
Codecov Report
@@ Coverage Diff @@
## master #14302 +/- ##
==========================================
+ Coverage 76.99% 77.92% +0.93%
==========================================
Files 1047 1005 -42
Lines 56497 51904 -4593
Branches 7799 5703 -2096
==========================================
- Hits 43499 40448 -3051
+ Misses 12742 11256 -1486
+ Partials 256 200 -56
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add a test please
Test added. Please let me know if there is anything else I can do. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, but CI is failing with
black....................................................................Failed
- hook id: black
- files were modified by this hook
reformatted /home/runner/work/superset/superset/tests/db_engine_specs/hive_tests.py
All done! ✨ 🍰 ✨
1 file reformatted, 732 files left unchanged.
Use pre-commit
for fix that automatically
Thank you for the pointer. I have fixed formatting to pass black. |
CI failing with: |
77d19cb
to
8266f8b
Compare
I rebased to master to try make CI green. |
@dpgaspar Sorry for direct tag. |
@codenamelxl sorry for the delayed review, but I agree with the proposed change here. Would you mind rebasing this PR so we can get it merged? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks for the improvement!
Thank for the rebase. Sorry for the late reply. |
… on tables with multiple indexes (#14302) * Fix _latest_partition_from_df in HiveEngineSpec * Add test HiveEngineSpec._latest_partition_from_df * Fix formatting to pass black Co-authored-by: Ville Brofeldt <ville.v.brofeldt@gmail.com>
SUMMARY
Fix #14301
DataFrame.ix is deprecated so I replaced it with .iloc.
Since Hive return partition in form ds={partition name}/ds={partition name} for table with multiple indexes, I also change the logic to make it work for this case.
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
BEFORE:
AFTER:
No more error
TEST PLAN
ADDITIONAL INFORMATION