Skip to content

Commit

Permalink
state_incorrect_type
Browse files Browse the repository at this point in the history
  • Loading branch information
zhengruifeng committed Jan 27, 2017
1 parent 0542b42 commit 7bb3e40
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions python/pyspark/sql/dataframe.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
#

import sys
import warnings
import random

if sys.version >= '3':
Expand Down Expand Up @@ -1387,7 +1386,7 @@ def approxQuantile(self, col, probabilities, relativeError):
"""

if not isinstance(col, (str, list, tuple)):
raise ValueError("col should be a string, list or tuple.")
raise ValueError("col should be a string, list or tuple, but got %r" % type(col))

isStr = isinstance(col, str)

Expand All @@ -1398,7 +1397,7 @@ def approxQuantile(self, col, probabilities, relativeError):

for c in col:
if not isinstance(c, str):
raise ValueError("columns should be strings.")
raise ValueError("columns should be strings, but got %r" % type(c))
col = _to_list(self._sc, col)

if not isinstance(probabilities, (list, tuple)):
Expand Down

0 comments on commit 7bb3e40

Please sign in to comment.