manishnalla1994 commented on a change in pull request #3212: [CARBONDATA-3377] Fix for Null pointer exception in Range Col compaction
URL:
https://github.com/apache/carbondata/pull/3212#discussion_r284213081
##########
File path: integration/spark-common/src/main/scala/org/apache/carbondata/spark/load/DataLoadProcessBuilderOnSpark.scala
##########
@@ -385,6 +385,11 @@ class ByteArrayOrdering() extends Ordering[Object] {
class StringOrdering() extends Ordering[Object] {
override def compare(x: Object, y: Object): Int = {
- (x.asInstanceOf[UTF8String]).compare(y.asInstanceOf[UTF8String])
+ if (x == null) {
Review comment:
It will work fine as all of the null values will become the lowest values and sort accordingly.
----------------------------------------------------------------
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