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

[Bug] [Admin][Jar Task]When the jar task statement contains "--" comments, the response from the flinkJarSqlConvertForm interface is abnormal. #4191

Open
2 of 3 tasks
jiangwwwei opened this issue Feb 6, 2025 · 3 comments
Assignees
Labels
Bug Something isn't working Waiting for reply Waiting for reply

Comments

@jiangwwwei
Copy link
Contributor

Search before asking

  • I had searched in the issues and found no similar issues.

What happened

When I add a comment statement starting with "--" to the statement in the JAR task and save it, the comment statement, and even the entire page, cannot be displayed correctly when I reopen the task page.
(However, the statement in the JSON response from the interface is complete and correct.)

For detailed information, please refer to the "How to reproduce" section below.

What you expected to happen

The editing page of the JAR task should display and handle comment statements starting with "--" correctly.

How to reproduce

Create a JAR task and fill in the execute JAR information normally.
Case 1:
1.1 Add a single comment line in the task statement and save it.
1.2 Close the task tab and reopen it.
1.3 The interface returns the complete statement, but the comment in the editing window disappears.

Image

Case 2:
2.1 Add multiple comment lines at the end of the task statement and save it.
2.2 Close the task tab and reopen it.
2.3 The interface returns the complete statement, but the editing window is cleared.

Image

Case 3:
3.1 Add multiple comment lines and add a normal SET statement at the end of the task statement, then save it.
3.2 Close the task tab and reopen it.
3.3 The interface returns the complete statement, but the first line of the comment in the editing window disappears.

Image

Anything else

No response

Version

1.2.1

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

@jiangwwwei jiangwwwei added Bug Something isn't working Waiting for reply Waiting for reply labels Feb 6, 2025
Copy link

github-actions bot commented Feb 6, 2025

Hello @jiangwwwei, this issue is about web, so I assign it to @Zzm0809. If you have any questions, you can comment and reply.

你好 @jiangwwwei, 这个 issue 是关于 web 的,所以我把它分配给了 @Zzm0809。如有任何问题,可以评论回复。

@jiangwwwei jiangwwwei changed the title [Bug] [Web][Jar Task]The editing window cannot display normally when the statement contains comments starting with "--" [Bug] [Admin][Jar Task]The editing window cannot display normally when the statement contains comments starting with "--" Feb 7, 2025
@jiangwwwei
Copy link
Contributor Author

It appears to be an issue caused by the incorrect response returned from the /api/task/flinkJarSqlConvertForm endpoint.

Image

@jiangwwwei jiangwwwei changed the title [Bug] [Admin][Jar Task]The editing window cannot display normally when the statement contains comments starting with "--" [Bug] [Admin][Jar Task]When the jar task statement contains "--" comments, the response from the flinkJarSqlConvertForm interface is abnormal. Feb 7, 2025
@jiangwwwei
Copy link
Contributor Author

It appears that there is an issue with the splitting in SqlUtil.getStatements().

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Waiting for reply Waiting for reply
Projects
None yet
Development

No branches or pull requests

2 participants