Re: Lateral join not finding correlate variable

2020-11-21 Thread Dylan Forciea
Forciea Cc: "user@flink.apache.org" Subject: Re: Lateral join not finding correlate variable Hi Dylan, I have reproduced your issue based on your code, Currently Flink does not support such nested correlate pattern query. I have created a issue to track this [1]. Thanks for your rep

Re: Lateral join not finding correlate variable

2020-11-19 Thread godfrey he
gt; """) > > streamTableEnv.createTemporaryView("view2", q2) > > > > val q3 = streamTableEnv.sqlQuery(""" > > SELECT > > w.attr1, > > p.attr3 > > FROM view1 w > > LEFT JOIN LA

Re: Lateral join not finding correlate variable

2020-11-18 Thread Dylan Forciea
M view2) WHERE row_num = 1) p ON (w.attr1 = p.attr1) """) streamTableEnv.createTemporaryView("view3", q3) val view3 = streamTableEnv.from("view3") view3 .toRetractStream[Row] .writeAsCsv("./view3.csv"

Re: Lateral join not finding correlate variable

2020-11-18 Thread godfrey he
al table bit in that first table made the original query > plan work correctly. > > > > I greatly appreciate your assistance! > > > > Regards, > > Dylan Forciea > > > > *From: *godfrey he > *Date: *Wednesday, November 18, 2020 at 7:33 AM > *To:

Re: Lateral join not finding correlate variable

2020-11-18 Thread Dylan Forciea
From: godfrey he Date: Wednesday, November 18, 2020 at 7:33 AM To: Dylan Forciea Cc: "user@flink.apache.org" Subject: Re: Lateral join not finding correlate variable Hi Dylan, Could you provide which Flink version you find out the problem with? I test the above query on master, and I get

Re: Lateral join not finding correlate variable

2020-11-18 Thread godfrey he
Hi Dylan, Could you provide which Flink version you find out the problem with? I test the above query on master, and I get the plan, no errors occur. Here is my test case: @Test def testLateralJoin(): Unit = { util.addTableSource[(String, String, String, String, String)]("table1", 'id, 'attr1,

Lateral join not finding correlate variable

2020-11-17 Thread Dylan Forciea
This may be due to not understanding lateral joins in Flink – perhaps you can only do so on temporal variables – but I figured I’d ask since the error message isn’t intuitive. I am trying to do a combination of a lateral join and a top N query. Part of my ordering is based upon whether the a v