c21 commented on a change in pull request #32450:
URL: https://github.com/apache/spark/pull/32450#discussion_r627123105
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/logical/Statistics.scala
##########
@@ -49,12 +50,15 @@ object Statistics {
* @param attributeStats Statistics for Attributes.
* @param isRuntime Whether the statistics is inferred from query stage
runtime statistics during
* adaptive query execution.
+ * @param mapOutputStatistics the map output statistics from query stage
runtime statistics during
+ * adaptive query execution.
*/
case class Statistics(
sizeInBytes: BigInt,
rowCount: Option[BigInt] = None,
attributeStats: AttributeMap[ColumnStat] = AttributeMap(Nil),
- isRuntime: Boolean = false) {
+ isRuntime: Boolean = false,
+ mapOutputStatistics: Option[MapOutputStatistics] = None) {
Review comment:
I feel it's a bit weird that `Statistics` has a field
`MapOutputStatistics` where `MapOutputStatistics` is a physical shuffle
operator only thing, but `Statistics` is for all logical operators. Maybe we
can have:
```
RunTimeStatsSpec(
isRuntime: Boolean,
sizeInBytesPerPartition: Option[Array[Long]]
)
Statistics(
runTimeStatsSpec: Option[RunTimeStatsSpec] = None,
...
)
```
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/internal/SQLConf.scala
##########
@@ -598,6 +598,16 @@ object SQLConf {
.bytesConf(ByteUnit.BYTE)
.createOptional
+ val ADAPTIVE_SHUFFLE_HASH_JOIN_LOCAL_MAP_THRESHOLD =
+ buildConf("spark.sql.adaptive.shuffledHashJoinLocalMapThreshold")
+ .doc("Configures the maximum size in bytes for per partition that can be
allowed to build " +
+ "local hash map. If all the partition size not larger than this
threshold, join " +
+ s"selection may use shuffled hash join instead of sort merge join when
" +
+ s"${PREFER_SORTMERGEJOIN.key} is false.")
+ .version("3.2.0")
+ .bytesConf(ByteUnit.BYTE)
+ .createWithDefaultString("64MB")
Review comment:
curious why we choose this default value? to be same as
`spark.sql.adaptive.shuffle.targetPostShuffleInputSize`?
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]