Skip to content
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

Add crunchy_map type conversion from/to arrow #22

Closed
wants to merge 1 commit into from

Conversation

aykut-bozkurt
Copy link
Collaborator

No description provided.

.expect("expected crunchy_map is created");

let found_typoid = unsafe {
GetSysCacheOid(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we do Oid -> Oid2 to omit the last 2 arguments?

TYPEOID as _,
Anum_pg_type_oid as _,
typoid.into_datum().unwrap(),
crunchy_map_ext_schema_oid.into_datum().unwrap(),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm a bit confused about this GetSysCacheOid call. As far as I can tell the TYPEOID only looks up by type OID, not schema OID.

}

impl IntoDatum for CrunchyMap<'_> {
fn into_datum(self) -> Option<pg_sys::Datum> {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would still appreciate more comments, e.g.

// since the map is stored as an array of tuples, we can simply convert the array to a datum

@aykut-bozkurt
Copy link
Collaborator Author

Addressed at development branch.

@aykut-bozkurt aykut-bozkurt deleted the crunchy-map-conversion branch October 17, 2024 13:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants