[GitHub] [carbondata] ajantha-bhat commented on a change in pull request #3197: [CARBONDATA-3367][CARBONDATA-3368] Fix multiple issues in SDK reader

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[GitHub] [carbondata] ajantha-bhat commented on a change in pull request #3197: [CARBONDATA-3367][CARBONDATA-3368] Fix multiple issues in SDK reader

GitBox
ajantha-bhat commented on a change in pull request #3197: [CARBONDATA-3367][CARBONDATA-3368] Fix multiple issues in SDK reader
URL: https://github.com/apache/carbondata/pull/3197#discussion_r283372300
 
 

 ##########
 File path: core/src/main/java/org/apache/carbondata/core/metadata/schema/table/CarbonTable.java
 ##########
 @@ -252,12 +250,9 @@ public static CarbonTable buildTable(
       String tableName,
       Configuration configuration) throws IOException {
     TableInfo tableInfoInfer = CarbonUtil.buildDummyTableInfo(tablePath, "null", "null");
-    CarbonFile carbonFile = getLatestIndexFile(FileFactory.getCarbonFile(tablePath, configuration));
-    if (carbonFile == null) {
-      throw new RuntimeException("Carbon index file not exists.");
-    }
-    org.apache.carbondata.format.TableInfo tableInfo = CarbonUtil
-        .inferSchemaFromIndexFile(carbonFile.getPath(), tableName);
+    // InferSchema from data file
+    org.apache.carbondata.format.TableInfo tableInfo =
+        CarbonUtil.inferSchema(tablePath, tableName, false, configuration);
 
 Review comment:
   @xubo245 : I have tested with huge data file (800 MB) and small index fie (500 KB), infer schema time is same for both these files.
   reason is only header is read from s3 and header is in top itself, so no seek operations also.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[hidden email]


With regards,
Apache Git Services