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

Fix error when we have multiple different map types #96

Merged
merged 3 commits into from
Jan 24, 2025

Conversation

aykut-bozkurt
Copy link
Member

We need to reset map context per each type since each map type has different type oid.

@aykut-bozkurt aykut-bozkurt force-pushed the aykut/fix-multiple-maps-in-table branch from 6c12050 to 0fd5c99 Compare January 13, 2025 23:35
@aykut-bozkurt aykut-bozkurt force-pushed the aykut/fix-destreceiver-api branch from f69bd74 to 71da48c Compare January 16, 2025 06:52
@aykut-bozkurt aykut-bozkurt force-pushed the aykut/fix-multiple-maps-in-table branch from 0fd5c99 to e37d709 Compare January 16, 2025 06:56
@aykut-bozkurt aykut-bozkurt force-pushed the aykut/fix-destreceiver-api branch from 71da48c to 30de679 Compare January 16, 2025 07:51
@aykut-bozkurt aykut-bozkurt force-pushed the aykut/fix-multiple-maps-in-table branch from e37d709 to 1af44ab Compare January 16, 2025 07:52
@@ -60,10 +60,10 @@ pub(crate) struct PgToArrowAttributeContext {
attnum: i16,
typoid: Oid,
typmod: i32,
map_typoid: Option<Oid>,
Copy link
Collaborator

Choose a reason for hiding this comment

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

what's the difference with typeoid?

also, should this be some kind of enum?

Copy link
Member Author

Choose a reason for hiding this comment

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

I was lazy to refactor pg-to-arrow and arrow-to-pg context structs. But, this seems a nice time to do it :)

@aykut-bozkurt aykut-bozkurt force-pushed the aykut/fix-destreceiver-api branch 2 times, most recently from f4264d4 to 54d4787 Compare January 20, 2025 23:05
Base automatically changed from aykut/fix-destreceiver-api to main January 20, 2025 23:21
@aykut-bozkurt aykut-bozkurt force-pushed the aykut/fix-multiple-maps-in-table branch from 1af44ab to a9ffb66 Compare January 20, 2025 23:31
Copy link

codecov bot commented Jan 20, 2025

Codecov Report

Attention: Patch coverage is 75.26395% with 164 lines in your changes missing coverage. Please review.

Project coverage is 91.79%. Comparing base (2ca5739) to head (bf97833).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/pgrx_tests/copy_type_roundtrip.rs 23.94% 54 Missing ⚠️
src/arrow_parquet/pg_to_arrow/context.rs 81.15% 36 Missing ⚠️
src/arrow_parquet/arrow_to_pg/context.rs 84.69% 30 Missing ⚠️
src/arrow_parquet/schema_parser.rs 0.00% 9 Missing ⚠️
src/arrow_parquet/pg_to_arrow/map.rs 0.00% 7 Missing ⚠️
src/type_compat/map.rs 0.00% 7 Missing ⚠️
src/arrow_parquet/arrow_to_pg.rs 85.00% 6 Missing ⚠️
src/arrow_parquet/arrow_to_pg/map.rs 0.00% 6 Missing ⚠️
src/arrow_parquet/pg_to_arrow.rs 90.74% 5 Missing ⚠️
src/pgrx_utils.rs 0.00% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #96      +/-   ##
==========================================
- Coverage   92.65%   91.79%   -0.86%     
==========================================
  Files          75       77       +2     
  Lines        9797     9981     +184     
==========================================
+ Hits         9077     9162      +85     
- Misses        720      819      +99     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@aykut-bozkurt aykut-bozkurt force-pushed the aykut/fix-multiple-maps-in-table branch from a9ffb66 to bf97833 Compare January 21, 2025 22:31
@aykut-bozkurt aykut-bozkurt merged commit a123f52 into main Jan 24, 2025
4 of 6 checks passed
@aykut-bozkurt aykut-bozkurt deleted the aykut/fix-multiple-maps-in-table branch January 24, 2025 13:56
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.

None yet

2 participants