Skip to content

Commit ab35ab5

Browse files
committed
fix python test
1 parent b5961a9 commit ab35ab5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

python/pyspark/sql/dataframe.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1275,7 +1275,7 @@ def __init__(self, jc):
12751275

12761276
# container operators
12771277
__contains__ = _bin_op("contains")
1278-
__getitem__ = _bin_op("getItem")
1278+
__getitem__ = getItem
12791279

12801280
# bitwise operators
12811281
bitwiseOR = _bin_op("bitwiseOR")
@@ -1300,7 +1300,7 @@ def getItem(self, key):
13001300
| 1| value|
13011301
+----+------+
13021302
"""
1303-
return self[key]
1303+
return Column(self._jc.getItem(key))
13041304

13051305
def getField(self, name):
13061306
"""An expression that gets a field by name in a StructField.

0 commit comments

Comments
 (0)