Abacn commented on issue #19715:
URL: https://github.com/apache/beam/issues/19715#issuecomment-1232193783

   From the TODO mark in source:
   
https://github.com/apache/beam/blob/3ede5b76e48b41e89bc67541ea5044ebe704e905/sdks/java/core/src/main/java/org/apache/beam/sdk/schemas/SchemaTranslation.java#L183
   
   Any known but yet standardized logical types (those in 
STANDARD_LOGICAL_TYPES) will assign the same urn 
"beam:logical_type:javasdk:v1". These include all jdbc logical types and also 
many defined in `org.apache.beam.sdk.schemas.logicaltypes` package. While user 
can register this URN and implement with there own class in a cross-language 
pipeline, (e.g. 
https://stackoverflow.com/questions/68758361/error-beamlogical-typejavasdkv1-while-using-apache-beam-io-jdbc-readfromjdbc),
 they can do at most one logical type because they share the same URN. Would be 
preferrable to encode the identifier in URN as well, for example, in the 
example stackoverflow case, The involved logical type from Java side is 
`org.apache.beam.sdk.io.jdbc.LogicalTypes.VariableLengthString` with identifier 
'VARCHAR', It would then have URN "beam:logical_type:javasdk_varchar::v1" or 
"beam:logical_type:javasdk_variablelengthstring::v1" (or 
"beam:logical_type:javasdk:varchar::v1" or "beam:logical_type:javasdk:variablel
 engthstring::v1")
   


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