-
Notifications
You must be signed in to change notification settings - Fork 150
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Numbers are parsed to numbers when enforceSchema is set to true and type being String #747
Comments
Hi @FlavioShneider, can you post the exact code, and in the best case also the Excel file to reproduce the issue? |
Input Code
Output |
I think I know what's happening: The |
Could this behavior be triggered if inferSchema=true and a column has mixed values (some string and some numeric, some produced by formulas)? In looking at the code, it looks like DataFormatter is used when usePlainNumberFormat is set to true, which should be a safe conversion, but I'm seeing behavior that converts number values to scientific notation when there are formulas and mixed values in the column. Spark 3.1.1 |
I'm having this problem too, is there a solution? |
Is there an existing issue for this?
Current Behavior
one column value can be large numbers like this
1010675
note:
I worry the title is different and the problem might be ignored, so raised here with explict problem title.
the current read/parse result is:
1010675.0
Expected Behavior
1010675 string not transformed
Steps To Reproduce
No response
Environment
Anything else?
No response
The text was updated successfully, but these errors were encountered: