Re: Some problems regarding the self-join elimination code

2025-05-01 Thread Alexander Korotkov
On Thu, May 1, 2025 at 8:22 PM Andrei Lepikhov wrote: > On 1/5/2025 14:11, Alexander Korotkov wrote: > > 3. Should the ChangeVarNodesWalkExpression function return the walker's > > returning value? > > > > > > Done. > Thanks for your efforts! Looks good to me. Thank you. I'm going to pus

Re: Some problems regarding the self-join elimination code

2025-05-01 Thread Andrei Lepikhov
On 1/5/2025 14:11, Alexander Korotkov wrote: 3. Should the ChangeVarNodesWalkExpression function return the walker's returning value? Done. Thanks for your efforts! Looks good to me. -- regards, Andrei Lepikhov

Re: Some problems regarding the self-join elimination code

2025-05-01 Thread Alexander Korotkov
Hi, Andrei! Thank you for your review! On Wed, Apr 30, 2025 at 4:34 PM Andrei Lepikhov wrote: > On 4/30/25 13:22, Alexander Korotkov wrote: > >> Thank you, Andrei. I've put it all together. > >> 0001 Fixes material bugs in ChangeVarNodes_walker() including > regression test > >> 0002 Puts back

Re: Some problems regarding the self-join elimination code

2025-04-30 Thread Andrei Lepikhov
On 4/30/25 13:22, Alexander Korotkov wrote: Thank you, Andrei. I've put it all together. 0001 Fixes material bugs in ChangeVarNodes_walker() including regression test 0002 Puts back comments which got accidentally removed 0003 Refactors ChangeVarNodesExtended() with custom user-defined callback

Re: Some problems regarding the self-join elimination code

2025-04-30 Thread Alexander Korotkov
On Sun, Apr 27, 2025 at 2:02 PM Alexander Korotkov wrote: > > On Fri, Apr 11, 2025 at 5:46 PM Andrei Lepikhov wrote: > > On 4/10/25 14:39, Andrei Lepikhov wrote: > > > On 4/10/25 13:36, Alexander Korotkov wrote: > > >> On Wed, Apr 9, 2025 at 10:39 AM Andrei Lepikhov > > >> wrote: > > >>> It seem

Re: Some problems regarding the self-join elimination code

2025-04-27 Thread Alexander Korotkov
On Fri, Apr 11, 2025 at 5:46 PM Andrei Lepikhov wrote: > On 4/10/25 14:39, Andrei Lepikhov wrote: > > On 4/10/25 13:36, Alexander Korotkov wrote: > >> On Wed, Apr 9, 2025 at 10:39 AM Andrei Lepikhov > >> wrote: > >>> It seems we are coming to the conclusion that join removal optimisation > >>> ma

Re: Some problems regarding the self-join elimination code

2025-04-11 Thread Andrei Lepikhov
On 4/10/25 14:39, Andrei Lepikhov wrote: On 4/10/25 13:36, Alexander Korotkov wrote: On Wed, Apr 9, 2025 at 10:39 AM Andrei Lepikhov wrote: It seems we are coming to the conclusion that join removal optimisation may do something out of ChangeVarNodes resposibility. Before further complicating

Re: Some problems regarding the self-join elimination code

2025-04-10 Thread Andrei Lepikhov
On 4/9/25 04:05, Richard Guo wrote: On Tue, Apr 8, 2025 at 11:12 PM Dean Rasheed wrote: On Tue, 8 Apr 2025 at 12:31, Andrei Lepikhov wrote: Perhaps the way to do it is to make ChangeVarNodesExtended() take a callback function to be invoked for each node visited. The callback (which would then

Re: Some problems regarding the self-join elimination code

2025-04-10 Thread Andrei Lepikhov
On 4/10/25 13:36, Alexander Korotkov wrote: On Wed, Apr 9, 2025 at 10:39 AM Andrei Lepikhov wrote: It seems we are coming to the conclusion that join removal optimisation may do something out of ChangeVarNodes resposibility. Before further complicating of this function code I would like to know

Re: Some problems regarding the self-join elimination code

2025-04-10 Thread Alexander Korotkov
On Wed, Apr 9, 2025 at 10:39 AM Andrei Lepikhov wrote: > On 4/9/25 04:05, Richard Guo wrote: > > On Tue, Apr 8, 2025 at 11:12 PM Dean Rasheed > > wrote: > >> On Tue, 8 Apr 2025 at 12:31, Andrei Lepikhov wrote: > >> Perhaps the way to do it is to make ChangeVarNodesExtended() take a > >> callbac

Re: Some problems regarding the self-join elimination code

2025-04-08 Thread Richard Guo
On Tue, Apr 8, 2025 at 11:12 PM Dean Rasheed wrote: > On Tue, 8 Apr 2025 at 12:31, Andrei Lepikhov wrote: > > On 4/4/25 09:37, Richard Guo wrote: > > > With more exposure to the changes in ChangeVarNodes(), I have some > > > more concerns. As I understand it, ChangeVarNodes() is designed to > >

Re: Some problems regarding the self-join elimination code

2025-04-08 Thread Dean Rasheed
On Tue, 8 Apr 2025 at 12:31, Andrei Lepikhov wrote: > > On 4/4/25 09:37, Richard Guo wrote: > > On Wed, Apr 2, 2025 at 10:26 PM Richard Guo wrote: > > With more exposure to the changes in ChangeVarNodes(), I have some > > more concerns. As I understand it, ChangeVarNodes() is designed to > > upd

Re: Some problems regarding the self-join elimination code

2025-04-08 Thread Andrei Lepikhov
On 4/4/25 09:37, Richard Guo wrote: On Wed, Apr 2, 2025 at 10:26 PM Richard Guo wrote: With more exposure to the changes in ChangeVarNodes(), I have some more concerns. As I understand it, ChangeVarNodes() is designed to update the varno fields of Var nodes in the given tree that belong to the

Re: Some problems regarding the self-join elimination code

2025-04-08 Thread Andrei Lepikhov
On 4/2/25 15:26, Richard Guo wrote: While working on another patch, I looked at ChangeVarNodes() and found some issues introduced by the self-join elimination commit. I think it'd better to fix or improve them. * ChangeVarNodes_walker includes special handling for RestrictInfo nodes. And it ad

Re: Some problems regarding the self-join elimination code

2025-04-04 Thread Richard Guo
On Wed, Apr 2, 2025 at 10:26 PM Richard Guo wrote: > This is not a thorough review of the code; I just randomly looked at > ChangeVarNodes(). It's possible that there are other issues that > haven't been discovered, but I think we should at least fix these. > I'll provide a patch for the fixes la