Github user ravipesala commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/1443#discussion_r149936562
--- Diff:
integration/spark2/src/main/scala/org/apache/spark/sql/hive/CarbonFileMetastore.scala
---
@@ -446,6 +447,35 @@ class CarbonFileMetastore extends CarbonMetaStore {
}
}
+ protected def updateParentTableInfo(parentRelationIdentifier:
RelationIdentifier,
+ childCarbonTable: CarbonTable)(sparkSession: SparkSession): Unit = {
+ val dbName = parentRelationIdentifier.getDatabaseName
+ val tableName = parentRelationIdentifier.getTableName
+ try {
+ val parentCarbonTable =
CarbonEnv.getInstance(sparkSession).carbonMetastore
+ .lookupRelation(Some(dbName),
tableName)(sparkSession).asInstanceOf[CarbonRelation]
+ .tableMeta.carbonTable
+ val childSchemas =
parentCarbonTable.getTableInfo.getDataMapSchemaList
--- End diff --
add a null check and throw exception saying unexpected
---