Fixed UDFSubstr so that for strings, the substr now succeeds if there is a UTF-8 character by using the string length instead of the Text length.
Also, updated QTestUtil so that we can now write tests which include UTF-8 characters.
After HIVE-2792, the substr function produces a StringIndexOutOfBoundsException when called on a string containing UTF-8 characters without the length argument being present.
select substr(str, 1) from table1;
now fails with that exception if str contains a UTF-8 character for any row in the table.