suibianwanwank commented on code in PR #3883:
URL: https://github.com/apache/calcite/pull/3883#discussion_r1710807756
##########
core/src/main/java/org/apache/calcite/sql/validate/SqlValidatorImpl.java:
##########
@@ -3774,11 +3780,130 @@ protected void validateJoin(SqlJoin join,
SqlValidatorScope scope) {
RESOURCE.crossJoinDisallowsCondition());
}
break;
+ case LEFT_ASOF:
+ case ASOF: {
+ // In addition to the standard join checks, the ASOF join requires the
+ // ON conditions to be a conjunction of simple equalities from both
relations.
+ SqlAsofJoin asof = (SqlAsofJoin) join;
+ SqlNode matchCondition = getMatchCondition(asof);
+ matchCondition = expand(matchCondition, joinScope);
+ join.setOperand(6, matchCondition);
+ validateWhereOrOn(joinScope, matchCondition, "MATCH_CONDITION");
+ ConjunctionOfEqualities conj = new ConjunctionOfEqualities();
Review Comment:
Would it be better to replace RelOptUtil.conjunctions() and match equal here.
Maybe the bool filed type affects like bool_column3 = (bool_column1 and
bool_column2). WDYT
--
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]