morningman commented on code in PR #28497:
URL: https://github.com/apache/doris/pull/28497#discussion_r1427956694
##########
fe/fe-core/src/main/java/org/apache/doris/planner/external/jdbc/JdbcScanNode.java:
##########
@@ -328,13 +328,23 @@ public static String conjunctExprToString(TOdbcTableType
tableType, Expr expr, J
if (expr instanceof CompoundPredicate) {
StringBuilder result = new StringBuilder();
CompoundPredicate compoundPredicate = (CompoundPredicate) expr;
+
+ if ("NOT".equals(compoundPredicate.getOp().toString())) {
+ result.append(compoundPredicate.getOp().toString()).append("
");
Review Comment:
```suggestion
result.append("NOT ");
```
##########
fe/fe-core/src/main/java/org/apache/doris/planner/external/jdbc/JdbcScanNode.java:
##########
@@ -328,13 +328,23 @@ public static String conjunctExprToString(TOdbcTableType
tableType, Expr expr, J
if (expr instanceof CompoundPredicate) {
StringBuilder result = new StringBuilder();
CompoundPredicate compoundPredicate = (CompoundPredicate) expr;
+
+ if ("NOT".equals(compoundPredicate.getOp().toString())) {
+ result.append(compoundPredicate.getOp().toString()).append("
");
+ }
+
for (Expr child : compoundPredicate.getChildren()) {
result.append(conjunctExprToString(tableType, child, tbl));
- result.append("
").append(compoundPredicate.getOp().toString()).append(" ");
+ if (!"NOT".equals(compoundPredicate.getOp().toString())) {
+ result.append("
").append(compoundPredicate.getOp().toString()).append(" ");
+ }
}
- // Remove the last operator
- result.setLength(result.length() -
compoundPredicate.getOp().toString().length() - 2);
- return result.toString();
+
+ if (!"NOT".equals(compoundPredicate.getOp().toString())) {
Review Comment:
Add some comment
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]