From issues-return-128357-apmail-spark-issues-archive=spark.apache.org@spark.apache.org Thu Sep 1 03:16:20 2016 Return-Path: X-Original-To: apmail-spark-issues-archive@minotaur.apache.org Delivered-To: apmail-spark-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B7A0419282 for ; Thu, 1 Sep 2016 03:16:20 +0000 (UTC) Received: (qmail 79487 invoked by uid 500); 1 Sep 2016 03:16:20 -0000 Delivered-To: apmail-spark-issues-archive@spark.apache.org Received: (qmail 79450 invoked by uid 500); 1 Sep 2016 03:16:20 -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 79437 invoked by uid 99); 1 Sep 2016 03:16:20 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Sep 2016 03:16:20 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 720AD2C014E for ; Thu, 1 Sep 2016 03:16:20 +0000 (UTC) Date: Thu, 1 Sep 2016 03:16:20 +0000 (UTC) From: "gurmukh singh (JIRA)" To: issues@spark.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (SPARK-17211) Broadcast join produces incorrect results on EMR with large driver memory MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/SPARK-17211?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15454147#comment-15454147 ] gurmukh singh commented on SPARK-17211: --------------------------------------- yes, outside of EMR. On a node you will have OS, nodemanger, datanode node daemons using memory. One other we might need to look at is java 1.8. I have used java 1.8 on Apache Spark 2.0, for tests. > Broadcast join produces incorrect results on EMR with large driver memory > ------------------------------------------------------------------------- > > Key: SPARK-17211 > URL: https://issues.apache.org/jira/browse/SPARK-17211 > Project: Spark > Issue Type: Bug > Components: PySpark > Affects Versions: 2.0.0 > Reporter: Jarno Seppanen > > Broadcast join produces incorrect columns in join result, see below for an example. The same join but without using broadcast gives the correct columns. > Running PySpark on YARN on Amazon EMR 5.0.0. > {noformat} > import pyspark.sql.functions as func > keys = [ > (54000000, 0), > (54000001, 1), > (54000002, 2), > ] > keys_df = spark.createDataFrame(keys, ['key_id', 'value']).coalesce(1) > keys_df.show() > # +--------+-----+ > # | key_id|value| > # +--------+-----+ > # |54000000| 0| > # |54000001| 1| > # |54000002| 2| > # +--------+-----+ > data = [ > (54000002, 1), > (54000000, 2), > (54000001, 3), > ] > data_df = spark.createDataFrame(data, ['key_id', 'foo']) > data_df.show() > # +--------+---+ > # | key_id|foo| > # +--------+---+ > # |54000002| 1| > # |54000000| 2| > # |54000001| 3| > # +--------+---+ > ### INCORRECT ### > data_df.join(func.broadcast(keys_df), 'key_id').show() > # +--------+---+--------+ > # | key_id|foo| value| > # +--------+---+--------+ > # |54000002| 1|54000002| > # |54000000| 2|54000000| > # |54000001| 3|54000001| > # +--------+---+--------+ > ### CORRECT ### > data_df.join(keys_df, 'key_id').show() > # +--------+---+-----+ > # | key_id|foo|value| > # +--------+---+-----+ > # |54000000| 2| 0| > # |54000001| 3| 1| > # |54000002| 1| 2| > # +--------+---+-----+ > {noformat} -- 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