REFACTOR: remove code duplication for `PandasOnRayDataframePartitionManager`
See original GitHub issueIn the current implementation, the following methods of PandasOnRayDataframePartitionManager
class (child class of PandasDataframePartitionManager
) are overridden just to apply the progress_bar_wrapper
decorator:
- map_partitions
- lazy_map_partitions
- map_axis_partitions
- _apply_func_to_list_of_partitions
- apply_func_to_select_indices
- apply_func_to_select_indices_along_full_axis
- apply_func_to_indices_both_axis
- binary_operation
Moving the decorator to the base class will remove the duplication of functions.
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
Duplicate Code - Refactoring.Guru
If the duplicate code is inside a constructor, use Pull Up Constructor Body. If the duplicate code is similar but not completely identical,...
Read more >Eliminating code duplication in a single file - Stack Overflow
This project is an ASP.NET/C# project, but I work with a variety of languages including Java; I'm interested in what tools are best...
Read more >The Art of Refactoring: Removing Code Duplications
You can fix this by moving the log message into a parameter passed to the method to be created.
Read more >Releases · modin-project/modin - GitHub
Modin: Scale your Pandas workflows by changing a single line of code - Releases ... Remove code duplication for PandasOnRayDataframePartitionManager (#4895) ...
Read more >How To Remove Duplicate Code Properly From Your App
Removing duplicate code is a simple concept to understand yet it has profound results in regards to code quality and scalability.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Okay, so then do just
maybe even defining a small helper method like
I think we can, but this only solves part of the issue of code duplication.