diff options
author | Reynold Xin <rxin@databricks.com> | 2015-07-02 16:25:10 -0700 |
---|---|---|
committer | Reynold Xin <rxin@databricks.com> | 2015-07-02 16:25:10 -0700 |
commit | e589e71a2914588985eaea799b52e2f6b4f1e9ae (patch) | |
tree | 6bbc4582a559dc618fea846a0c47f92caa3bab6d /python/pyspark/sql | |
parent | 488bad319a70975733e83c83490240a70beb0c90 (diff) | |
download | spark-e589e71a2914588985eaea799b52e2f6b4f1e9ae.tar.gz spark-e589e71a2914588985eaea799b52e2f6b4f1e9ae.tar.bz2 spark-e589e71a2914588985eaea799b52e2f6b4f1e9ae.zip |
Revert "[SPARK-8784] [SQL] Add Python API for hex and unhex"
This reverts commit fc7aebd94a3c09657fc4dbded0997ed068304e0a.
Diffstat (limited to 'python/pyspark/sql')
-rw-r--r-- | python/pyspark/sql/functions.py | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/python/pyspark/sql/functions.py b/python/pyspark/sql/functions.py index 8a470ce19b..12263e6a75 100644 --- a/python/pyspark/sql/functions.py +++ b/python/pyspark/sql/functions.py @@ -383,34 +383,6 @@ def randn(seed=None): @ignore_unicode_prefix @since(1.5) -def hex(col): - """Computes hex value of the given column, which could be StringType, - BinaryType, IntegerType or LongType. - - >>> sqlContext.createDataFrame([('ABC', 3)], ['a', 'b']).select(hex('a'), hex('b')).collect() - [Row(hex(a)=u'414243', hex(b)=u'3')] - """ - sc = SparkContext._active_spark_context - jc = sc._jvm.functions.hex(_to_java_column(col)) - return Column(jc) - - -@ignore_unicode_prefix -@since(1.5) -def unhex(col): - """Inverse of hex. Interprets each pair of characters as a hexadecimal number - and converts to the byte representation of number. - - >>> sqlContext.createDataFrame([('414243',)], ['a']).select(unhex('a')).collect() - [Row(unhex(a)=bytearray(b'ABC'))] - """ - sc = SparkContext._active_spark_context - jc = sc._jvm.functions.unhex(_to_java_column(col)) - return Column(jc) - - -@ignore_unicode_prefix -@since(1.5) def sha1(col): """Returns the hex string result of SHA-1. |