Github user ManoharVanam commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/1560#discussion_r153059129
--- Diff:
integration/spark2/src/main/scala/org/apache/spark/sql/hive/CarbonFileMetastore.scala
---
@@ -353,14 +355,14 @@ class CarbonFileMetastore extends CarbonMetaStore {
val schemaFilePath = carbonTablePath.getSchemaFilePath
val schemaMetadataPath =
CarbonTablePath.getFolderContainingFile(schemaFilePath)
tableInfo.setMetaDataFilepath(schemaMetadataPath)
- val fileType = FileFactory.getFileType(schemaMetadataPath)
- if (!FileFactory.isFileExist(schemaMetadataPath, fileType)) {
- FileFactory.mkdirs(schemaMetadataPath, fileType)
- }
- val thriftWriter = new ThriftWriter(schemaFilePath, false)
- thriftWriter.open(FileWriteOperation.OVERWRITE)
- thriftWriter.write(thriftTableInfo)
- thriftWriter.close()
+ val fileType = FileFactory.getFileType(schemaMetadataPath)
--- End diff --
ok
---