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

Incorrect checkState condition in withFieldValues in Row.java

Details

    • Bug
    • Status: Resolved
    • P2
    • Resolution: Fixed
    • 2.22.0
    • 2.24.0
    • sdk-java-core

    Description

       

      In the following code:

      public FieldValueBuilder withFieldValues(Map<String, Object> values) { 
         checkState(values.isEmpty()); 
         return new FieldValueBuilder(schema, null).withFieldValues(values); 
      }  
      

       

      checkState should check `this.values` instead of the passed arguments.

      The issue is that as it is now, we cannot use this function to build a Row from Map.

       

      thanks.

       

      Attachments

        Issue Links

          Activity

            People

              ibzib Kyle Weaver
              pedro.teixeira Pedro Teixeira
              Votes:
              0 Vote for this issue
              Watchers:
              2 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 - 0.5h
                  0.5h