[ 
https://issues.apache.org/jira/browse/HIVE-14259?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15381307#comment-15381307
 ] 

Rui Li commented on HIVE-14259:
-------------------------------

[~kgyrtkirk] - Yeah I think it's better to put the utility methods together, or 
even consolidate them a bit - the two isSubDir methods are essentially trying 
to achieve the same purpose right? Hive::isSubDir solves the issue here by 
appending '/' at the end of each path, so we can still use String::startsWith. 
Intuitively, I think this may save some comparisons for long paths.

> FileUtils.isSubDir may return incorrect result
> ----------------------------------------------
>
>                 Key: HIVE-14259
>                 URL: https://issues.apache.org/jira/browse/HIVE-14259
>             Project: Hive
>          Issue Type: Bug
>            Reporter: Zoltan Haindrich
>            Assignee: Zoltan Haindrich
>            Priority: Minor
>         Attachments: HIVE-14259.1.patch
>
>
> while I was working on HIVE-12244 i've looked around for utility 
> methods...i've found this method; but it considers path: `/dir12` inside 
> `/dir1`
> which is not true



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to