Edward Burrows created SEDONA-185:
-------------------------------------
Summary: Methods overwritten in python Adapter class
Key: SEDONA-185
URL: https://issues.apache.org/jira/browse/SEDONA-185
Project: Apache Sedona
Issue Type: Bug
Affects Versions: 1.2.1
Environment: python API
Reporter: Edward Burrows
Python does not natively support multimethods/multiple dispatch (where class
methods share the same name but different parameter counts and/or parameter
types).
The code in this module (sedona.utils.adapter) for the Adapter class has
multiple definitions for the `.toDf` method. Some are being overwritten I
believe as this is not supported in python.
[https://github.com/apache/incubator-sedona/blob/cfaed6ae07a5412f2b98ddf81b46b89f9d96e8c4/python/sedona/utils/adapter.py#L127]
See this link for info on the generic issue:
[overloading - Methods with the same name in one class in Python - Stack
Overflow|https://stackoverflow.com/questions/5079609/methods-with-the-same-name-in-one-class-in-python]
There may be other instances in the code base with the same issue. A linting
tool in the CI/CD would pick these up e.g. flake8 rule F811.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)