eugenegujing commented on code in PR #6053:
URL: https://github.com/apache/texera/pull/6053#discussion_r3518662260
##########
amber/src/main/python/core/models/tuple.py:
##########
@@ -34,6 +34,17 @@
from .schema.field import Field
from .schema.schema import Schema
+# Ranges within which an integral float can be safely cast back to int.
+# INT is bounded by Arrow int32 capacity. LONG is bounded by the float64
+# exact-integer window rather than int64 capacity: above 2**53 float64
+# rounds, so the received float may already be a corrupted rendition of
+# the original integer. The endpoint 2**53 itself is excluded because it
+# is ambiguous (2**53 + 1 also rounds to float 2**53).
+INTEGRAL_TYPE_RANGES = {
+ AttributeType.INT: (-(2**31), 2**31 - 1),
+ AttributeType.LONG: (-(2**53) + 1, 2**53 - 1),
+}
Review Comment:
fixed
--
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]