You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Wenchen Fan (JIRA)" <ji...@apache.org> on 2017/02/22 23:27:44 UTC

[jira] [Updated] (SPARK-19701) the `in` operator in pyspark is broken

     [ https://issues.apache.org/jira/browse/SPARK-19701?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Wenchen Fan updated SPARK-19701:
--------------------------------
    Description: 
{code}
>>> textFile = spark.read.text("/Users/cloud/dev/spark/README.md")
>>> linesWithSpark = textFile.filter("Spark" in textFile.value)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/cloud/product/spark/python/pyspark/sql/column.py", line 426, in __nonzero__
    raise ValueError("Cannot convert column into bool: please use '&' for 'and', '|' for 'or', "
ValueError: Cannot convert column into bool: please use '&' for 'and', '|' for 'or', '~' for 'not' when building DataFrame boolean expressions.
{code}

> the `in` operator in pyspark is broken
> --------------------------------------
>
>                 Key: SPARK-19701
>                 URL: https://issues.apache.org/jira/browse/SPARK-19701
>             Project: Spark
>          Issue Type: Bug
>          Components: PySpark
>    Affects Versions: 2.2.0
>            Reporter: Wenchen Fan
>
> {code}
> >>> textFile = spark.read.text("/Users/cloud/dev/spark/README.md")
> >>> linesWithSpark = textFile.filter("Spark" in textFile.value)
> Traceback (most recent call last):
>   File "<stdin>", line 1, in <module>
>   File "/Users/cloud/product/spark/python/pyspark/sql/column.py", line 426, in __nonzero__
>     raise ValueError("Cannot convert column into bool: please use '&' for 'and', '|' for 'or', "
> ValueError: Cannot convert column into bool: please use '&' for 'and', '|' for 'or', '~' for 'not' when building DataFrame boolean expressions.
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org