[ https://issues.apache.org/jira/browse/SPARK-26214?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16704475#comment-16704475 ]
Thomas Decaux edited comment on SPARK-26214 at 11/30/18 9:32 AM: ----------------------------------------------------------------- Sure, it's already possible to do it (like I said). The same thing for "cache" / "persist" DataFrame method: {code:java} public DataFrame persist(StorageLevel newLevel) { this.sqlContext().cacheManager().cacheQuery(this, scala.None..MODULE$, newLevel); return this; }{code} This is more a "short-cut" method as you can see, it's possible to use cacheManager *OR* the DataFrame method. Same thing for registerTempTable: {code:java} public void registerTempTable(String tableName) { this.sqlContext().registerDataFrameAsTable(this, tableName); }{code} You can see here, this is a short-cut method. I propose to do the same thing for broadcast. was (Author: ebuildy): Sure, it's already to do this (like I said). The same thing for "cache" / "persist" DataFrame method: {code:java} public DataFrame persist(StorageLevel newLevel) { this.sqlContext().cacheManager().cacheQuery(this, scala.None..MODULE$, newLevel); return this; }{code} This is more a "short-cut" method as you can see, it's possible to use cacheManager *OR* the DataFrame method. Same thing for registerTempTable: {code:java} public void registerTempTable(String tableName) { this.sqlContext().registerDataFrameAsTable(this, tableName); }{code} You can see here, this is a short-cut method. I propose to do the same thing for broadcast. > Add "broadcast" method to DataFrame > ----------------------------------- > > Key: SPARK-26214 > URL: https://issues.apache.org/jira/browse/SPARK-26214 > Project: Spark > Issue Type: Wish > Components: SQL > Affects Versions: 2.4.0 > Reporter: Thomas Decaux > Priority: Trivial > Labels: broadcast, dataframe > > As discussed at > [https://stackoverflow.com/questions/43984068/does-spark-sql-autobroadcastjointhreshold-work-for-joins-using-datasets-join-op/43994022,] > it's possible to force broadcast of DataFrame, even if total size is greater > than ``*spark.sql.autoBroadcastJoinThreshold``.* > But this not trivial for beginner, because there is no "broadcast" method (I > know, I am lazy ...). > We could add this method, with a WARN if size is greater than the threshold. > (if it's an easy one, I could do it?) -- This message was sent by Atlassian JIRA (v7.6.3#76005) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org