You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Hyukjin Kwon (JIRA)" <ji...@apache.org> on 2018/03/18 11:31:00 UTC
[jira] [Resolved] (SPARK-23706) spark.conf.get(value, default=None)
should produce None in PySpark
[ https://issues.apache.org/jira/browse/SPARK-23706?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Hyukjin Kwon resolved SPARK-23706.
----------------------------------
Resolution: Fixed
Fix Version/s: 2.4.0
2.3.1
Fixed in https://github.com/apache/spark/pull/20841
> spark.conf.get(value, default=None) should produce None in PySpark
> ------------------------------------------------------------------
>
> Key: SPARK-23706
> URL: https://issues.apache.org/jira/browse/SPARK-23706
> Project: Spark
> Issue Type: Sub-task
> Components: PySpark
> Affects Versions: 2.3.0
> Reporter: Hyukjin Kwon
> Priority: Minor
> Fix For: 2.3.1, 2.4.0
>
>
> Scala:
> {code}
> scala> spark.conf.get("hey")
> java.util.NoSuchElementException: hey
> at org.apache.spark.sql.internal.SQLConf$$anonfun$getConfString$2.apply(SQLConf.scala:1600)
> at org.apache.spark.sql.internal.SQLConf$$anonfun$getConfString$2.apply(SQLConf.scala:1600)
> at scala.Option.getOrElse(Option.scala:121)
> at org.apache.spark.sql.internal.SQLConf.getConfString(SQLConf.scala:1600)
> at org.apache.spark.sql.RuntimeConfig.get(RuntimeConfig.scala:74)
> ... 49 elided
> scala> spark.conf.get("hey", null)
> res1: String = null
> scala> spark.conf.get("spark.sql.sources.partitionOverwriteMode", null)
> res2: String = null
> {code}
> Python:
> {code}
> >>> spark.conf.get("hey")
> ...
> py4j.protocol.Py4JJavaError: An error occurred while calling o30.get.
> : java.util.NoSuchElementException: hey
> ...
> >>> spark.conf.get("hey", None)
> ...
> py4j.protocol.Py4JJavaError: An error occurred while calling o30.get.
> : java.util.NoSuchElementException: hey
> ...
> >>> spark.conf.get("spark.sql.sources.partitionOverwriteMode", None)
> u'STATIC'
> {code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org