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_r277653660
##########
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))
Review comment:
converting to spark type inside mapper is a heavier operation, Please convert before and pass to mapper
----------------------------------------------------------------
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