Skip to content

parquet: unwrap datums better#112693

Merged
craig[bot] merged 1 commit intocockroachdb:masterfrom
jayshrivastava:parquet/refcursor
Oct 19, 2023
Merged

parquet: unwrap datums better#112693
craig[bot] merged 1 commit intocockroachdb:masterfrom
jayshrivastava:parquet/refcursor

Conversation

@jayshrivastava
Copy link
Copy Markdown
Contributor

@jayshrivastava jayshrivastava commented Oct 19, 2023

Previously, we did not unwrap datums read from parquet files before
comparing. Now, we do. Before #111906, we didn't need to, but now we
do because that patch added a new decoder which may return an
OID-wrapped datum.

We do not need to preserve OID wrappers etc when reading parquet
files in tests because we do not store that information in the parquet
files. Testing that OID wrappers match before and after is unecessary.

Additionally, we used to skip unwrapping REFCURSOR datums before
comparing. For the same reason as above, we can just unwrap them.

This change also fixes the validateDatum function in exporter
tests. It previously did not unwrap array contents. Now it does.

Release note: None
Epic: None
Closes: #112561

@cockroach-teamcity
Copy link
Copy Markdown
Member

This change is Reviewable

Previously, we did not unwrap datums read from parquet files before
comparing. Now, we do. Before cockroachdb#111906, we didn't need to, but now we
do because that patch added a new decoder which may return an
OID-wrapped datum.

We do not need to preserve OID wrappers etc when reading parquet
files in tests because we do not store that information in the parquet
files. Testing that OID wrappers match before and after is unecessary.

Additionally, we used to skip unwrapping `REFCURSOR` datums before
comparing. For the same reason as above, we can just unwrap them.

This change also fixes the `validateDatum` function in exporter
tests. It previously did not unwrap array contents. Now it does.

Release note: None
Epic: None
Closes: cockroachdb#112561

 Please enter the commit message for your changes. Lines starting
@jayshrivastava jayshrivastava changed the title Parquet/refcursor parquet: unwrap datums better Oct 19, 2023
@jayshrivastava jayshrivastava marked this pull request as ready for review October 19, 2023 15:48
@jayshrivastava jayshrivastava requested a review from a team as a code owner October 19, 2023 15:48
@jayshrivastava jayshrivastava requested review from yuzefovich and removed request for a team October 19, 2023 15:48
@jayshrivastava jayshrivastava added the backport-23.2.x PAST MAINTENANCE SUPPORT: 23.2 patch releases via ER request only label Oct 19, 2023
Copy link
Copy Markdown
Collaborator

@DrewKimball DrewKimball left a comment

Choose a reason for hiding this comment

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

:lgtm: Thanks for figuring this out.

Reviewed 2 of 2 files at r1, all commit messages.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @miretskiy and @yuzefovich)

@jayshrivastava
Copy link
Copy Markdown
Contributor Author

bors r+

@jayshrivastava
Copy link
Copy Markdown
Contributor Author

bors retry

@craig
Copy link
Copy Markdown
Contributor

craig bot commented Oct 19, 2023

Already running a review

@craig
Copy link
Copy Markdown
Contributor

craig bot commented Oct 19, 2023

Build succeeded:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-23.2.x PAST MAINTENANCE SUPPORT: 23.2 patch releases via ER request only

Projects

None yet

Development

Successfully merging this pull request may close these issues.

cdc: TestRandomParquetExports flaked on 23.2

4 participants