You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by GitBox <gi...@apache.org> on 2019/04/04 04:14:55 UTC

[GitHub] [incubator-pinot] Jackie-Jiang commented on a change in pull request #4073: Move Parquet related classes to the new package

Jackie-Jiang commented on a change in pull request #4073: Move Parquet related classes to the new package
URL: https://github.com/apache/incubator-pinot/pull/4073#discussion_r272011917
 
 

 ##########
 File path: pinot-parquet/src/main/java/org/apache/pinot/parquet/data/readers/ParquetUtils.java
 ##########
 @@ -26,67 +28,53 @@
 import org.apache.parquet.avro.AvroParquetReader;
 import org.apache.parquet.avro.AvroParquetWriter;
 import org.apache.parquet.avro.AvroSchemaConverter;
+import org.apache.parquet.format.converter.ParquetMetadataConverter;
 import org.apache.parquet.hadoop.ParquetFileReader;
 import org.apache.parquet.hadoop.ParquetReader;
 import org.apache.parquet.hadoop.ParquetWriter;
 import org.apache.parquet.hadoop.metadata.ParquetMetadata;
 
-import java.io.IOException;
-
 
 public class ParquetUtils {
   public static final String DEFAULT_FS = "file:///";
 
   /**
-   * Get a ParquetReader with the given file.
-   * @param fileName the parquet file to read
-   * @return a ParquetReader
-   * @throws IOException
+   * Returns a ParquetReader with the given path.
    */
-  public static ParquetReader<GenericRecord> getParquetReader(String fileName)
+  public static ParquetReader<GenericRecord> getParquetReader(Path path)
       throws IOException {
-    Path dataFsPath = new Path(fileName);
-    return AvroParquetReader.<GenericRecord>builder(dataFsPath).disableCompatibility().withDataModel(GenericData.get())
+    //noinspection unchecked
 
 Review comment:
   IDE can read this and suppress the warning for this cast.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org