Hi all,
Recently I'm trying to add some tests to
*org.apache.flink.table.api.stream.table.JoinTest*, but encountered a
strange problem. A test case could successfully run in an isolated mode,
but failed (threw an *CannotPlanException* in
*TableEnvironment.runVolcanoPlanner()*) when ran with another test.
The failed test registers two rowtime tables and performs a left outer join.
```
*val util = streamTestUtil()*
*val left = util.addTable[(Long, Int, String)]('a, 'b, 'c, 'ltime.rowtime)*
*val right = util.addTable[(Long, Int, String)]('d, 'e, 'f,
'rtime.rowtime) *
*val resultTable = left*
* .leftOuterJoin(*
* right,*
* 'a === 'd && 'lt >= 'rtime - 5.minutes && 'ltime < 'rtime +
3.seconds)*
* .select('a, 'e, 'ltime)*
```
and the company case caused failing registers two proctime tables and
performs a full outer join.
```
*val util = streamTestUtil()*
*val left = util.addTable[(Long, Int, String)]('a, 'b, 'c, 'ltime.proctime)*
*val right = util.addTable[(Long, Int, String)]('d, 'e, 'f,
'rtime.proctime)*
*val resultTable = left*
* .fullOuterJoin(right, 'a === 'd && 'ltime >= 'rtime - 1.second &&
'ltime < 'rtime)*
* .select('a, 'e, 'ltime)*
```
I guess there are some conflicts with the *time attributes* between
different test cases since everything got fine when I changed their names
(e.g., *ltime* => *lt* and *rtime* => *rt*) in one test case. Some global
shared variables may be the cause.
I wonder if anyone could give me some more specific clues about the
problem. IMO, even with identical field names, the test cases should
not interrelate with each other.
Thanks,
Xingcan