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 2026/08/07 11:04:00 UTC
[jira] [Updated] (SPARK-58640) Align getBool with the sibling option accessors in CSVOptions and XmlOptions
[ https://issues.apache.org/jira/browse/SPARK-58640?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
ASF GitHub Bot updated SPARK-58640:
-----------------------------------
Labels: pull-request-available (was: )
> Align getBool with the sibling option accessors in CSVOptions and XmlOptions
> ----------------------------------------------------------------------------
>
> Key: SPARK-58640
> URL: https://issues.apache.org/jira/browse/SPARK-58640
> Project: Spark
> Issue Type: Improvement
> Components: SQL
> Affects Versions: 4.3.0
> Reporter: Uroš Bojanić
> Priority: Major
> Labels: pull-request-available
>
> getBool in CSVOptions and XmlOptions is an if/else-if chain over a string obtained with parameters.getOrElse(paramName, default.toString), while the sibling accessors in CSVOptions (getChar and getInt) match on parameters.get(paramName) and handle the missing and null cases as case None and case Some(null).
> This rewrites getBool in both files to the sibling shape. Besides being consistent, it avoids converting the default to a string only to parse it back, and evaluates toLowerCase once instead of twice.
> Behavior is unchanged for every input: an absent key yields the default, an explicit null value yields the default, true and false are accepted case insensitively via Locale.ROOT, and any other value throws the same error as before. The two files carried identical copies of this method, so both are updated to keep them in sync.
--
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