[GitHub] [carbondata] NamanRastogi commented on a change in pull request #3164: [WIP] [CARBONDATA-3331] Fix for external table in Show Metacache

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[GitHub] [carbondata] NamanRastogi commented on a change in pull request #3164: [WIP] [CARBONDATA-3331] Fix for external table in Show Metacache

GitBox
NamanRastogi commented on a change in pull request #3164: [WIP] [CARBONDATA-3331] Fix for external table in Show Metacache
URL: https://github.com/apache/carbondata/pull/3164#discussion_r275691272
 
 

 ##########
 File path: integration/spark2/src/main/scala/org/apache/spark/sql/execution/command/cache/CarbonShowCacheCommand.scala
 ##########
 @@ -71,52 +65,64 @@ case class CarbonShowCacheCommand(tableIdentifier: Option[TableIdentifier],
         Row("ALL", "ALL", 0L, 0L, 0L),
         Row(currentDatabase, "ALL", 0L, 0L, 0L))
     } else {
-      val carbonTables = CarbonEnv.getInstance(sparkSession).carbonMetaStore
-        .listAllTables(sparkSession).filter {
-        carbonTable =>
-          carbonTable.getDatabaseName.equalsIgnoreCase(currentDatabase) &&
-          isValidTable(carbonTable, sparkSession) &&
-          !carbonTable.isChildDataMap
+      val carbonTables = sparkSession.sessionState.catalog.listTables(currentDatabase).collect {
+        case tableIdent if CarbonEnv.getInstance(sparkSession).carbonMetaStore
+          .tableExists(tableIdent)(sparkSession) =>
+          CarbonEnv.getCarbonTable(tableIdent)(sparkSession)
 
 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:
[hidden email]


With regards,
Apache Git Services