ajantha-bhat commented on a change in pull request #3584: [CARBONDATA-3718]
Support SegmentLevel MinMax for better Pruning and less driver memory usage for
cache
URL: https://github.com/apache/carbondata/pull/3584#discussion_r389637371
##########
File path:
integration/spark/src/main/scala/org/apache/carbondata/spark/rdd/CarbonDataRDDFactory.scala
##########
@@ -479,7 +488,17 @@ object CarbonDataRDDFactory {
segmentDetails.add(new Segment(resultOfBlock._2._1.getLoadName))
}
}
- val segmentFiles = updateSegmentFiles(carbonTable, segmentDetails,
updateModel.get)
+ var segmentMinMaxMap: Map[String, List[SegmentMinMax]] = Map()
+ if (!segmentMinMaxAccumulator.isZero) {
+ segmentMinMaxAccumulator.value.asScala.foreach(map => if
(map.nonEmpty) {
+ segmentMinMaxMap = segmentMinMaxMap ++ map
+ })
+ }
+ val segmentFiles = updateSegmentFiles(carbonTable,
Review comment:
Segment min max for a column means, it is a single min max value.
Now we are storing blocklevel minmax (it is a duplicate storage as already
this info is there in file footer).
we need to have a comparator here and find the lowest and highest value form
all the blocks and store that value in the segment file.
----------------------------------------------------------------
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