1 Reply Latest reply on Mar 4, 2013 2:39 PM by Steven Hawkins

    teiid query hints getting overriden

    Vineela Gampa Novice

      Hi

       

      Is it possible to append hints to existing hints that exits for a table/view. ?

       

       

      We have a usecase where we set hints to the transformation query of a view in getMetadata call of a translator. when we are querying for that view we also pass a general hint /*+ sh:'data_window' */. we observed that teiid hints are getting ovveriden. Is there any property with which we can ask teiid to append the hints rather than ovveriding them ? 

       

       

      Below is the snippet of what happens in getMetadata call.

       

      if (v != null) {

                  v.setVirtual(true);

                  v.setTableType(Type.View);

                  String transformation = null;

                  String localHint = "";

                  if (hint != null) {

                      localHint = "/*+ sh:'" + hint + "' */ ";

                  }

                  String localCacheHint = "";

                  if (cacheHint != null) {

                      localCacheHint = "/*+ " + cacheHint + " */ ";

                  }

       

                         transformation = "SELECT " + localHint + columnList.toString() + " FROM GSV." + tableName + " AS b";

       

                  if (cacheHint != null) {

                      v.setMaterialized(true);

                      transformation = localCacheHint + transformation;

                  }