You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@arrow.apache.org by "Joris Van den Bossche (Jira)" <ji...@apache.org> on 2022/04/19 10:00:00 UTC
[jira] [Updated] (ARROW-11978) [Python] Dynamic casting during JSON schema inference
[ https://issues.apache.org/jira/browse/ARROW-11978?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Joris Van den Bossche updated ARROW-11978:
------------------------------------------
Component/s: C++
> [Python] Dynamic casting during JSON schema inference
> -----------------------------------------------------
>
> Key: ARROW-11978
> URL: https://issues.apache.org/jira/browse/ARROW-11978
> Project: Apache Arrow
> Issue Type: Improvement
> Components: C++, Python
> Affects Versions: 3.0.0
> Reporter: Pavol Knapek
> Priority: Major
>
> It would be very nice to have some opt-in dynamic casting supported in the JSON schema inference process.
>
> Example input.json file:
> > \{"col1": "1"}
> > \{"col1": 1}
>
> Example schema-inference invocation:
> > pyarrow.json.read_json('input.json')
>
> Expected output:
> > pyarrow.Table with a schema of \{col1: string}
>
> Actual output:
> > ArrowInvalid: JSON parse error: Column(/col1) changed from string to number in row 1
>
> This applies for all the DataTypes, convertible to a super-type, i.e.:
> > Integer -> String
> > Object -> String
> > Anything -> String
--
This message was sent by Atlassian Jira
(v8.20.1#820001)