Github user KanakaKumar commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/2919#discussion_r242588569
--- 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.");
--- End diff --
RuntimeException is mentioned in the signature. Should throw IOException.
Also some places in this class throws CarbonDataLoadingException but if not
intentional we can change them to IOException as per signature instead of a
subclass of RuntimeException (if it was not intentional)
---