ajantha-bhat commented on a change in pull request #3817:
URL: https://github.com/apache/carbondata/pull/3817#discussion_r453465582



##########
File path: 
integration/spark/src/main/scala/org/apache/spark/sql/parser/CarbonSpark2SqlParser.scala
##########
@@ -766,13 +766,13 @@ class CarbonSpark2SqlParser extends CarbonDDLSqlParser {
       throw new MalformedCarbonCommandException("Invalid table properties")
     }
     if (options.isBucketingEnabled) {
-      if (options.bucketNumber.toString.contains("-") ||
-          options.bucketNumber.toString.contains("+") ||  options.bucketNumber 
== 0) {
+      if (options.bucketNumber.isEmpty ||
+          options.bucketNumber.get.toString.contains("-") || 
options.bucketNumber.get == 0) {

Review comment:
       Just keep `options.bucketNumber.get <= 0`
   
   it can avoid two condition check and redundant string conversion




----------------------------------------------------------------
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:
us...@infra.apache.org


Reply via email to