NobiGo commented on code in PR #4015:
URL: https://github.com/apache/calcite/pull/4015#discussion_r1815860062
##########
core/src/main/java/org/apache/calcite/sql/validate/SqlValidatorImpl.java:
##########
@@ -3911,14 +3918,21 @@ void checkAnd(SqlCall call) {
}
}
- @Override public @Nullable SqlNode visit(final
org.apache.calcite.sql.SqlCall call) {
+ @Override public @Nullable SqlNode visit(final SqlCall call) {
SqlKind kind = call.getKind();
- if (kind != SqlKind.AND && kind != SqlKind.EQUALS) {
+ if (kind != SqlKind.AND && kind != SqlKind.EQUALS && kind !=
SqlKind.CAST) {
illegal = true;
Review Comment:
I check the `checkAnd(call)` and this method, Maybe we can exit directly
when we find the illegal value is true.
##########
core/src/main/java/org/apache/calcite/sql/validate/SqlValidatorImpl.java:
##########
@@ -3911,14 +3918,21 @@ void checkAnd(SqlCall call) {
}
}
- @Override public @Nullable SqlNode visit(final
org.apache.calcite.sql.SqlCall call) {
+ @Override public @Nullable SqlNode visit(final SqlCall call) {
SqlKind kind = call.getKind();
- if (kind != SqlKind.AND && kind != SqlKind.EQUALS) {
+ if (kind != SqlKind.AND && kind != SqlKind.EQUALS && kind !=
SqlKind.CAST) {
illegal = true;
Review Comment:
Some minor advice:
1) SqlValidatorImpl#validateJoin(Line#3784). There is an extra `{}` behind
the ASOF.
2) ConjunctionOfEqualities#checkAnd method's java comment. Before `Children`
There is an extra space.
--
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]