Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-12-2024 07:51 AM
You're inferring the schema ("spark is guessing it") from the CSV. In your case either double or decimal is used. Instead, provide the schema while reading the files.
These "rounding errors" usually occur during floating-point calculations. Please make sure to use the same data type anywhere. Databricks supports at least three: FLOAT, DOUBLE and all variations of DECIMAL.