vikramahuja1001 commented on a change in pull request #3565: [CARBONDATA-3662]:
Changes to show metacache command
URL: https://github.com/apache/carbondata/pull/3565#discussion_r365180496
##########
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
Review comment:
done
----------------------------------------------------------------
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]
With regards,
Apache Git Services