3 Replies Latest reply on Aug 10, 2017 1:31 PM by shawkins

    Makedep hint with @ sometimes not applied

    mike_higgins

      I’m using Teiid version 9.2.2.  In some cases, using the makedep @<table> feature results in the makedep hint being ignored.

      I use this feature to apply a makedep to only one branch of a set operation, since makedep hints are not applied when placed on the individual queries in the set operation .

      My query looks like this:

       

      (Select bbb from ccc

      Intersect

      select abc.yyy from (select yyy from zzz) abc

      ) option makedep @abc.zzz

       

      In the debug plan in the “GENERATE CANONICAL” section, I see:

       

      MEDIUM [Hints] Unknown group specified in OPTION MAKEDEP/MAKENOTDEP: @abc.zzz - ignoring hint

       

      This only occurs if the query has no limit applied to it.  If I add a limit option, it does find the table and apply the hint correctly.

      When the limit is not applied, it does work if I use @<real table name>, even though I am aliasing the query.  I am reluctant to use the @<real table name>, because it then applies the hint to all uses of the table, not just the unioned part I want.  Changing intersect to union does not affect the behavior.

      Is this something that might have been addressed in a later version?