[jira] [Updated] (SPARK-48148) JSON objects should not be modified when read as STRING

2024-05-06 Thread ASF GitHub Bot (Jira)


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

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

> JSON objects should not be modified when read as STRING
> ---
>
> Key: SPARK-48148
> URL: https://issues.apache.org/jira/browse/SPARK-48148
> Project: Spark
>  Issue Type: Bug
>  Components: Spark Core
>Affects Versions: 4.0.0
>Reporter: Eric Maynard
>Priority: Major
>  Labels: pull-request-available
>
> Currently, when reading a JSON like this:
> bq. {"a": {"b": -999.995}}
> With the schema:
> bq. a STRING
> Spark will yield a result like this:
> bq. {"b": -1000.0}
> This is due to how we convert a non-string value to a string in JacksonParser



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

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



[jira] [Updated] (SPARK-48148) JSON objects should not be modified when read as STRING

2024-05-06 Thread Eric Maynard (Jira)


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

Eric Maynard updated SPARK-48148:
-
Description: 
Currently, when reading a JSON like this:


bq. {"a": {"b": -999.995}}


With the schema:

bq. a STRING


Spark will yield a result like this:


bq. {"b": -1000.0}


This is due to how we convert a non-string value to a string in JacksonParser

  was:
Currently, when reading a JSON like this:

```
{"a": {"b": -999.995}}
```

With the schema:

```
a STRING
```

Spark will yield a result like this:

```
{"b": -1000.0}
```

This is due to how we convert a non-string value to a string in JacksonParser


> JSON objects should not be modified when read as STRING
> ---
>
> Key: SPARK-48148
> URL: https://issues.apache.org/jira/browse/SPARK-48148
> Project: Spark
>  Issue Type: Bug
>  Components: Spark Core
>Affects Versions: 4.0.0
>Reporter: Eric Maynard
>Priority: Major
>
> Currently, when reading a JSON like this:
> bq. {"a": {"b": -999.995}}
> With the schema:
> bq. a STRING
> Spark will yield a result like this:
> bq. {"b": -1000.0}
> This is due to how we convert a non-string value to a string in JacksonParser



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

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