DKER2 commented on code in PR #34603:
URL: https://github.com/apache/beam/pull/34603#discussion_r2068710809


##########
sdks/python/apache_beam/io/avroio.py:
##########
@@ -163,6 +163,8 @@ def __init__(
     super().__init__()
     self._source = _FastAvroSource(
         file_pattern, min_bundle_size, validate=validate)
+    # Disable fastavro's automatic logical type conversion
+    fastavro.read.LOGICAL_READERS.clear()

Review Comment:
   Hi guys, sorry for late reply. Thank you for your input. CMIIW, from what I 
understand we only support this following datatype, that require data, that is 
read by fastavio in sepecific type to be able to convert (E.g. boolean for 
`schema_pb2.BOOLEAN`). I cannot find a type that it is compatible with 
Timestamp. Image attached is from `schema_pb2.pyi`
   
![image](https://github.com/user-attachments/assets/6e488ff7-8f5d-4623-a2b9-369edc7b8e22)
   
   > If we decide to pass timsetamp-millis as integers, a more targeted fix 
would be to remove the LOGICAL_READER for 'long-timestamp-millis'
   
   
![image](https://github.com/user-attachments/assets/e6bf77fd-88d7-4d45-8767-29837ed29bb2)
   Here is the fulll list of `fastavrio==1.9.7` logical type converserion 
functions. If we only eliminate LOGICAL_READER for 
   'long-timestamp-millis', it will still break if user have another kind of 
logical type. But agree that we should have it only if as_row=True



-- 
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: github-unsubscr...@beam.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to