Re: review: Non-recursive processing of AND/OR lists

Поиск
Список
Период
Сортировка
От Gurjeet Singh
Тема Re: review: Non-recursive processing of AND/OR lists
Дата
Msg-id CABwTF4W+nDfknBS3xfQ8jpSyTyKnJoJshKPiO33X4N9sEkNf7g@mail.gmail.com
обсуждение исходный текст
Ответ на review: Non-recursive processing of AND/OR lists  (Pavel Stehule <pavel.stehule@gmail.com>)
Список pgsql-hackers
Thanks for the review Pavel.<br /><br /><div class="gmail_quote">On Tue, Jun 18, 2013 at 3:01 PM, Pavel Stehule <span
dir="ltr"><<ahref="mailto:pavel.stehule@gmail.com" target="_blank">pavel.stehule@gmail.com</a>></span> wrote:<br
/><blockquoteclass="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello<br /><br
/>related to<br /><br /><a href="https://commitfest.postgresql.org/action/patch_view?id=1130"
target="_blank">https://commitfest.postgresql.org/action/patch_view?id=1130</a><br/><a
href="http://www.postgresql.org/message-id/CABwTF4V9rsjiBWE+87pK83Mmm7ACdrG7sZ08RQ-4qYMe8jvhbw@mail.gmail.com"
target="_blank">http://www.postgresql.org/message-id/CABwTF4V9rsjiBWE+87pK83Mmm7ACdrG7sZ08RQ-4qYMe8jvhbw@mail.gmail.com</a><br
/><br/><br /> * motivation: remove recursive procession of AND/OR list (hangs with<br /> 10062 and more
subexpressions)<br/><br /> * patch is short, clean and respect postgresql source code requirements<br /> * patch was
appliedcleanly without warnings<br /> * all regression tests was passed<br /> * I successfully evaluated expression
with100000 subexpressions<br /> * there is no significant slowdown<br /><br /> possible improvements<br /><br /> a =
(A_Expr*)list_nth(pending, 0);<br /><br /> a = (A_Expr*) linitial(pending);<br /><br /> not well comment<br /><br />
shouldbe -- "If the right branch is also an SAME condition, append it to the"<br /><br /> +                       /*<br
/>+                        * If the right branch is also an AND condition, append it to the<br /> +                    
  * pending list, to be processed later. This allows us to walk even<br /> +                        * bushy trees, not
justleft-deep trees.<br /> +                        */<br /> +                       if (IsA(a->rexpr, A_Expr)
&&((A_Expr*)a->rexpr)->kind == root_kind)<br /> +                       {<br /> +                        
     pending = lappend(pending, a->rexpr);<br /> +                       }<br /> +                       else<br />
+                      {<br /> +                               expr = transformExprRecurse(pstate, a->rexpr);<br />
+                              expr = coerce_to_boolean(pstate, expr, root_kind == AEXPR_AND ?<br /> "AND" : "OR");<br
/>+                               exprs = lcons(expr, exprs);<br /> +                       }<br /><br /> I don't see
anyother issues, so after fixing comments this patch is<br /> ready for commit<br /><br /> Regards<br /><span
class="HOEnZb"><fontcolor="#888888"><br /> Pavel Stehule<br /></font></span></blockquote></div><br /><br clear="all"
/><br/>-- <br /><div dir="ltr">Gurjeet Singh<br /><br /><a href="http://gurjeet.singh.im/"
target="_blank">http://gurjeet.singh.im/</a><br/><br />EnterpriseDB Inc.<br /></div> 

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Jeff Janes
Дата:
Сообщение: Re: Git-master regression failure
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: Git-master regression failure