1

I have case where there is a node(A) with infinite cost which is suppose to be substituted with a relevant finite node(B) at the end of optimization. There's another node (C). The tree looks like:

Project2
    C(Kind of Filter)
        A (Infinite Cost) 
            Project1
                Fetch1
            Fetch2

Rule1 is responsible for pushing part/full filter to Fetch 2 based on the details present in node A.

Like,

Case 1:

Project2
    C(Remaining Filter)
       A (Infinite Cost) 
          Project1
              Fetch1
          Fetch2 (config: C pushable filter)

Case 2:

Project2
    A (Infinite Cost) 
        Project1
            Fetch1
        Fetch2 (config: C pushable filter)

Rule2 is reponsible to substitute Node A with Node B to make it finite

Project2
    C(Remaining Filter)
        B (additional confi: Fetch2 (config: C pushable filter)) 
            Project1
                Fetch1

Project2
    B (additional confi: Fetch2 (config: C full filter)) 
        Project1
            Fetch1

Since the order of rules on the subsets was crucial with this kind of consumption, with the upgrade I am stuck with no way to make rules execute in a given order.

Currently the first thing that happens in substitution of A to B to make it finite. There are several such rules like Rule1 to change them on whole to deal with B instead of A has quite a significant impact. I went through several threads on calcite forum and found this change of removing rule importance/priority has been done with an intent to save on memory and unnecessary rule application on the subsets.

Is there any workaround or way out to preserve rule order like explained above ?

Note: I tried top-down rule driver but no luck

TIA

0 Answers0