eugenegujing commented on code in PR #6053:
URL: https://github.com/apache/texera/pull/6053#discussion_r3518728690
##########
amber/src/main/python/core/models/tuple.py:
##########
@@ -317,10 +329,33 @@ def cast_to_schema(self, schema: Schema) -> None:
# convert NaN to None to support null value conversion
if checknull(field_value):
self[field_name] = None
-
- if field_value is not None:
+ elif field_value is not None:
field_type = schema.get_attr_type(field_name)
- if field_type == AttributeType.BINARY and not isinstance(
+ if (
+ field_type in INTEGRAL_TYPE_RANGES
+ and isinstance(field_value, float)
+ and field_value.is_integer()
+ ):
+ # pandas promotes an int column holding nulls to
Review Comment:
fixed. I added the version in the comment to clarify
--
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]