maropu commented on a change in pull request #27828: [SPARK-31068][SQL] Avoid
IllegalArgumentException in broadcast exchange
URL: https://github.com/apache/spark/pull/27828#discussion_r391321039
##########
File path:
sql/core/src/main/scala/org/apache/spark/sql/execution/exchange/BroadcastExchangeExec.scala
##########
@@ -181,6 +182,13 @@ case class BroadcastExchangeExec(
}
object BroadcastExchangeExec {
+ // Since the maximum number of keys that BytesToBytesMap supports is 1 << 29,
+ // and only 70% of the slots can be used before growing in HashedRelation,
+ // here the limitation should not be over 341 million.
+ val MAX_BROADCAST_TABLE_ROWS = ((1L << 29) / 1.5).toLong
Review comment:
nit: `1L << 29` -> `(BytesToBytesMap.MAX_CAPACITY / 1.5).toLong`? Also, how
about moving these constants into the `HashRelation` object since it seems
these constants (e.g., 1.5) come from `HashRelation`?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]