From f4cf7c54fd06df2d17dbbfe627ff9722c78526fc Mon Sep 17 00:00:00 2001 From: kunal642 Date: Wed, 7 Feb 2018 12:16:14 +0530 Subject: [PATCH] refresh fix --- .../apache/spark/sql/hive/CarbonHiveMetaStore.scala | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/integration/spark2/src/main/scala/org/apache/spark/sql/hive/CarbonHiveMetaStore.scala b/integration/spark2/src/main/scala/org/apache/spark/sql/hive/CarbonHiveMetaStore.scala index 759471b9c47..e12e806b7bf 100644 --- a/integration/spark2/src/main/scala/org/apache/spark/sql/hive/CarbonHiveMetaStore.scala +++ b/integration/spark2/src/main/scala/org/apache/spark/sql/hive/CarbonHiveMetaStore.scala @@ -24,7 +24,7 @@ import org.apache.spark.sql.catalyst.TableIdentifier import org.apache.carbondata.core.cache.dictionary.ManageDictionaryAndBTree import org.apache.carbondata.core.datamap.DataMapStoreManager -import org.apache.carbondata.core.metadata.{AbsoluteTableIdentifier, CarbonMetadata, CarbonTableIdentifier} +import org.apache.carbondata.core.metadata.{schema, AbsoluteTableIdentifier, CarbonMetadata, CarbonTableIdentifier} import org.apache.carbondata.core.metadata.converter.ThriftWrapperSchemaConverterImpl import org.apache.carbondata.core.metadata.schema.table.CarbonTable import org.apache.carbondata.core.util.CarbonUtil @@ -182,6 +182,15 @@ class CarbonHiveMetaStore extends CarbonFileMetastore { newTablePath } + override def generateTableSchemaString( + tableInfo: schema.table.TableInfo, + absoluteTableIdentifier: AbsoluteTableIdentifier): String = { + val schemaEvolutionEntry = new schema.SchemaEvolutionEntry + schemaEvolutionEntry.setTimeStamp(tableInfo.getLastUpdatedTime) + tableInfo.getFactTable.getSchemaEvalution.getSchemaEvolutionEntryList.add(schemaEvolutionEntry) + CarbonUtil.convertToMultiGsonStrings(tableInfo, " ", "", ",") + } + /** * This method will is used to remove the evolution entry in case of failure. *