[FLINK-39834] Fix Oracle UNISTR parsing with embedded concat operator#4426
Open
paulo-t wants to merge 1 commit into
Open
[FLINK-39834] Fix Oracle UNISTR parsing with embedded concat operator#4426paulo-t wants to merge 1 commit into
paulo-t wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What is the purpose of the change
This change fixes Oracle CDC UNISTR decoding when the UNISTR quoted payload contains the character sequence
||.Oracle LogMiner can emit NVARCHAR2 values as
UNISTR(...). The current Debezium 1.9.8.FinalUnistrHelpersplits directly on||, so a value like:can be split into invalid fragments. The fallback path then appends the original expression repeatedly, causing downstream values to contain duplicated
UNISTR(...)text and potentially exceed sink column length limits.Brief change log
io.debezium.connector.oracle.logminer.UnistrHelperin the Oracle CDC connector to tokenize UNISTR expressions and split only on SQL concatenation operators outside quoted UNISTR data.||inside a UNISTR payload.UnistrHelper.classfrom the shaded Oracle pipeline connector so the patched helper is packaged.Verifying this change
This change added tests and can be verified as follows:
mvn -pl flink-cdc-connect/flink-cdc-source-connectors/flink-connector-oracle-cdc \ -DskipITs -DskipE2eTests -Dcheckstyle.skip -Dspotless.check.skip=true \ -Dtest=io.debezium.connector.oracle.logminer.UnistrHelperTest testTests run: 4, Failures: 0, Errors: 0, Skipped: 0.
Apache Jira: https://issues.apache.org/jira/browse/FLINK-39834