You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@carbondata.apache.org by sounakr <gi...@git.apache.org> on 2018/05/29 07:40:57 UTC

[GitHub] carbondata pull request #2345: [CARBONDATA-2557] Improve Carbon Reader Schem...

Github user sounakr commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/2345#discussion_r191328391
  
    --- Diff: store/sdk/src/main/java/org/apache/carbondata/sdk/file/CarbonReader.java ---
    @@ -101,6 +108,45 @@ public static CarbonReaderBuilder builder(String tablePath, String tableName) {
         return reader.readSchema();
       }
     
    +  /**
    +   * Read carbonindex file and return the schema.
    +   * This API is better use when index file is present,
    +   * as It is faster compared to readSchemaInDataFile when carbondata file is big in size
    +   *
    +   * @param indexFilePath complete path including index file name
    +   * @return List<ColumnSchema> from the index file.
    +   * @throws IOException
    +   */
    +  public static List<ColumnSchema> readSchemaInIndexFile(String indexFilePath) throws IOException {
    --- End diff --
    
    In case we have a performance result for comparison between reading from CarbonIndexFile and CarbonDataFile, and if reading from CarbonIndexFile Shows better output, then better to read from Index File in all places, i.e. whenever internally we infer schema. 



---