Repository: spark
Updated Branches:
  refs/heads/master 489a5294d -> f997be0c3


[SPARK-24698][PYTHON] Fixed typo in pyspark.ml's Identifiable class.

## What changes were proposed in this pull request?

Fixed a small typo in the code that caused 20 random characters to be added to 
the UID, rather than 12.

Author: mcteo <[email protected]>

Closes #21675 from mcteo/SPARK-24698-fix.


Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/f997be0c
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/f997be0c
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/f997be0c

Branch: refs/heads/master
Commit: f997be0c3136f85762b841469e7dfcde7e699ced
Parents: 489a529
Author: mcteo <[email protected]>
Authored: Thu Jul 5 10:05:41 2018 +0800
Committer: hyukjinkwon <[email protected]>
Committed: Thu Jul 5 10:05:41 2018 +0800

----------------------------------------------------------------------
 python/pyspark/ml/util.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/f997be0c/python/pyspark/ml/util.py
----------------------------------------------------------------------
diff --git a/python/pyspark/ml/util.py b/python/pyspark/ml/util.py
index 080cd299..e846834 100644
--- a/python/pyspark/ml/util.py
+++ b/python/pyspark/ml/util.py
@@ -63,7 +63,7 @@ class Identifiable(object):
         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:])
 
 
 @inherit_doc


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to