Github user sounakr commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/2341#discussion_r191094114
--- Diff:
store/sdk/src/main/java/org/apache/carbondata/sdk/file/CarbonReader.java ---
@@ -102,7 +104,23 @@ public static CarbonReaderBuilder builder(String
tablePath, String tableName) {
}
/**
- * Read schmea file and return table info object
+ * Read CarbonData file and return the user schema,
+ * the schema order is the same as user save schema
+ */
+ public static List<ColumnSchema> readUserSchema(String dataFilePath)
throws IOException {
+ CarbonHeaderReader reader = new CarbonHeaderReader(dataFilePath);
--- End diff --
Rather than reading the CarbonDataFile, we could read the carbon Index file
which is much smaller in size to get the schema. Reading much bigger chuck file
in OBS is costly.
---