Uploaded image for project: 'Beam'
  1. Beam
  2. BEAM-13286

RowJson fails to serialize DATETIMEs produced by ZetaSQL

Details

    • Bug
    • Status: Resolved
    • P2
    • Resolution: Fixed
    • None
    • 2.36.0
    • dsl-sql
    • None

    Description

      ZetaSqlBeamTranslationUtils creates joda.time.Instant instances for DATETIME fields. While RowJson explicitly casts to DateTime when deserializing. This causes a ClassCastException for certain Beam SQL TableProviders (specifically any that use JsonPayloadSerializerProvider).

      		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
      

      Attachments

        Issue Links

          Activity

            People

              bhulette Brian Hulette
              bhulette Brian Hulette
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1h 40m
                  1h 40m