[ 
https://issues.apache.org/jira/browse/BEAM-8344?focusedWorklogId=327643&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-327643
 ]

ASF GitHub Bot logged work on BEAM-8344:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 14/Oct/19 07:37
            Start Date: 14/Oct/19 07:37
    Worklog Time Spent: 10m 
      Work Description: bmv126 commented on pull request #9721: [BEAM-8344] Add 
inferSchema support in ParquetIO and refactor ParquetTableProvider
URL: https://github.com/apache/beam/pull/9721#discussion_r334354220
 
 

 ##########
 File path: 
sdks/java/io/parquet/src/main/java/org/apache/beam/sdk/io/parquet/ParquetIO.java
 ##########
 @@ -122,15 +122,34 @@
    * pattern).
    */
   public static Read read(Schema schema) {
-    return new AutoValue_ParquetIO_Read.Builder().setSchema(schema).build();
+    return new AutoValue_ParquetIO_Read.Builder()
+        .setSchema(schema)
+        .setInferBeamSchema(false)
+        .build();
   }
 
   /**
    * Like {@link #read(Schema)}, but reads each file in a {@link PCollection} 
of {@link
    * org.apache.beam.sdk.io.FileIO.ReadableFile}, which allows more flexible 
usage.
    */
   public static ReadFiles readFiles(Schema schema) {
-    return new 
AutoValue_ParquetIO_ReadFiles.Builder().setSchema(schema).build();
+    return new AutoValue_ParquetIO_ReadFiles.Builder()
+        .setSchema(schema)
+        .setInferBeamSchema(false)
+        .build();
+  }
+
+  private static <T> PCollection<T> setBeamSchema(
+      PCollection<T> pc, Class<T> clazz, @Nullable Schema schema) {
+    org.apache.beam.sdk.schemas.Schema beamSchema =
+        org.apache.beam.sdk.schemas.utils.AvroUtils.getSchema(clazz, schema);
+    if (beamSchema != null) {
 
 Review comment:
   @amaliujia I have done the modification. Can you have a look
 
----------------------------------------------------------------
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:
[email protected]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 327643)
    Time Spent: 40m  (was: 0.5h)

> Add infer schema support in ParquetIO and refactor ParquetTableProvider
> -----------------------------------------------------------------------
>
>                 Key: BEAM-8344
>                 URL: https://issues.apache.org/jira/browse/BEAM-8344
>             Project: Beam
>          Issue Type: Improvement
>          Components: dsl-sql, io-java-parquet
>            Reporter: Vishwas
>            Assignee: Vishwas
>            Priority: Major
>          Time Spent: 40m
>  Remaining Estimate: 0h
>
> Add support for inferring Beam Schema in ParquetIO.
> Refactor ParquetTable code to use Convert.rows().
> Remove unnecessary java class GenericRecordReadConverter.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to