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

Add Cast transform for Rows

Details

    • Improvement
    • Status: Resolved
    • P2
    • Resolution: Fixed
    • None
    • Not applicable
    • sdk-java-core

    Description

      There is a need for a generic transform that given two Row schemas will convert rows between them. There must be a possibility to opt-out from certain kind of conversions, for instance, converting ints to shorts can cause overflow. Another example, a schema could have a nullable field, but never have NULL value in practice, because it was filtered out.

      What is needed:

      • widening values (e.g., int -> long)
      • narrowwing (e.g., int -> short)
      • runtime check for overflow while narrowing
      • ignoring nullability (nullable=true -> nullable=false)
      • weakening nullability (nullable=false -> nullable=true)
      • projection (Schema(a: Int32, b: Int32) -> Schema(a: Int32))

      Attachments

        Activity

          People

            kanterov Gleb Kanterov
            kanterov Gleb Kanterov
            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 - 9h 40m
                9h 40m