-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix bug converting array type #674
Conversation
@@ -289,7 +289,9 @@ def _convert_col(self, col: pd.Series, field_type) -> pd.Series: | |||
return col.apply(partial(_convert_udt_value, udt=udt)) | |||
elif field_type["type"] == "struct": | |||
return col.apply(lambda d: self._convert(d, field_type)) | |||
elif field_type["type"] == "array": | |||
elif field_type["type"] == "array" and isinstance( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is there possible other case like type == array and not isinstance(elementType, dict)
?
@@ -289,7 +289,9 @@ def _convert_col(self, col: pd.Series, field_type) -> pd.Series: | |||
return col.apply(partial(_convert_udt_value, udt=udt)) | |||
elif field_type["type"] == "struct": | |||
return col.apply(lambda d: self._convert(d, field_type)) | |||
elif field_type["type"] == "array": | |||
elif field_type["type"] == "array" and isinstance( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is there possible other case like type == array and not isinstance(elementType, dict)
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if the elementType is not a dict then it's a simple native type which requires no conversion so it should go to the "else"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see. thanks for explanation
No description provided.