itholic commented on PR #40525:
URL: https://github.com/apache/spark/pull/40525#issuecomment-1501097772
Got it. Then I think we need to modify the current code to import the
`ConnectColumn` only when `is_remote()` is `True` across all code paths. For
example:
**Before**
```python
from pyspark.sql.column import Column as PySparkColumn
from pyspark.sql.connect.column import Column as ConnectColumn
from pyspark.sql.utils import is_remote
def example():
Column = ConnectColumn if is_remote() else PySparkColumn
return Column.__eq__
```
**After**
```python
from pyspark.sql.column import Column as PySparkColumn
from pyspark.sql.utils import is_remote
def example():
if is_remote():
from pyspark.sql.connect.column import Column as ConnectColumn
Column = ConnectColumn
else:
Column = PySparkColumn
return Column.__eq__
```
Also, we should remove `GenericColumn` and `GenericDataFrame`.
Can you happen to think of a better solution? As of now, I haven't come up
with a better way other than this.
Thanks!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]