kunal642 commented on a change in pull request #3565: [CARBONDATA-3662]: 
Changes to show metacache command
URL: https://github.com/apache/carbondata/pull/3565#discussion_r365146807
 
 

 ##########
 File path: 
integration/spark2/src/main/scala/org/apache/spark/sql/execution/command/cache/CarbonShowCacheCommand.scala
 ##########
 @@ -135,23 +193,46 @@ case class CarbonShowCacheCommand(tableIdentifier: 
Option[TableIdentifier],
       carbonTables.flatMap {
         mainTable =>
           try {
-            makeRows(getTableCacheFromIndexServer(mainTable)(sparkSession), 
mainTable)
+            val row = makeRows(getTableCacheFromIndexServer(showExecutorCache,
+              mainTable)(sparkSession), mainTable)
+            var res: List[Any] = null
+            for (i <- row.toList) {
+              res = i.toSeq.toList
+            }
+            if (res(1) == 0 && res(2) == 0 && res(3) == 0) {
+              Seq()
+            } else {
+              row
+            }
           } catch {
             case ex: UnsupportedOperationException => Seq()
           }
       }
-    } else { Seq() }
+    } else {
+      Seq()
+    }
 
     val driverRows = if (cache != null) {
       carbonTables.flatMap {
         carbonTable =>
           try {
-            makeRows(getTableCacheFromDriver(sparkSession, carbonTable), 
carbonTable)
+            val row = makeRows(getTableCacheFromDriver(sparkSession, 
carbonTable), carbonTable)
+            var res: List[Any] = null
+            for (i <- row.toList) {
+              res = i.toSeq.toList
+            }
+            if (res(1) == 0 && res(2) == 0 && res(3) == 0) {
 
 Review comment:
   can be done in makeRows method

----------------------------------------------------------------
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


With regards,
Apache Git Services

Reply via email to