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: Prevent Oracle blob throwing exceptions during column validation #1005

Merged
merged 4 commits into from
Sep 28, 2023

Conversation

nj1973
Copy link
Contributor

@nj1973 nj1973 commented Sep 27, 2023

Changes in this PR:

  • Add a new BinaryLength expression which is used in the same way we use StringLength to support min/max/sum aggregations
  • Use BinaryLength when a user explicitly asks for a binary column to be validated
  • Use BinaryLength when count validating a binary column if either the source or target system are Oracle

In most engines COUNT(binary_column) is fine but in Oracle it throws an exception if the binary column is of type BLOB. It does work fine for RAW though which is also binary. This makes detection tricky. I can't see a way to know the original Oracle type in config_manager.py so I decided we would need to use COUNT(LENGTH(binary_column)) for both BLOB and RAW columns.

This PR does not fix an exception in row validation for BLOB/RAW columns, that is covered by #773.

This PR does not add an integration test for BLOB, that will be covered by #899.

@nj1973 nj1973 requested a review from a team as a code owner September 27, 2023 12:08
@nj1973 nj1973 linked an issue Sep 27, 2023 that may be closed by this pull request
@nj1973
Copy link
Contributor Author

nj1973 commented Sep 27, 2023

/gcbrun

Copy link
Collaborator

@nehanene15 nehanene15 left a comment

Choose a reason for hiding this comment

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

Looks great!

@nj1973 nj1973 merged commit 8df1cfa into develop Sep 28, 2023
5 checks passed
@nj1973 nj1973 deleted the fix/oracle-blob-exceptions branch September 28, 2023 14: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.

Oracle BLOB throws exceptions for column and row validation
2 participants