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]


Reply via email to