martinopic opened a new issue, #31559:
URL: https://github.com/apache/beam/issues/31559

   ### What would you like to happen?
   
   Hi,
   
   when working with POJO/JavaBeans schemas sometime one have the case where it 
could be useful to map a property with a logical type (e.g. a third party 
class). Take for instance "java.util.Currency" that in most cases is just 
simply mapped to a currency code while having many other properties.
   
   My proposal is to add a new annotation 
   
   `@SchemaFieldLogicalType(Class clazz)` 
   
   to inform the JavaBeansSchema processor to map that specific property with 
the indicated LogicalType
   
   Another possibility would be to add
   
   `SchemaRegistry registry.addGlobalLogicalType(T clazz, LogicalType<T, Row> 
logicalType)`
   
   that would apply the LogicalType globally without having to indicate it on 
each T property.
   
   ### Issue Priority
   
   Priority: 3 (nice-to-have improvement)
   
   ### Issue Components
   
   - [ ] Component: Python SDK
   - [X] Component: Java SDK
   - [ ] Component: Go SDK
   - [ ] Component: Typescript SDK
   - [ ] Component: IO connector
   - [ ] Component: Beam YAML
   - [ ] Component: Beam examples
   - [ ] Component: Beam playground
   - [ ] Component: Beam katas
   - [ ] Component: Website
   - [ ] Component: Spark Runner
   - [ ] Component: Flink Runner
   - [ ] Component: Samza Runner
   - [ ] Component: Twister2 Runner
   - [ ] Component: Hazelcast Jet Runner
   - [ ] Component: Google Cloud Dataflow Runner


-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to