viirya commented on a change in pull request #34951:
URL: https://github.com/apache/spark/pull/34951#discussion_r779249515



##########
File path: python/pyspark/sql/functions.py
##########
@@ -1601,10 +1567,7 @@ def shiftright(col: "ColumnOrName", numBits: int) -> 
Column:
     >>> spark.createDataFrame([(42,)], ['a']).select(shiftright('a', 
1).alias('r')).collect()
     [Row(r=21)]
     """
-    sc = SparkContext._active_spark_context
-    assert sc is not None and sc._jvm is not None
-    jc = sc._jvm.functions.shiftRight(_to_java_column(col), numBits)
-    return Column(jc)
+    return _invoke_function("shiftRight", _to_java_column(col), numBits)

Review comment:
       shiftright?




-- 
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]

Reply via email to