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 2022/03/25 09:55:31 UTC
[GitHub] [spark] HyukjinKwon commented on a change in pull request #35972: [SPARK-38656][UI][PYTHON] Show options for Pandas API on Spark in UI
HyukjinKwon commented on a change in pull request #35972:
URL: https://github.com/apache/spark/pull/35972#discussion_r835117065
##########
File path: sql/core/src/main/scala/org/apache/spark/sql/execution/ui/ExecutionPage.scala
##########
@@ -168,6 +177,45 @@ class ExecutionPage(parent: SQLTab) extends WebUIPage("execution") with Logging
<br/>
}
+ private def modifiedPandasOnSparkConfigs(
+ modifiedPandasOnSparkConfigs: Map[String, String]): Seq[Node] = {
+ if (modifiedPandasOnSparkConfigs.isEmpty) return Nil
+
+ val modifiedOptions = modifiedPandasOnSparkConfigs.toSeq.map { case (k, v) =>
+ // Remove prefix.
+ val key = k.slice("pandas_on_Spark.".length, k.length)
+ // The codes below is a simple version of Python's repr().
+ // Pandas API on Spark does not support other types in the options yet.
+ val pyValue = parse(v) match {
+ case JNull => "None"
+ case JBool(v) => v.toString.capitalize
+ case JString(s) => s"'$s'"
+ case _ => v
+ }
+ (key, pyValue)
+ }
+
+ val configs = UIUtils.listingTable(
+ propertyHeader,
+ propertyRow,
+ modifiedOptions.sorted,
+ fixedWidth = true
+ )
+
+ <div>
+ <span class="collapse-pandas-on-spark-properties collapse-table"
+ onClick="collapseTable('collapse-pandas-on-spark-properties',
+ 'pandas-on-spark-properties')">
+ <span class="collapse-table-arrow arrow-closed"></span>
+ <a>Pandas API on Spark: Properties</a>
Review comment:
I will create another PR to rename "SQL Properties" to something like "SQL/DataFrame: Properties" later.
--
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