Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 66D3B200C4D for ; Wed, 22 Mar 2017 00:28:46 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 65841160B90; Tue, 21 Mar 2017 23:28:46 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id ADF29160B81 for ; Wed, 22 Mar 2017 00:28:45 +0100 (CET) Received: (qmail 69655 invoked by uid 500); 21 Mar 2017 23:28:44 -0000 Mailing-List: contact issues-help@spark.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list issues@spark.apache.org Received: (qmail 69645 invoked by uid 99); 21 Mar 2017 23:28:44 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 21 Mar 2017 23:28:44 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 58F6EC0333 for ; Tue, 21 Mar 2017 23:28:44 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -98.049 X-Spam-Level: X-Spam-Status: No, score=-98.049 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_NUMSUBJECT=0.5, RP_MATCHES_RCVD=-0.001, SPF_NEUTRAL=0.652, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id zW9fP4dreuT2 for ; Tue, 21 Mar 2017 23:28:43 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id A585C5FB40 for ; Tue, 21 Mar 2017 23:28:42 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id C8498E0596 for ; Tue, 21 Mar 2017 23:28:41 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 86BEA254C9 for ; Tue, 21 Mar 2017 23:28:41 +0000 (UTC) Date: Tue, 21 Mar 2017 23:28:41 +0000 (UTC) From: "Hyukjin Kwon (JIRA)" To: issues@spark.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (SPARK-20008) hiveContext.emptyDataFrame.except(hiveContext.emptyDataFrame).count() returns 1 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Tue, 21 Mar 2017 23:28:46 -0000 [ https://issues.apache.org/jira/browse/SPARK-20008?page=3Dcom.atlassia= n.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D159= 35540#comment-15935540 ]=20 Hyukjin Kwon commented on SPARK-20008: -------------------------------------- [~smilegator], it seems the discussion is about deuplicates in the result i= f I understood correctly. The problem here is {{Set() - Set()}} should return empty {{Set()}} which w= as previously done However, it seems now returning {{Set(Row())}} from empty dataframes. In the current master, {code} scala> spark.emptyDataFrame.except(spark.emptyDataFrame).collect() res0: Array[org.apache.spark.sql.Row] =3D Array([]) scala> spark.emptyDataFrame.collect() res1: Array[org.apache.spark.sql.Row] =3D Array() {code} I thought S=E2=88=96S=3D=E2=88=85 as below: {code} scala> spark.range(1).except(spark.range(1)).collect() res14: Array[Long] =3D Array() {code} > hiveContext.emptyDataFrame.except(hiveContext.emptyDataFrame).count() ret= urns 1 > -------------------------------------------------------------------------= ------ > > Key: SPARK-20008 > URL: https://issues.apache.org/jira/browse/SPARK-20008 > Project: Spark > Issue Type: Bug > Components: SQL > Affects Versions: 2.0.2, 2.2.0 > Reporter: Ravindra Bajpai > > hiveContext.emptyDataFrame.except(hiveContext.emptyDataFrame).count() yie= lds 1 against expected 0. > This was not the case with spark 1.5.2. This is an api change from usage = point of view and hence I consider this as a bug. May be a boundary case, n= ot sure. > Work around - For now I check the counts !=3D 0 before this operation. No= t good for performance. Hence creating a jira to track it. > As Young Zhang explained in reply to my mail -=20 > Starting from Spark 2, these kind of operation are implemented in left an= ti join, instead of using RDD operation directly. > Same issue also on sqlContext. > scala> spark.version > res25: String =3D 2.0.2 > spark.sqlContext.emptyDataFrame.except(spark.sqlContext.emptyDataFrame).e= xplain(true) > =3D=3D Physical Plan =3D=3D > *HashAggregate(keys=3D[], functions=3D[], output=3D[]) > +- Exchange SinglePartition > +- *HashAggregate(keys=3D[], functions=3D[], output=3D[]) > +- BroadcastNestedLoopJoin BuildRight, LeftAnti, false > :- Scan ExistingRDD[] > +- BroadcastExchange IdentityBroadcastMode > +- Scan ExistingRDD[] > This arguably means a bug. But my guess is liking the logic of comparing = NULL =3D NULL, should it return true or false, causing this kind of confusi= on.=20 -- 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