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
optimize: optimize recognize sql in limit and order by #3212
optimize: optimize recognize sql in limit and order by #3212
Conversation
…timize_limit_order_by_sql
Codecov Report
@@ Coverage Diff @@
## develop #3212 +/- ##
=============================================
- Coverage 51.96% 51.52% -0.44%
+ Complexity 3481 3397 -84
=============================================
Files 637 621 -16
Lines 21054 20637 -417
Branches 2605 2549 -56
=============================================
- Hits 10941 10634 -307
+ Misses 9032 8949 -83
+ Partials 1081 1054 -27
|
...parser-druid/src/main/java/io/seata/sqlparser/druid/postgresql/BasePostgresqlRecognizer.java
Outdated
Show resolved
Hide resolved
...eata-sqlparser-druid/src/main/java/io/seata/sqlparser/druid/mysql/MySQLDeleteRecognizer.java
Show resolved
Hide resolved
if (StringUtils.isNotBlank(orderBy)) { | ||
suffix.append(orderBy); | ||
suffix.append(" ").append(orderBy); |
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.
“ ” you can set it to a constant, right?
…er_by_sql # Conflicts: # rm-datasource/src/main/java/io/seata/rm/datasource/exec/DeleteExecutor.java # rm-datasource/src/main/java/io/seata/rm/datasource/exec/UpdateExecutor.java # sqlparser/seata-sqlparser-core/src/main/java/io/seata/sqlparser/WhereRecognizer.java # sqlparser/seata-sqlparser-druid/src/main/java/io/seata/sqlparser/druid/mysql/BaseMySQLRecognizer.java # sqlparser/seata-sqlparser-druid/src/main/java/io/seata/sqlparser/druid/mysql/MySQLDeleteRecognizer.java # sqlparser/seata-sqlparser-druid/src/main/java/io/seata/sqlparser/druid/mysql/MySQLUpdateRecognizer.java # sqlparser/seata-sqlparser-druid/src/test/java/io/seata/sqlparser/druid/MySQLDeleteRecognizerTest.java
…timize_limit_order_by_sql
…er_by_sql # Conflicts: # changes/1.5.0.md # changes/en-us/1.5.0.md
…timize_limit_order_by_sql # Conflicts: # changes/1.5.0.md # changes/en-us/1.5.0.md
…er_by_sql # Conflicts: # changes/1.5.0.md # changes/en-us/1.5.0.md
…er_by_sql # Conflicts: # changes/en-us/1.5.0.md
…er_by_sql # Conflicts: # changes/1.5.0.md # changes/en-us/1.5.0.md
plz modify AntlrMySQLDeleteRecognizer, AntlrMySQLSelectRecognizer, AntlrMySQLUpdateRecognizer either |
…er_by_sql # Conflicts: # changes/1.5.0.md # changes/en-us/1.5.0.md
fixed |
…er_by_sql # Conflicts: # changes/1.5.0.md # changes/en-us/1.5.0.md # sqlparser/seata-sqlparser-core/src/main/java/io/seata/sqlparser/WhereRecognizer.java # sqlparser/seata-sqlparser-druid/src/main/java/io/seata/sqlparser/druid/BaseRecognizer.java
Codecov Report
@@ Coverage Diff @@
## develop #3212 +/- ##
=============================================
- Coverage 40.75% 40.56% -0.19%
+ Complexity 3071 3070 -1
=============================================
Files 682 682
Lines 23001 23082 +81
Branches 2867 2854 -13
=============================================
- Hits 9373 9364 -9
- Misses 12752 12848 +96
+ Partials 876 870 -6
|
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
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
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
Ⅰ. Describe what this PR did
This solution still has a problem that
and
in the
and I will refactor it in the later version.
Ⅱ. Does this pull request fix one issue?
Ⅲ. Why don't you add test cases (unit test/integration test)?
Ⅳ. Describe how to verify it
Ⅴ. Special notes for reviews