Re: A little cosmetic to convert_VALUES_to_ANY()

2025-08-04 Thread David Rowley
On Sun, 27 Jul 2025 at 19:53, Tender Wang wrote: > While debugging the pull-up sublink codes, I noticed the > convert_VALUES_to_ANY(). > The function is to convert "where colX in VALUES(xxx)" into SAOP. It firstly > scans the values_list to > make sure no volatile function is in this list, then

Re: A little cosmetic to convert_VALUES_to_ANY()

2025-08-03 Thread David G. Johnston
On Sun, Aug 3, 2025 at 9:40 PM Tender Wang wrote: > >>> Also, add a brace for better/more consistent style in the attached patch. >>> >> >> Should try and avoid oh-by-the-way fixes like this in behavior patches. >> >> This specific one also doesn't seem warranted. Or, at least, the original >> st

Re: A little cosmetic to convert_VALUES_to_ANY()

2025-08-03 Thread Tender Wang
David G. Johnston 于2025年8月4日周一 12:33写道: > On Sun, Jul 27, 2025 at 12:53 AM Tender Wang wrote: > >> >> We can merge the two scans into one. This can reduce the time complexity >> from 2O(n) to O(n). >> > > This seems like an unusual usage of big-O notation. Always saw the > meaningful pieces ins

Re: A little cosmetic to convert_VALUES_to_ANY()

2025-08-03 Thread David G. Johnston
On Sun, Jul 27, 2025 at 12:53 AM Tender Wang wrote: > > We can merge the two scans into one. This can reduce the time complexity > from 2O(n) to O(n). > This seems like an unusual usage of big-O notation. Always saw the meaningful pieces inside the O, and in general I thought O(n) =~ O(xn) for

Re: A little cosmetic to convert_VALUES_to_ANY()

2025-08-03 Thread Tender Wang
Chao Li 于2025年8月4日周一 11:11写道: > I tested this patch locally and it works for me. > > However I doubt if it really improve performance. The original code > "contain_volatile_functions((Node *) rte->values_lists)" recursively work > through rte-values_list, and this patch move contain_volatile_func

Re: A little cosmetic to convert_VALUES_to_ANY()

2025-08-03 Thread Chao Li
I tested this patch locally and it works for me. However I doubt if it really improve performance. The original code "contain_volatile_functions((Node *) rte->values_lists)" recursively work through rte-values_list, and this patch move contain_volatile_functions() into the for loop, and checks

Re: A little cosmetic to convert_VALUES_to_ANY()

2025-08-01 Thread Tender Wang
Tender Wang 于2025年7月27日周日 15:53写道: > Hi, > > While debugging the pull-up sublink codes, I noticed the > convert_VALUES_to_ANY(). > The function is to convert "where colX in VALUES(xxx)" into SAOP. It > firstly scans the values_list to > make sure no volatile function is in this list, then it scan