Hyukjin Kwon created SPARK-23706: ------------------------------------ Summary: 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
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-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org