Github user sounakr commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/1692#discussion_r158457994
  
    --- Diff: integration/spark2/src/main/spark2.2/CarbonSessionState.scala ---
    @@ -121,6 +123,19 @@ class CarbonSessionCatalog(
             toRefreshRelation = refreshRelationFromCache(name, 
carbonDatasourceHadoopRelation)
           case LogicalRelation(carbonDatasourceHadoopRelation: 
CarbonDatasourceHadoopRelation, _, _) =>
             toRefreshRelation = refreshRelationFromCache(name, 
carbonDatasourceHadoopRelation)
    +      case SubqueryAlias(_, relation) if
    +      
relation.getClass.getName.equals("org.apache.spark.sql.catalyst.catalog.CatalogRelation")
 ||
    +      
relation.getClass.getName.equals("org.apache.spark.sql.catalyst.catalog.HiveTableRelation")
 ||
    +      relation.getClass.getName.equals(
    +        "org.apache.spark.sql.catalyst.catalog.UnresolvedCatalogRelation") 
=>
    +        val catalogTable = 
CarbonReflectionUtils.getFieldOfCatalogTable("tableMeta",
    +          relation).asInstanceOf[CatalogTable]
    +        
carbonEnv.carbonMetastore.checkSchemasModifiedTimeAndReloadTable(catalogTable.identifier)
    +        refreshTable(catalogTable.identifier)
    +        DataMapStoreManager.getInstance().
    --- End diff --
    
    Please add a log to inform if the table got refreshed.


---

Reply via email to