ajantha-bhat commented on a change in pull request #3787:
URL: https://github.com/apache/carbondata/pull/3787#discussion_r486261767
##########
File path:
integration/spark/src/main/scala/org/apache/carbondata/spark/util/CommonUtil.scala
##########
@@ -801,6 +802,26 @@ object CommonUtil {
}
}
+ def validateGlobalSortPartitions(propertiesMap: mutable.Map[String,
String]): Unit = {
+ if (propertiesMap.get("global_sort_partitions").isDefined) {
+ val globalSortPartitionsProp = propertiesMap("global_sort_partitions")
+ var pass = false
+ try {
+ val globalSortPartitions = Integer.parseInt(globalSortPartitionsProp)
+ if (globalSortPartitions > 0) {
+ pass = true
+ }
+ } catch {
+ case _ =>
+ }
+ if (!pass) {
Review comment:
If there is only one condition I would have done that only, I need to
check `globalSortPartitions > 0` also and throw same error. Hence handing error
at once place
----------------------------------------------------------------
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]