Github user marmbrus commented on the pull request:
https://github.com/apache/spark/pull/10205#issuecomment-206039890
In particular the implicit wrapping of `OptionalConfigEntry[T]` to be a
`ConfigEntry[Option[T]]` coupled with the unwrapping done via overloading of
`getConf` took me a while to unpack. Maybe I'm just hitting a bug, but if I do
the following to get an optional config:
```scala
val checkpointConfig: Option[String] =
df.sqlContext.conf.getConf(SQLConf.CHECKPOINT_LOCATION)
```
- intelij for some reason isn't understanding it and is underlining it in
red.
- its throwing `java.util.NoSuchElementException:
spark.sql.streaming.checkpointLocation`.
To get it to work correctly I have to write:
```scala
val checkpointConfig: Option[String] =
df.sqlContext.conf.getConf(
SQLConf.CHECKPOINT_LOCATION.asInstanceOf[ConfigEntry[Option[String]]],
None)
```
Am I doing something wrong?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]