Github user HyukjinKwon commented on a diff in the pull request:
https://github.com/apache/spark/pull/21675#discussion_r199316471
--- Diff: python/pyspark/ml/util.py ---
@@ -63,7 +63,7 @@ def _randomUID(cls):
Generate a unique unicode id for the object. The default
implementation
concatenates the class name, "_", and 12 random hex chars.
"""
- return unicode(cls.__name__ + "_" + uuid.uuid4().hex[12:])
+ return unicode(cls.__name__ + "_" + uuid.uuid4().hex[:12])
--- End diff --
Yea, `takeRight(12)` should be equivalent with `hex[-12:]`.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]