ravipesala commented on a change in pull request #3182: [WIP] [CARBONDATA-3343] Compaction for Range Sort
URL:
https://github.com/apache/carbondata/pull/3182#discussion_r277662030
##########
File path: integration/spark-common/src/main/scala/org/apache/carbondata/spark/rdd/CarbonMergerRDD.scala
##########
@@ -342,6 +366,35 @@ class CarbonMergerRDD[K, V](
updateDetails, updateStatusManager)))) &&
FileFormat.COLUMNAR_V3.equals(entry.getFileFormat)
}
+ carbonInputSplits ++:= filteredSplits
+ allSplits.addAll(filteredSplits.asJava)
+ }
+
+ var allRanges: Array[RangeValues] = new Array[RangeValues](defaultParallelism)
+ if (rangeColumn != null) {
+ val inputMetricsStats: CarbonInputMetrics = new CarbonInputMetrics
+ val projection = new CarbonProjection
+ projection.addColumn(rangeColumn.getColName)
+ val scanRdd = new CarbonScanRDD[InternalRow](
+ ss,
+ projection,
+ null,
+ carbonTable.getAbsoluteTableIdentifier,
+ carbonTable.getTableInfo.serialize(),
+ carbonTable.getTableInfo,
+ inputMetricsStats,
+ partitionNames = null,
+ splits = allSplits)
+ val objectOrdering: Ordering[Object] = createOrderingForColumn(rangeColumn)
+
+ // Change string type to support all types
+ val sampleRdd = scanRdd
+ .map(row => (row.get(0, Util.convertCarbonToSparkDataType(dataType)), null))
+ val value = new DataSkewRangePartitioner(
+ defaultParallelism, sampleRdd, true)(objectOrdering, classTag[Object])
+ val tempRanges = value.rangeBounds
+ val startAndEnd = value.minMaxVals
Review comment:
No need for the new variable, Please pass them directly
----------------------------------------------------------------
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:
[hidden email]
With regards,
Apache Git Services