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

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

                Author: ASF GitHub Bot
            Created on: 30/Oct/20 09:43
            Start Date: 30/Oct/20 09:43
    Worklog Time Spent: 10m 
      Work Description: rworley-monster edited a comment on pull request #13229:
URL: https://github.com/apache/beam/pull/13229#issuecomment-719448639


   A Schema enum is written to a BigQuery string field, but the same BigQuery 
string field is read back into a Schema string field.  I'm not sure if there is 
a practical/good way to recreate the Schema enum when reading from BigQuery.  
Would that be a requirement for this enhancement?
   
   Brainstorming options:
   1. The enum value set could be stored in the BigQuery field description, but 
this is brittle because the description can be altered/corrupted by third 
parties and I'm not sure how practical it would be to update the description 
when the enum value set changes.
   2. Add a method `SchemaConversionOptions.setParseEnums(Map<String, 
Enum<E>>)`, but this assumes that an enum value is never renamed or removed.  
What to do with a value in the BigQuery table that no longer maps to a value in 
the provided enum?  Create `EnumerationType.Value(-1)` and the user will see 
the value as null?  Add the unexpected value to a new EnumerationType instance 
(if practical to update the Schema while iterating TableRows)?


----------------------------------------------------------------
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: 506615)
    Time Spent: 40m  (was: 0.5h)

> Write Schema enum to BigQuery string field
> ------------------------------------------
>
>                 Key: BEAM-11157
>                 URL: https://issues.apache.org/jira/browse/BEAM-11157
>             Project: Beam
>          Issue Type: Improvement
>          Components: io-java-gcp
>            Reporter: Ryan Worley
>            Assignee: Ryan Worley
>            Priority: P2
>          Time Spent: 40m
>  Remaining Estimate: 0h
>
> Currently it is an error to try to write a Schema enum to a BigQuery table.  
> This enhancement will write a Schema enum value to a BigQuery string field.



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

Reply via email to