You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2021/12/07 03:37:58 UTC

[GitHub] [spark] yikf commented on a change in pull request #34810: [SPARK-37549][SQL] Support set parallel through data source properties

yikf commented on a change in pull request #34810:
URL: https://github.com/apache/spark/pull/34810#discussion_r763603388



##########
File path: sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/SourceOptions.scala
##########
@@ -36,6 +36,9 @@ class SourceOptions(
   // A flag to always respect the Spark schema restored from the table properties
   val respectSparkSchema: Boolean = parameters
     .get(RESPECT_SPARK_SCHEMA).map(_.toBoolean).getOrElse(DEFAULT_RESPECT_SPARK_SCHEMA)
+
+  // Expected parallelism from the data source properties.
+  val parallel: Option[Int] = parameters.get(PARALLEL).map(_.toInt)

Review comment:
       Shall we verify the parameter? if PARALLEL is type of the `String` or any other that it is not `Int`, The will encounter a conversion error.




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

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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