[GitHub] [carbondata] ravipesala commented on a change in pull request #3339: [CARBONDATA-3480] Fixed unnecessary refresh for table by removing modified mdt file

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

[GitHub] [carbondata] ravipesala commented on a change in pull request #3339: [CARBONDATA-3480] Fixed unnecessary refresh for table by removing modified mdt file

GitBox
ravipesala commented on a change in pull request #3339: [CARBONDATA-3480] Fixed unnecessary refresh for table by removing modified mdt file
URL: https://github.com/apache/carbondata/pull/3339#discussion_r311387962
 
 

 ##########
 File path: integration/spark2/src/main/scala/org/apache/spark/sql/hive/CarbonFileMetastore.scala
 ##########
 @@ -672,4 +560,19 @@ class CarbonFileMetastore extends CarbonMetaStore {
       case _ => throw new NoSuchTableException(tableIdentifier.database.get, tableIdentifier.table)
     }
   }
+
+  def removeStaleTimeStampEntries(sparkSession: SparkSession): Unit = {
+    val tablesList = sparkSession.sessionState.catalog.listDatabases().flatMap {
+      database =>
+        sparkSession.sessionState.catalog.listTables(database)
+          .map(table => s"${ database }_${ table }")
+    }
+    val invalidTableIds = CarbonMetadata.getInstance().getAllTables.asScala.collect {
+      case carbonTable if !tablesList.contains(carbonTable.getTableUniqueName) =>
 
 Review comment:
   Make sure the table uniqueName is case insensitive

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