HyukjinKwon commented on a change in pull request #31543:
URL: https://github.com/apache/spark/pull/31543#discussion_r575620933



##########
File path: 
external/avro/src/main/scala/org/apache/spark/sql/avro/AvroOptions.scala
##########
@@ -47,7 +51,21 @@ private[sql] class AvroOptions(
    * schema converted by Spark. For example, the expected schema of one column 
is of "enum" type,
    * instead of "string" type in the default converted schema.
    */
-  val schema: Option[String] = parameters.get("avroSchema")
+  val schema: Option[Schema] = {
+
+    val avroUrlSchema = parameters.get("avroSchemaUrl").map(schemaFSUrl => {
+      log.info("loading avro schema from url: " + schemaFSUrl)
+      val fs = FileSystem.get(new URI(schemaFSUrl), conf)
+      val in = fs.open(new Path(schemaFSUrl))

Review comment:
       I feel like this is just a small code bit that can be just done in 
user's application side.




----------------------------------------------------------------
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]



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

Reply via email to