The traverse_relation_graph, get_type_inference_path, and cast_to_inferred_type all implement a depth-first search algorithm returning the first childless node for which either the Series or transformed Series is of the same type as the node.
This algorithm implicitly assumes the is_relation method on a user defined relation is in fact unique. When the is_relation method is not unique we should warn the user somehow.
Ideas
Run a suite of unit tests against the constructed graph upon construction looking for multiple matching types
modify the search algorithm to look for multiple matches (much less efficient as it requires running many more is_relation and transform operations)
The
traverse_relation_graph
,get_type_inference_path
, andcast_to_inferred_type
all implement a depth-first search algorithm returning the first childless node for which either the Series or transformed Series is of the same type as the node.This algorithm implicitly assumes the is_relation method on a user defined relation is in fact unique. When the is_relation method is not unique we should warn the user somehow.
Ideas