1 Reply Latest reply on Apr 2, 2013 9:34 PM by Steven Hawkins

    Hints (General/Source hints) are lost when the query is unioned

    Vineela Gampa Novice

      Hi

       

      We observed that teiid hints are lot when the query is unioned.hintsexec.random_hintsview  is a view which has sourcehint and general hint in its tranformation query. when we execute select * we see hints getting passed , but when unioned with something hints are lost.

       

      Please find the attached testcase. Below is the output from the unittest.

       

      Unit test can be found in com.ca.chorus.server.translator.hints.SysviewHintsExecutionTest.testTeiidHintsDuringUnion() .

       

       

      transformation is SELECT /*+ sh:'general_hint' random:'source_hint' */ random_number FROM (CALL random.random_number(3)) AS b

      1      [DEBUG] CHORUS-QUERY - select * from hintsexec.random_hintsview

      GeneralHint ** general_hint

      getSourceHint ** source_hint

      275    [DEBUG] CHORUS-QUERY - select * from hintsexec.random_hintsview

      GeneralHint ** general_hint

      getSourceHint ** source_hint

      277    [DEBUG] CHORUS-QUERY - select * from hintsexec.random_hintsview union select 0

      GeneralHint ** null

      getSourceHint ** null