dongjoon-hyun commented on a change in pull request #27844: [MINOR][SQL] Add 
back ImageSchema.readImages in Spark 3.0
URL: https://github.com/apache/spark/pull/27844#discussion_r389302367
 
 

 ##########
 File path: mllib/src/main/scala/org/apache/spark/ml/image/ImageSchema.scala
 ##########
 @@ -188,4 +189,76 @@ object ImageSchema {
       Some(Row(Row(origin, height, width, nChannels, mode, decoded)))
     }
   }
+
+  /**
+   * Read the directory of images from the local or remote source
+   *
+   * @note If multiple jobs are run in parallel with different sampleRatio or 
recursive flag,
+   * there may be a race condition where one job overwrites the hadoop configs 
of another.
+   * @note If sample ratio is less than 1, sampling uses a PathFilter that is 
efficient but
+   * potentially non-deterministic.
+   *
+   * @param path Path to the image directory
+   * @return DataFrame with a single column "image" of images;
+   *         see ImageSchema for the details
+   */
+  @deprecated("use `spark.read.format(\"image\").load(path)` and this 
`readImages` will be " +
+    "removed in 3.1.0.", "2.4.0")
 
 Review comment:
   In any way, this is wrong due to the misunderstanding. 
   
   With the same reason why you add this back, @marmbrus 's suggestion was not 
removing this forever.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

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

Reply via email to