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 3ED8A200BAD for ; Tue, 25 Oct 2016 11:45:00 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 3D86C160AE6; Tue, 25 Oct 2016 09:45:00 +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 68C12160AFA for ; Tue, 25 Oct 2016 11:44:59 +0200 (CEST) Received: (qmail 19426 invoked by uid 500); 25 Oct 2016 09:44:58 -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 19389 invoked by uid 99); 25 Oct 2016 09:44:58 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 25 Oct 2016 09:44:58 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 60C4F2C1F5A for ; Tue, 25 Oct 2016 09:44:58 +0000 (UTC) Date: Tue, 25 Oct 2016 09:44:58 +0000 (UTC) From: "Stavros Kontopoulos (JIRA)" To: issues@spark.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (SPARK-17959) spark.sql.join.preferSortMergeJoin has no effect for simple join due to calculated size of LogicalRdd MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Tue, 25 Oct 2016 09:45:00 -0000 [ https://issues.apache.org/jira/browse/SPARK-17959?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15604810#comment-15604810 ] Stavros Kontopoulos commented on SPARK-17959: --------------------------------------------- [~srowen]What do you think? I was not sure who I should ping this time. > spark.sql.join.preferSortMergeJoin has no effect for simple join due to calculated size of LogicalRdd > ----------------------------------------------------------------------------------------------------- > > Key: SPARK-17959 > URL: https://issues.apache.org/jira/browse/SPARK-17959 > Project: Spark > Issue Type: Bug > Components: SQL > Affects Versions: 2.0.1 > Reporter: Stavros Kontopoulos > > Example code: > val df = spark.sparkContext.parallelize(List(("A", 10, "dss@s1"), ("A", 20, "dss@s2"), > ("B", 1, "dss@qqa"), ("B", 2, "dss@qqb"))).toDF("Group", "Amount", "Email") > df.as("a").join(df.as("b")) > .where($"a.Group" === $"b.Group") > .explain() > I always get the SortMerge strategy (never shuffle hash join) even if i set spark.sql.join.preferSortMergeJoin to false since: > sinzeInBytes = 2^63-1 > https://github.com/apache/spark/blob/master/sql/core/src/main/scala/org/apache/spark/sql/execution/ExistingRDD.scala#L101 > and thus: > condition here: https://github.com/apache/spark/blob/master/sql/core/src/main/scala/org/apache/spark/sql/execution/SparkStrategies.scala#L127 > is always false... > I think this shouldnt be the case my df has a specifc size and number of partitions (200 which is btw far from optimal)... -- 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