QiangCai commented on a change in pull request #3912:
URL: https://github.com/apache/carbondata/pull/3912#discussion_r514748658
##########
File path:
integration/spark/src/main/scala/org/apache/carbondata/spark/load/DataLoadProcessBuilderOnSpark.scala
##########
@@ -227,9 +232,15 @@ object DataLoadProcessBuilderOnSpark {
// 2. sort
var numPartitions = CarbonDataProcessorUtil.getGlobalSortPartitions(
configuration.getDataLoadProperty(CarbonCommonConstants.LOAD_GLOBAL_SORT_PARTITIONS))
+
+ // if numPartitions user does not specify and not specified in config then
dynamically calculate
if (numPartitions <= 0) {
- numPartitions = originRDD.partitions.length
+ val defaultMaxSplitBytes =
sessionState(sparkSession).conf.filesMaxPartitionBytes
+ val dynamicPartitionNum =
Math.ceil(SizeEstimator.estimate(originRDD).toDouble /
Review comment:
does SizeEstimator.estimate work for RDD?
----------------------------------------------------------------
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]