Github user jackylk commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/2341#discussion_r191323610
--- Diff:
store/sdk/src/main/java/org/apache/carbondata/sdk/file/CarbonReader.java ---
@@ -101,6 +111,59 @@ public static CarbonReaderBuilder builder(String
tablePath, String tableName) {
return reader.readSchema();
}
+ /**
+ * Read carbonindex file and return the schema
+ *
+ * @param indexFilePath complete path including index file name
+ * @return null, if the index file is not present in the path.
+ * List<ColumnSchema> from the index file.
+ * @throws IOException
+ */
+ public static List<ColumnSchema> readSchemaInIndexFile(String
indexFilePath) throws IOException {
--- End diff --
Create a `CarbonSchemaReader` and put `readSchemaInIndexFile`,
`readUserSchema`, `readSchemaInDataFile` into it
---