Skip to content

Conversation

@davies
Copy link
Contributor

@davies davies commented Jun 23, 2015

It's a common mistake that user will put Column in a boolean expression (together with and , or), which does not work as expected, we should raise a exception in that case, and suggest user to use &, | instead.

@davies
Copy link
Contributor Author

davies commented Jun 23, 2015

cc @rxin

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we mention not as well?

And "Can't" -> "Cannot"

@rxin
Copy link
Contributor

rxin commented Jun 23, 2015

lgtm otherwise

@davies
Copy link
Contributor Author

davies commented Jun 23, 2015

@rxin updated.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missed a space after ~

actually let's do this

Cannot convert column into bool: please use '&' for 'and', '|' for 'or', and '~' for 'not' when building DataFrame boolean expressions.

@davies davies changed the title [SQL] [PYSPARK] raise Exception if column is used in booelan expression [SPARK-8573] [SPARK-8568] [SQL] [PYSPARK] raise Exception if column is used in booelan expression Jun 23, 2015
@SparkQA
Copy link

SparkQA commented Jun 23, 2015

Test build #35590 has finished for PR 6961 at commit f70c08e.

  • This patch fails PySpark unit tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
    • class LinearDataGenerator(object):

@SparkQA
Copy link

SparkQA commented Jun 23, 2015

Test build #954 has finished for PR 6961 at commit f70c08e.

  • This patch fails PySpark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented Jun 23, 2015

Test build #35592 has finished for PR 6961 at commit 07dff84.

  • This patch fails PySpark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented Jun 23, 2015

Test build #35597 has finished for PR 6961 at commit af74bd6.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

asfgit pushed a commit that referenced this pull request Jun 23, 2015
…s used in booelan expression

It's a common mistake that user will put Column in a boolean expression (together with `and` , `or`), which does not work as expected, we should raise a exception in that case, and suggest user to use `&`, `|` instead.

Author: Davies Liu <[email protected]>

Closes #6961 from davies/column_bool and squashes the following commits:

9f19beb [Davies Liu] update message
af74bd6 [Davies Liu] fix tests
07dff84 [Davies Liu] address comments, fix tests
f70c08e [Davies Liu] raise Exception if column is used in booelan expression

(cherry picked from commit 7fb5ae5)
Signed-off-by: Davies Liu <[email protected]>
@asfgit asfgit closed this in 7fb5ae5 Jun 23, 2015
@SparkQA
Copy link

SparkQA commented Jun 23, 2015

Test build #35604 has finished for PR 6961 at commit 9f19beb.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@AmplabJenkins
Copy link

Merged build finished. Test FAILed.

nemccarthy pushed a commit to nemccarthy/spark that referenced this pull request Jun 25, 2015
…s used in booelan expression

It's a common mistake that user will put Column in a boolean expression (together with `and` , `or`), which does not work as expected, we should raise a exception in that case, and suggest user to use `&`, `|` instead.

Author: Davies Liu <[email protected]>

Closes apache#6961 from davies/column_bool and squashes the following commits:

9f19beb [Davies Liu] update message
af74bd6 [Davies Liu] fix tests
07dff84 [Davies Liu] address comments, fix tests
f70c08e [Davies Liu] raise Exception if column is used in booelan expression

(cherry picked from commit 7fb5ae5)
Signed-off-by: Davies Liu <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants