Github user KanakaKumar commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/2919#discussion_r242577599
--- Diff:
store/sdk/src/main/java/org/apache/carbondata/sdk/file/CarbonSchemaReader.java
---
@@ -241,12 +241,25 @@ private static Schema readSchemaFromIndexFile(String
indexFilePath) throws IOExc
/**
* This method return the version details in formatted string by reading
from carbondata file
+ * default won't validate the version details between different
carbondata files.
*
- * @param dataFilePath
- * @return
+ * @param path carbondata file path or folder path
+ * @return string with information of who has written this file
+ * in which carbondata project version
* @throws IOException
*/
- public static String getVersionDetails(String dataFilePath) throws
IOException {
+ public static String getVersionDetails(String path) throws IOException {
+ if (path.endsWith(INDEX_FILE_EXT)) {
+ throw new RuntimeException("Can't get version details from
carbonindex file.");
+ } else if (path.endsWith(CARBON_DATA_EXT)) {
+ return getVersionDetailsFromDataFile(path);
+ } else {
+ String indexFilePath = getCarbonFile(path,
CARBON_DATA_EXT)[0].getAbsolutePath();
--- End diff --
this is data file
---