[hibernate-dev] Query Parser Redesign

Steve Ebersole steve at hibernate.org
Mon Aug 24 23:12:12 EDT 2015


Andrea, this is in relation to something you asked me on IRC today.
Specifically in regards to FromClause and the fact that it maintains
pointers to parent/children.  As I said on IRC there is no intrinsic need
(I do not foresee) for keeping this structure; I really only did that
because FromCauseProcessor needed a stack of FromClauses and the FromClause
itself made a simple place to do that.

However, in later work I ran into minor problems because of that decision.
I need to make a copy of an entire SelectStatement tree.  But because the
FromClause is held twice (for non-root FromClauses) in the tree, it makes
it more complicated to do a "simple copy" than it need be.  Basically I
need to maintain a "Map<FromClause,FromClause> copy Map" :(

Long story short, I think I might revisit that decision and instead write a
dedicated stack in FromClauseProcessor for this.  In the morning... its too
late to start something that ambitious tonight.  I'll start that in the
morning, unless someone wants to pick that up in the next few hours before
I get back on line.


More information about the hibernate-dev mailing list