3 Replies Latest reply on Feb 25, 2013 5:04 PM by shawkins

    "OR" operator

    jane_lj

      Hi,

       

      My translator has handled "AndOr" operator, but somehow when I execute sql statement like "update tableA set ... where c1=1 or c2=2", it doesn't go through my updateexecution, it goes throught queryexecution, looks like Teiid doesn't think my translator handels that.

       

      But if i execute sql like "update tableA set ... where c1=1 and c2=2", it goes to my updateexecution. Don't know what's is missing?

       

      I have override this method in my update visitor class:

       

      public void visit(AndOr arg0)

      {

        .....

      }

       

      Thanks.

       

        • 1. Re: "OR" operator
          rareddy

          Do you have "supportsOrCriteria" turned to "true"?

          • 2. Re: "OR" operator
            jane_lj

            Ramesh,

             

            After I added it, it works now. But can I ask why it worked for "AND" operator even i don't have "supportsAndCriteria" turned to "true"?

             

            Thanks a lot.

             

            • 3. Re: "OR" operator
              shawkins

              The planner doesn't have a concept of limiting conjunct pushdowns.  We have yet to come accross a situation where predicates are supported, but only one at a time (if for example predicates are only supported against a single column, then all others can be marked as unsearchable).

               

              Steve