cloud-fan commented on code in PR #42864:
URL: https://github.com/apache/spark/pull/42864#discussion_r1328209431
##########
python/pyspark/sql/column.py:
##########
@@ -712,11 +712,11 @@ def __getitem__(self, k: Any) -> "Column":
--------
>>> df = spark.createDataFrame([('abcedfg', {"key": "value"})], ["l",
"d"])
>>> df.select(df.l[slice(1, 3)], df.d['key']).show()
- +------------------+------+
- |substring(l, 1, 3)|d[key]|
- +------------------+------+
- | abc| value|
- +------------------+------+
+ +---------------+------+
+ |substr(l, 1, 3)|d[key]|
Review Comment:
To avoid this change, I think we can call `self.substring` in this method.
`df.l[slice(1, 3)]` does not require a certain function name, so keeping it as
it was is better.
--
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]