Abacn commented on code in PR #35766:
URL: https://github.com/apache/beam/pull/35766#discussion_r2248585527


##########
sdks/python/apache_beam/yaml/examples/transforms/ml/taxi_fare/streaming_taxifare_prediction.yaml:
##########
@@ -53,8 +53,13 @@ pipeline:
         timestamp:
           callable: |
             from datetime import datetime, timezone
+            import re
+
+            _PAD_MICROS = re.compile(r'\.(\d{1,5})([+-]\d{2}:\d{2})$')
+
             def fn(row):
-              return 
datetime.fromisoformat(row.timestamp).astimezone(timezone.utc)
+                ts = _PAD_MICROS.sub(lambda m: '.' + m.group(1).ljust(6, '0') 
+ m.group(2), row.timestamp)

Review Comment:
   This looks like a workaround for a regression, and we should not need this 
for a valid example functioning. Do you know which PR caused this. We probably 
want to revert it instead



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