You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@trafodion.apache.org by Dave Birdsall <da...@esgyn.com> on 2017/09/28 22:08:23 UTC

ItemExpr question

Hi,

I want to surf an ItemExpr tree (actually a set of them: check constraints) and find all the ITM_BASECOLUMN nodes in them. Ideally, I'd like to obtain a ValueIdSet of these nodes, with duplicates removed. By duplicates, I mean, two nodes really are the same column. Example: check b > 0 and b < 100. I'd like 'b' to occur just once.

I'd guess this is a problem someone has already solved. Is there a method that will do this?

Thanks,

Dave

RE: ItemExpr question

Posted by Dave Birdsall <da...@esgyn.com>.
Hi,

I think I found it. Looks like findAll in the ItemExpr class will do the trick.

(I dimly remember someone recommending this to me in the past.)

Dave

-----Original Message-----
From: Dave Birdsall [mailto:dave.birdsall@esgyn.com] 
Sent: Thursday, September 28, 2017 3:08 PM
To: dev@trafodion.incubator.apache.org
Subject: ItemExpr question

Hi,

I want to surf an ItemExpr tree (actually a set of them: check constraints) and find all the ITM_BASECOLUMN nodes in them. Ideally, I'd like to obtain a ValueIdSet of these nodes, with duplicates removed. By duplicates, I mean, two nodes really are the same column. Example: check b > 0 and b < 100. I'd like 'b' to occur just once.

I'd guess this is a problem someone has already solved. Is there a method that will do this?

Thanks,

Dave