You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by ru...@apache.org on 2023/06/21 02:11:54 UTC
[spark] branch master updated: [SPARK-44107][CONNECT][PYTHON] Hide unsupported Column methods from auto-completion
This is an automated email from the ASF dual-hosted git repository.
ruifengz pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/spark.git
The following commit(s) were added to refs/heads/master by this push:
new 3d52ba49946 [SPARK-44107][CONNECT][PYTHON] Hide unsupported Column methods from auto-completion
3d52ba49946 is described below
commit 3d52ba49946cb0054a58e0026e26ba442c64988d
Author: Ruifeng Zheng <ru...@apache.org>
AuthorDate: Wed Jun 21 10:11:36 2023 +0800
[SPARK-44107][CONNECT][PYTHON] Hide unsupported Column methods from auto-completion
### What changes were proposed in this pull request?
Hide unsupported Column method `_jc` from auto-completion, it is already handled in `__getattr__`, see https://github.com/apache/spark/blob/e6c6d444ae07f1ece127cea6332cce906b5aa1c5/python/pyspark/sql/connect/column.py#L445-L454
### Why are the changes needed?
no need to show unsupported methods
### Does this PR introduce _any_ user-facing change?
yes
before this PR:
<img width="867" alt="Screenshot 2023-06-20 at 21 38 23" src="https://github.com/apache/spark/assets/7322292/bee3c41d-8fa5-4981-9392-cde93a1e9f34">
after this PR:
<img width="878" alt="Screenshot 2023-06-20 at 21 39 42" src="https://github.com/apache/spark/assets/7322292/85e5c7cc-86b7-4919-8c8a-db8dba2c94a9">
### How was this patch tested?
existing UTs and manually check in ipython
Closes #41675 from zhengruifeng/connect_col_hide.
Authored-by: Ruifeng Zheng <ru...@apache.org>
Signed-off-by: Ruifeng Zheng <ru...@apache.org>
---
python/pyspark/sql/connect/column.py | 6 ------
1 file changed, 6 deletions(-)
diff --git a/python/pyspark/sql/connect/column.py b/python/pyspark/sql/connect/column.py
index 4d32da56192..05292938163 100644
--- a/python/pyspark/sql/connect/column.py
+++ b/python/pyspark/sql/connect/column.py
@@ -478,12 +478,6 @@ class Column:
__bool__ = __nonzero__
- @property
- def _jc(self) -> None:
- raise PySparkAttributeError(
- error_class="JVM_ATTRIBUTE_NOT_SUPPORTED", message_parameters={"attr_name": "_jc"}
- )
-
Column.__doc__ = PySparkColumn.__doc__
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org