IrishBird commented on PR #34684:
URL: https://github.com/apache/spark/pull/34684#issuecomment-1236227362

   I have a question as to this.
   a. I have one text files that about 12G.  and this file have 5 columns, for 
my broadcast table, I only need to read 1 column, and I called the API :so to 
cache the subset DF into the memory and get size of the DF, it is only around 
2G, so theoretically, it shall allow this DF to broadcast, so how the spark get 
the estimate the size of the dataframe?  
   
   df.cache.foreach(_ => ())
   val catalyst_plan = df.queryExecution.logical
   val df_size_in_bytes = spark.sessionState.executePlan(
       catalyst_plan).optimizedPlan.stats.sizeInBytes


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to