ahmedabu98 commented on issue #37524:
URL: https://github.com/apache/beam/issues/37524#issuecomment-4253411924

   Hey @barunkumaracharya, this just came back up in my notifications. Sorry 
for the late reply. 
   
   If you take a look at the error:
   ```
   Exception in thread "main" java.lang.RuntimeException: 
   Cannot convert between types that don't have equivalent schemas. 
   input schema: Fields: 
       Field{name=time, description=, 
type=LOGICAL_TYPE<beam:logical_type:datetime:v1>, options={{}}} 
       Field{name=name, description=, type=STRING, options={{}}} 
   output schema: Fields: 
       Field{name=time, description=, type=DATETIME, options={{}}} 
       Field{name=name, description=, type=STRING, options={{}}} 
   ```
   
   The table is returning "name" as a [logical type 
DateTime](https://github.com/apache/beam/blob/master/sdks/java/core/src/main/java/org/apache/beam/sdk/schemas/logicaltypes/DateTime.java)
 field (maps to a Java LocalDateTime), but your Pojo is defined with a Joda 
Instant, which maps to a primitive 
[Schema.FieldType.DATETIME](https://github.com/apache/beam/blob/4ee32cddb4c10dcf738558e4ffcafc50255a1bd0/sdks/java/core/src/main/java/org/apache/beam/sdk/schemas/Schema.java#L797-L798)
 (not a logical type).
   
   Try re-defining your Pojo to use a Java LocalDateTime and see if it works?


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