-
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
[Bugfix]Fix the problem of "," being divided in [] #5401
Conversation
...-core-starter/src/main/java/org/apache/seatunnel/core/starter/command/ParameterSplitter.java
Outdated
Show resolved
Hide resolved
Pattern pattern = Pattern.compile("\\[.*?]|,"); | ||
|
||
@Override | ||
public List<String> split(String value) { |
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.
Please add doc and UT for this method, and if the params contains ";" what will happen?
e.g. if the args looks like -i "map = ["par1=20230829;", "par2=20230829;"]"
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.
Please add doc and UT for this method, and if the params contains ";" what will happen? e.g. if the args looks like -i "map = ["par1=20230829;", "par2=20230829;"]"
Yes, this code has a bug, I modified the implementation.PTAL
…/seatunnel/core/starter/command/ParameterSplitter.java Co-authored-by: Wenjun Ruan <wenjun@apache.org>
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.
Basically LGTM.
I am not sure if there still exist some cases will have another problem, e.g "-i map=["par1=[2023, 2024, 2025]", "par2=[2026, 2027]"]".
It might be better to use some inner method provided by JCommander to handle the array.
@ruanwenjun @EricJoy2048 PTAL |
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.
+1
* Fix the problem of "," being divided in [] * Update seatunnel-core/seatunnel-core-starter/src/main/java/org/apache/seatunnel/core/starter/command/ParameterSplitter.java Co-authored-by: Wenjun Ruan <wenjun@apache.org> * fix error * fix bug * fix bug --------- Co-authored-by: Wenjun Ruan <wenjun@apache.org>
* Fix the problem of "," being divided in [] * Update seatunnel-core/seatunnel-core-starter/src/main/java/org/apache/seatunnel/core/starter/command/ParameterSplitter.java Co-authored-by: Wenjun Ruan <wenjun@apache.org> * fix error * fix bug * fix bug --------- Co-authored-by: Wenjun Ruan <wenjun@apache.org>
* Fix the problem of "," being divided in [] * Update seatunnel-core/seatunnel-core-starter/src/main/java/org/apache/seatunnel/core/starter/command/ParameterSplitter.java Co-authored-by: Wenjun Ruan <wenjun@apache.org> * fix error * fix bug * fix bug --------- Co-authored-by: Wenjun Ruan <wenjun@apache.org>
Purpose of this pull request
Check list
New License Guide
release-note
.