Polber commented on code in PR #32851:
URL: https://github.com/apache/beam/pull/32851#discussion_r1805577346


##########
sdks/python/apache_beam/yaml/tests/map.yaml:
##########
@@ -30,8 +30,8 @@ pipelines:
           config:
             append: true
             fields:
-              named_field: element
               literal_int: 10
+              named_field: element

Review Comment:
   There were in essence 2 issues (or 1 issue that required 2 fixes)
   
   1. Due to #32757 (for reasons I'm not entirely sure of), the ordering of the 
Row sent from the Java MapToFields transform was changed. To fix this, I 
reordered the expected output in the `AssertEqual`
   2. Because the change in 1) did not affect Python Rows, the `AssertEqual` 
would now fail for Python MapToFields since the order of the output Row did not 
change. To fix this, I changed the order of the fields in the config to reflect 
the new order in the `AssertEqual`
   
   Ideally, the Java transform should not be changing the order (given that 
Python respects order, Java probably should too now that cross-language is so 
widespread), but I wanted to get tests green (and initially I thought this was 
a problem with the `__eq__` being too restrictive with key order).
   
   Perhaps more investigation should be done on #32757 to see why the ordering 
changed, or at the very least, I could open a bug about how Row ordering 
changes over Xlang.



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