-
Notifications
You must be signed in to change notification settings - Fork 167
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
Convert the Logical to Physical map to a visitor #43
Conversation
I noticed that the FixedType was missing.
pyiceberg/io/pyarrow.py
Outdated
return visit(iceberg_type, _PRIMITIVE_TO_PHYISCAL_TYPE_VISITOR) | ||
|
||
|
||
class PrimitiveToPyhsicalType(SchemaVisitorPerPrimitiveType[str]): |
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.
Typo: Pyhsical
(unless maybe that's how it's spelled in the python community)
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.
🤣 Good old typo
pyiceberg/io/pyarrow.py
Outdated
return "BYTE_ARRAY" | ||
|
||
def visit_decimal(self, decimal_type: DecimalType) -> str: | ||
raise ValueError("unknown") |
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.
We could convert to FIXED_LEN_BYTE_ARRAY or INT64 or INT32 based on the precision, right?
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 would say FIXED_LEN_BYTE_ARRAY
. This visitor is just to double-check that we get the type that we expect.
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.
Looks good overall, but I'd fix the typo before merging.
9b4efa1
to
c33eb7a
Compare
…rt-map-to-visitor
Thanks @rdblue for the quick review! 🙌 |
I noticed that the FixedType was missing.