spark-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hyukjin Kwon (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SPARK-12218) Boolean logic in sql does not work "not (A and B)" is not the same as "(not A) or (not B)"
Date Fri, 11 Dec 2015 04:55:10 GMT

    [ https://issues.apache.org/jira/browse/SPARK-12218?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15052172#comment-15052172
] 

Hyukjin Kwon commented on SPARK-12218:
--------------------------------------

Then, does this mean closing this issue? [~smilegator]

> Boolean logic in sql does not work  "not (A and B)" is not the same as  "(not A) or (not
B)"
> --------------------------------------------------------------------------------------------
>
>                 Key: SPARK-12218
>                 URL: https://issues.apache.org/jira/browse/SPARK-12218
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 1.5.2
>            Reporter: Irakli Machabeli
>            Priority: Blocker
>
> Two identical queries produce different results
> In [2]: sqlContext.read.parquet('prp_enh1').where(" LoanID=62231 and not( PaymentsReceived=0
and ExplicitRoll in ('PreviouslyPaidOff', 'PreviouslyChargedOff'))").count()
> Out[2]: 18
> In [3]: sqlContext.read.parquet('prp_enh1').where(" LoanID=62231 and ( not(PaymentsReceived=0)
or not (ExplicitRoll in ('PreviouslyPaidOff', 'PreviouslyChargedOff')))").count()
> Out[3]: 28



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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


Mime
View raw message