Hisoka-X commented on code in PR #5768:
URL: https://github.com/apache/seatunnel/pull/5768#discussion_r1378443500
##########
seatunnel-transforms-v2/src/main/java/org/apache/seatunnel/transform/sql/zeta/ZetaSQLFilter.java:
##########
@@ -66,7 +66,15 @@ public boolean executeFilter(Expression whereExpr, Object[]
inputFields) {
return inExpr((InExpression) whereExpr, inputFields);
}
if (whereExpr instanceof LikeExpression) {
- return likeExpr((LikeExpression) whereExpr, inputFields);
+ boolean isNotLike = ((LikeExpression) whereExpr).isNot();
+ // like SQL parsing
+ if (!isNotLike) {
+ return likeExpr((LikeExpression) whereExpr, inputFields);
+ }
+ // not like SQL parsing
+ if (isNotLike) {
+ return notLikeExpr((LikeExpression) whereExpr, inputFields);
+ }
Review Comment:
```suggestion
boolean isNotLike = ((LikeExpression) whereExpr).isNot();
if (isNotLike) {
return notLikeExpr((LikeExpression) whereExpr, inputFields);
} else {
return likeExpr((LikeExpression) whereExpr, inputFields);
}
```
##########
seatunnel-transforms-v2/src/main/java/org/apache/seatunnel/transform/sql/zeta/ZetaSQLFilter.java:
##########
@@ -148,7 +156,7 @@ private boolean inExpr(InExpression inExpression, Object[]
inputFields) {
}
/**
- * Like expression filter, unsupported yet
+ * like syntax expression filters
Review Comment:
```suggestion
* Like expression filter
```
--
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]