[ https://issues.apache.org/jira/browse/HIVE-6986?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13997507#comment-13997507 ]
Furcy Pin commented on HIVE-6986: --------------------------------- Hi Ashutosh, r.startsWith("select") wouldn't match upper cases, and unfortunately there is no built-in String.startsWithIgnoreCase in Java I believe. r.toLowerCase().equals("select") would work of course, but I wanted to preserve the initial (futile) optimisation with the r.substring(0,6), so that we don't cast the whole query to lowercase, but just its prefix. > MatchPath fails with small resultExprString > ------------------------------------------- > > Key: HIVE-6986 > URL: https://issues.apache.org/jira/browse/HIVE-6986 > Project: Hive > Issue Type: Bug > Components: UDF > Reporter: Furcy Pin > Priority: Trivial > Attachments: HIVE-6986.1.patch > > > When using MatchPath, a query like this: > select year > from matchpath(on > flights_tiny > sort by fl_num, year, month, day_of_month > arg1('LATE.LATE+'), > arg2('LATE'), arg3(arr_delay > 15), > arg4('year') > ) > ; > will fail with error message > "FAILED: StringIndexOutOfBoundsException String index out of range: 6" -- This message was sent by Atlassian JIRA (v6.2#6252)