xinrong-databricks commented on a change in pull request #33275:
URL: https://github.com/apache/spark/pull/33275#discussion_r667099576
##########
File path: python/pyspark/pandas/data_type_ops/string_ops.py
##########
@@ -69,14 +80,21 @@ def radd(self, left: IndexOpsLike, right: Any) ->
SeriesOrIndex:
if isinstance(right, str):
return cast(
SeriesOrIndex,
- left._with_new_scol(F.concat(SF.lit(right),
left.spark.column)), # TODO: dtype?
+ left._with_new_scol(
+ F.concat(SF.lit(right), left.spark.column),
field=left._internal.data_fields[0]
+ ),
)
else:
raise TypeError("Addition can not be applied to given types.")
def rmul(self, left: IndexOpsLike, right: Any) -> SeriesOrIndex:
if isinstance(right, int):
- return column_op(SF.repeat)(left, right)
+ return cast(
Review comment:
Nice!
--
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]