dictknife icon indicating copy to clipboard operation
dictknife copied to clipboard

feat: new module dictknife.query

Open podhmo opened this issue 6 years ago • 1 comments

#142

podhmo avatar Jun 03 '19 19:06 podhmo

This pull request enhances the dictknife library by introducing new join operations and corresponding tests. It provides a flexible API for performing various types of joins (inner, left outer, right outer, and full outer) on data structures, along with robust unit tests to ensure correctness.

New join functionality:

  • Added join operations (how_inner_join, how_left_outer_join, how_right_outer_join, how_full_outer_join) to support different types of joins on data structures. These operations utilize customizable accessors and handle missing values gracefully. (dictknife/query.py, dictknife/query.pyR1-R102)
  • Implemented a generic join function that acts as an entry point for performing joins, supporting single and multi-key joins with user-defined accessor factories. (dictknife/query.py, dictknife/query.pyR1-R102)

Unit tests for join operations:

  • Introduced JoinTests in dictknife/tests/test_query.py to validate the correctness of join operations, including inner, left outer, right outer, and full outer joins. (dictknife/tests/test_query.py, dictknife/tests/test_query.pyR1-R260)
  • Added test cases for multi-key joins to ensure the join functionality works correctly with composite keys. (dictknife/tests/test_query.py, dictknife/tests/test_query.pyR1-R260)

podhmo avatar Jul 05 '25 00:07 podhmo