Github user watermen commented on a diff in the pull request:

    https://github.com/apache/spark/pull/4532#discussion_r24551019
  
    --- Diff: 
sql/hive/src/main/scala/org/apache/spark/sql/hive/TableReader.scala ---
    @@ -248,7 +249,7 @@ private[hive] object HadoopTableReader extends 
HiveInspectors {
        * instantiate a HadoopRDD.
        */
       def initializeLocalJobConfFunc(path: String, tableDesc: 
TableDesc)(jobConf: JobConf) {
    -    FileInputFormat.setInputPaths(jobConf, path)
    +    jobConf.set("mapred.input.dir", 
StringUtils.escapeString(path.toString()))
    --- End diff --
    
    Can't, for examples 
"hdfs://x.x.x.x:9000/user/hive/warehouse/nzhang_part/ds=2010-08-15/hr=file," is 
will be splited into 
"hdfs://x.x.x.x:9000/user/hive/warehouse/nzhang_part/ds=2010-08-15/hr=file" and 
"" by FileInputFormat.getPathStrings, "" will be checked by Path.checkPathArg 
and 
    ```
    if( path.length() == 0 ) {
           throw new IllegalArgumentException(
               "Can not create a Path from an empty string");
        }
    ```
    you can see 
    ```
    FileInputFormat.setInputPaths -> FileInputFormat.getPathStrings -> 
Path.checkPathArg
    ```
    in hadoop for detail.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to