[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_r283194518
 
 

 ##########
 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:
   I think it's supported by default. Let me test once in S3

----------------------------------------------------------------
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