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_r365136701
########## File path: integration/spark2/src/main/scala/org/apache/spark/sql/execution/command/cache/CarbonShowCacheCommand.scala ########## @@ -41,25 +42,42 @@ import org.apache.carbondata.spark.util.CarbonScalaUtil import org.apache.carbondata.spark.util.CommonUtil.bytesToDisplaySize -case class CarbonShowCacheCommand(tableIdentifier: Option[TableIdentifier], +case class CarbonShowCacheCommand(showExecutorCache: Boolean, + tableIdentifier: Option[TableIdentifier], internalCall: Boolean = false) extends MetadataCommand { private lazy val cacheResult: Seq[(String, Int, Long, String)] = { - executeJobToGetCache(List()) + executeJobToGetCache(showExecutorCache, List()) } private val LOGGER = LogServiceFactory.getLogService(classOf[CarbonShowCacheCommand].getName) override def output: Seq[AttributeReference] = { if (tableIdentifier.isEmpty) { - Seq( - AttributeReference("Database", StringType, nullable = false)(), - AttributeReference("Table", StringType, nullable = false)(), - AttributeReference("Index size", StringType, nullable = false)(), - AttributeReference("Datamap size", StringType, nullable = false)(), - AttributeReference("Dictionary size", StringType, nullable = false)(), - AttributeReference("Cache Location", StringType, nullable = false)()) + val isDistributedPruningEnabled = CarbonProperties.getInstance() + .isDistributedPruningEnabled("", "") + if (showExecutorCache == false) { Review comment: 1. simplyfy the if else block 2. Block in case of indexserver=false ---------------------------------------------------------------- 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