tajo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Atri Sharma <atri.j...@gmail.com>
Subject Re: PreLogicalPlanVerifier structure
Date Wed, 13 May 2015 19:14:00 GMT
Thanks.

So understanding deeper, I understand we will need to add to visitGroupBy
in LogicalPlanVerifier and ensure that the expressions match up?

On Thu, May 7, 2015 at 1:22 AM, Hyunsik Choi <hyunsik@apache.org> wrote:

> Hi Atri,
>
> In order to understand PreLogicalPlanVerifier, you firstly need to see
> BaseAlgebraVisitor class, which contains default walkers on Expr
> structure.
>
> Also, the key function is BaseAlgebraVisitor::visit, visiting each
> node according to a node type. After deciding, BaseAlgebraVisitor
> invokes one of the default walkers implemented in BaseAlgebraVisitor.
> BaseAlgebraVisitor::visitProjection, BaseAlgebraVisitor::visitFilter,
> and so on are all default walkers. Each default walker tries to invoke
> BaseAlgebraVisitor::visit method against its child nodes.
> BaseAlgebraVisitor::visit against decides the node type of a visiting
> node against. This process will be done recursively.
>
> PreLogicalPlanVerifier class uses BaseAlgebraVisitor::visit and
> default walkers as well as some override functions. Actually, most of
> visitors in Tajo were designed by this concept.
>
>
> In addition, there are a couple of verifiers. PreLogicalPlanVerifier
> aims at validating very simple ones that do not requires much
> information. In contrast, LogicalPlanVerifier is designed to verify
> fully annotated plans. I think that TAJO-572 may need
> LogicalPlanVerifier instead of PreLogicalPlanVerifier because TAJO-572
> should determine whether some function is aggregation or not.
>
> Also, TAJO-572 also needs to determine if some expression in GROUP BY
> clause is derived from one expression in select list. For example:
>
> SELECT concat(x, y) as z, SUM(k), AVG(l) FROM GROUP BY z;
>
> PreLogicalPlanVerifier cannot handle much information, so in my
> opinion LogicalPlanVerifier would be proper to TAJO-572.
>
> Best regards,
> Hyunsik
>
>
> On Tue, May 5, 2015 at 11:13 PM, Atri Sharma <atri.jiit@gmail.com> wrote:
> > Hi All,
> >
> > I am understanding PreLogicalPlanVerifier for implementing TAJO-572. I
> see
> > that it is structures in visit functions. I am not sure how the execution
> > flow is handled for this class.
> >
> > Can someone elaborate a bit please?
> >
> > --
> > Regards,
> >
> > Atri
> > *l'apprenant*
>



-- 
Regards,

Atri
*l'apprenant*

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message