Yu Xu created CALCITE-6959:
------------------------------
Summary: Support LogicalAsofJoin in RelShuttle
Key: CALCITE-6959
URL: https://issues.apache.org/jira/browse/CALCITE-6959
Project: Calcite
Issue Type: Improvement
Components: core
Affects Versions: 1.39.0
Reporter: Yu Xu
Assignee: Yu Xu
Fix For: 1.40.0
Currently RelShuttle do not support LogicalAsofJoin, there 2 problem:
# *LogicalAsofJoin is not overridden for accept(RelShuttle shuttle) ;*
# *RelShuttle#visit not support for LogicalAsofJoin;*
so follow test would not work:
{code:java}
@Test void testRelShuttleForLogicalAsofJoin() {
final String sql = "select emp.empno from emp asof join dept\n"
+ "match_condition emp.deptno <= dept.deptno\n"
+ "on ename = name";
final RelNode rel = sql(sql).toRel();
final List<RelNode> rels = new ArrayList<>();
final RelShuttleImpl visitor = new RelShuttleImpl() {
@Override public RelNode visit(LogicalAsofJoin asofJoin) {
RelNode visitedRel = super.visit(asofJoin);
rels.add(visitedRel);
return visitedRel;
}
};
rel.accept(visitor);
assertThat(rels, hasSize(1));
assertThat(rels.get(0), instanceOf(LogicalAsofJoin.class));
} {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)