-
Notifications
You must be signed in to change notification settings - Fork 5k
[Fix-14704][dao] pg not support backquote #14717
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
Conversation
12334bb to
9b0a8f8
Compare
35e6ece to
6bd322d
Compare
| on a.id = b.rule_input_entry_id order by b.index | ||
| </select> | ||
|
|
||
| <select id="getRuleInputEntryList" databaseId="pg" resultType="org.apache.dolphinscheduler.dao.entity.DqRuleInputEntry"> |
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.
Hi @eye-gu Although this is also a solution, but it means that we have to maintain two same sql.
Can this sql be splited into simple query? WDYT?
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.
Removing the backquote will cause unit testing to fail.
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.
Alternatively refer to Shenyu, which uses an Interceptor to replace backquotes with double quotes.
https://github.com/apache/shenyu/blob/master/shenyu-admin/src/main/java/org/apache/shenyu/admin/mybatis/pg/interceptor/PostgreSQLPrepareInterceptor.java
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.
WDYT? @zhongjiajie @ruanwenjun
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.
And there is another solution is to change this column name and totally avoid questions like this
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.
#14653 here is another solution
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.
I think the #14653 solution is better
Codecov Report
@@ Coverage Diff @@
## dev #14717 +/- ##
=========================================
Coverage 38.80% 38.80%
- Complexity 4585 4586 +1
=========================================
Files 1232 1232
Lines 43318 43318
Branches 4781 4781
=========================================
+ Hits 16809 16810 +1
Misses 24650 24650
+ Partials 1859 1858 -1 see 1 file with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
|
Kudos, SonarCloud Quality Gate passed! |








Purpose of the pull request
close #14704
Brief change log
rm backquote in sql
Verify this pull request