-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
[Improve][Connector-v2] Use regex to match filedName placeholders in jdbc sink #8222
Conversation
Is there a way to support all special characters? e.g. "$","%","@" etc. |
a2101a3
to
f8dfe78
Compare
I use a regular expression to match as many characters as we can, but because the framework uses :filedName as a placeholder and computes index from filedName in that placeholder, there's still a problem if filedName also appears : character. After this pr, we can support filedName placeholder like this: :USER@TOKEN |
f8dfe78
to
b2f5cbe
Compare
b2f5cbe
to
cdf01d8
Compare
Link pr #7297 |
cdf01d8
to
3c9be86
Compare
...pache/seatunnel/connectors/seatunnel/jdbc/internal/executor/FieldNamedPreparedStatement.java
Show resolved
Hide resolved
dead1b9
to
a97f8a2
Compare
...pache/seatunnel/connectors/seatunnel/jdbc/internal/executor/FieldNamedPreparedStatement.java
Show resolved
Hide resolved
a97f8a2
to
427b853
Compare
427b853
to
b3944b8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM if ci passes.
Let me merge it. The ci is no problem. The failed ci link pr #8262 . |
Purpose of this pull request
When the filed name of sink table containes '-' that can lead to this error
This is because the method named Character.isJavaIdentifierPart which is in FieldNamedPreparedStatement that return false when the param is '-'. So that the filedName will be split into two filedName.
Does this PR introduce any user-facing change?
How was this patch tested?
Check list
New License Guide
release-note
.