Skip to main content
Question

pass predicate inside UDL/UDX

  • October 21, 2020
  • 1 reply
  • 2 views

phil2
Forum|alt.badge.img+2
  • Participating Frequently

Hello
I'm looking for a way in sdk to get access to predicates inside udx (transform or custom source) to reduce workload inside function (to implement something like partition elimination). I see there is a planContext, but it seems it does not know anything about outer query. Is there any way to make row reduction possible inside udx?

1 reply

phil2
Forum|alt.badge.img+2
  • Author
  • Participating Frequently
  • November 12, 2020

something like

create view item_params as select parse2columns(X) over(partition nodes) as (id,p1,p2,p3,p4,...p100) from t;
select id, p11, p12, p13, p14, p15, p16 from item_params where p12 = 'bmw';

or

create view item_params as select parse2eav(X) over(partition nodes) as (id,name,value) from t;
select * from item_params where name = 'model';

or any case where tranform calculation is hard to evaluate so skipping it would save a lot of time