dongjoon-hyun commented on a change in pull request #31543:
URL: https://github.com/apache/spark/pull/31543#discussion_r575765283



##########
File path: 
external/avro/src/main/scala/org/apache/spark/sql/avro/AvroOptions.scala
##########
@@ -47,7 +51,25 @@ 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] = {
+
+    parameters.get("avroSchema").map(new Schema.Parser().parse).orElse({
+
+      val avroUrlSchema = parameters.get("avroSchemaUrl").map(schemaFSUrl => {
+        log.info("loading avro schema from url: " + schemaFSUrl)

Review comment:
       Shall we lower the log level to `debug`?




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