[
https://issues.apache.org/jira/browse/BEAM-13286?focusedWorklogId=683699&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-683699
]
ASF GitHub Bot logged work on BEAM-13286:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 18/Nov/21 23:48
Start Date: 18/Nov/21 23:48
Worklog Time Spent: 10m
Work Description: TheNeuralBit commented on pull request #16015:
URL: https://github.com/apache/beam/pull/16015#issuecomment-973468765
Run Java PreCommit
--
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]
Issue Time Tracking
-------------------
Worklog Id: (was: 683699)
Time Spent: 1h 20m (was: 1h 10m)
> RowJson fails to serialize DATETIMEs produced by ZetaSQL
> --------------------------------------------------------
>
> Key: BEAM-13286
> URL: https://issues.apache.org/jira/browse/BEAM-13286
> Project: Beam
> Issue Type: Bug
> Components: dsl-sql
> Reporter: Brian Hulette
> Assignee: Brian Hulette
> Priority: P2
> Time Spent: 1h 20m
> Remaining Estimate: 0h
>
> [ZetaSqlBeamTranslationUtils|https://github.com/apache/beam/blob/48984603fb74736be2887474b43990b150a87132/sdks/java/extensions/sql/zetasql/src/main/java/org/apache/beam/sdk/extensions/sql/zetasql/ZetaSqlBeamTranslationUtils.java#L254]
> creates joda.time.Instant instances for DATETIME fields. While
> [RowJson|https://github.com/apache/beam/blob/48984603fb74736be2887474b43990b150a87132/sdks/java/core/src/main/java/org/apache/beam/sdk/util/RowJson.java#L530]
> explicitly casts to DateTime when deserializing. This causes a
> ClassCastException for certain Beam SQL TableProviders (specifically any that
> use JsonPayloadSerializerProvider).
> {code}
> Caused by: java.lang.ClassCastException: org.joda.time.Instant
> cannot be cast to org.joda.time.DateTime
> at
> org.apache.beam.sdk.util.RowJson$RowJsonSerializer.writeValue(RowJson.java:530)
> at
> org.apache.beam.sdk.util.RowJson$RowJsonSerializer.writeRow(RowJson.java:495)
> at
> org.apache.beam.sdk.util.RowJson$RowJsonSerializer.serialize(RowJson.java:478)
> at
> org.apache.beam.sdk.util.RowJson$RowJsonSerializer.serialize(RowJson.java:453)
> at
> com.fasterxml.jackson.databind.ser.DefaultSerializerProvider._serialize(DefaultSerializerProvider.java:480)
> ... 37 more
> {code}
--
This message was sent by Atlassian Jira
(v8.20.1#820001)