You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2022/06/30 23:57:56 UTC

[GitHub] [spark] xinrong-databricks opened a new pull request, #37038: [SPARK-39648][PYTHON] Fix type hints of `like`, `rlike`, `ilike` of Column

xinrong-databricks opened a new pull request, #37038:
URL: https://github.com/apache/spark/pull/37038

   ### What changes were proposed in this pull request?
   Fix type hints of `like`, `rlike`, `ilike` of Column.
   
   
   ### Why are the changes needed?
   Current type hints are incorrect so the doc is confusing.
   
   ### Does this PR introduce _any_ user-facing change?
   No. 
   
   ### How was this patch tested?
   Manual tests.
   


-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] HyukjinKwon commented on pull request #37038: [SPARK-39648][PYTHON][PS][DOC] Fix type hints of `like`, `rlike`, `ilike` of Column

Posted by GitBox <gi...@apache.org>.
HyukjinKwon commented on PR #37038:
URL: https://github.com/apache/spark/pull/37038#issuecomment-1176865884

   Merged to master.


-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] xinrong-databricks commented on a diff in pull request #37038: [SPARK-39648][PYTHON][DOC] Fix type hints of `like`, `rlike`, `ilike` of Column

Posted by GitBox <gi...@apache.org>.
xinrong-databricks commented on code in PR #37038:
URL: https://github.com/apache/spark/pull/37038#discussion_r914357361


##########
python/pyspark/sql/column.py:
##########
@@ -656,9 +668,9 @@ def __iter__(self) -> None:
     """
 
     contains = _bin_op("contains", _contains_doc)
-    rlike = _bin_op("rlike", _rlike_doc)
-    like = _bin_op("like", _like_doc)
-    ilike = _bin_op("ilike", _ilike_doc)
+    rlike = _bin_op("rlike", _rlike_doc, is_other_str=True)

Review Comment:
   Sounds good! Defined `_bin_op_other_str`.



-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] HyukjinKwon commented on a diff in pull request #37038: [SPARK-39648][PYTHON][DOC] Fix type hints of `like`, `rlike`, `ilike` of Column

Posted by GitBox <gi...@apache.org>.
HyukjinKwon commented on code in PR #37038:
URL: https://github.com/apache/spark/pull/37038#discussion_r913396549


##########
python/pyspark/sql/column.py:
##########
@@ -656,9 +668,9 @@ def __iter__(self) -> None:
     """
 
     contains = _bin_op("contains", _contains_doc)
-    rlike = _bin_op("rlike", _rlike_doc)
-    like = _bin_op("like", _like_doc)
-    ilike = _bin_op("ilike", _ilike_doc)
+    rlike = _bin_op("rlike", _rlike_doc, is_other_str=True)

Review Comment:
   Or @xinrong-databricks we can alternatively just define them as a proper function.



-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] HyukjinKwon closed pull request #37038: [SPARK-39648][PYTHON][PS][DOC] Fix type hints of `like`, `rlike`, `ilike` of Column

Posted by GitBox <gi...@apache.org>.
HyukjinKwon closed pull request #37038: [SPARK-39648][PYTHON][PS][DOC] Fix type hints of `like`, `rlike`, `ilike` of Column
URL: https://github.com/apache/spark/pull/37038


-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] xinrong-databricks commented on a diff in pull request #37038: [SPARK-39648][PYTHON][DOC] Fix type hints of `like`, `rlike`, `ilike` of Column

Posted by GitBox <gi...@apache.org>.
xinrong-databricks commented on code in PR #37038:
URL: https://github.com/apache/spark/pull/37038#discussion_r914357361


##########
python/pyspark/sql/column.py:
##########
@@ -656,9 +668,9 @@ def __iter__(self) -> None:
     """
 
     contains = _bin_op("contains", _contains_doc)
-    rlike = _bin_op("rlike", _rlike_doc)
-    like = _bin_op("like", _like_doc)
-    ilike = _bin_op("ilike", _ilike_doc)
+    rlike = _bin_op("rlike", _rlike_doc, is_other_str=True)

Review Comment:
   Sounds good! Defined `_bin_op_other_str`.



-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org