You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2024/01/02 12:21:00 UTC

[jira] [Updated] (SPARK-46568) Python data source options should be a case insensitive dictionary

     [ https://issues.apache.org/jira/browse/SPARK-46568?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

ASF GitHub Bot updated SPARK-46568:
-----------------------------------
    Labels: pull-request-available  (was: )

> Python data source options should be a case insensitive dictionary
> ------------------------------------------------------------------
>
>                 Key: SPARK-46568
>                 URL: https://issues.apache.org/jira/browse/SPARK-46568
>             Project: Spark
>          Issue Type: Sub-task
>          Components: PySpark
>    Affects Versions: 4.0.0
>            Reporter: Allison Wang
>            Priority: Major
>              Labels: pull-request-available
>
> Data source options are stored as a `CaseInsensitiveStringMap` in Scala, however, its behavior is inconsistent in Python:
> {code:java}
> class MyDataSource(DataSource):
>     def __init__(self, options):
>         self.api_key = options.get("API_KEY") # <- This is None
> spark.read.format(..).option("API_KEY", my_key).load(...){code}
> Currently, options will not have this "API_KEY" as everything is converted to lowercase on the Scala side. This can be confusing to users.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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