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

    https://github.com/apache/spark/pull/20611#discussion_r179030399
  
    --- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/execution/command/tables.scala ---
    @@ -385,7 +385,9 @@ case class LoadDataCommand(
             val hadoopConf = sparkSession.sessionState.newHadoopConf()
             val srcPath = new Path(hdfsUri)
             val fs = srcPath.getFileSystem(hadoopConf)
    -        if (!fs.exists(srcPath)) {
    +        // Check if the path exists or there are matched paths if it's a 
path with wildcard.
    +        // For HDFS path, we support wildcard in directory name and file 
name.
    +        if (null == fs.globStatus(srcPath) || 
fs.globStatus(srcPath).isEmpty) {
    --- End diff --
    
    @wzhfy @HyukjinKwon @dongjoon-hyun  i verified the scenario by updating the 
code by using fs.globStatus() API for both local and hdfs path. for local path 
its working fine


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to