-
Notifications
You must be signed in to change notification settings - Fork 236
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add tests to check compatibility with
fastparquet
(#9366)
This commit adds tests to check for compatibility between the Spark RAPIDS plugin and [`fastparquet`](https://fastparquet.readthedocs.io/en/latest/index.html). The tests include the following scenarios: 1. To check whether Parquet files written with `fastparquet` are read correctly with the Spark RAPIDS plugin. 2. To check whether Parquet files written with the Spark RAPIDS plugin are read correctly with `fastparquet`. 3. To check that files written with Apache Spark are read similarly with the Spark RAPIDS plugin, and `fastparquet`. There are known limitations for these tests: 1. Converting Pandas dataframes to Spark dataframes seems to fail with Spark versions preceding `spark-3.4.x`. This limits the Spark versions where the test may be run. 2. Pandas and `fastparquet` have known limitations with certain datatypes. For instance: a. `fastparquet` does not support `DECIMAL` columns, as per [documentation](https://fastparquet.readthedocs.io/en/latest/details.html#data-types). These are treated as `FLOAT`. b. There seem to be limits to the ranges of `Date` and `Timestamp` rows, as compared to Apache Spark. For instance, dates like `date(year=8543, month=12, day=31)` is deemed out of range in Pandas/`fastparquet`. Such a date cannot be written via `fastparquet`, nor could they be read correctly via `fastparquet`. Signed-off-by: MithunR <[email protected]>
- Loading branch information
Showing
7 changed files
with
363 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,4 +16,5 @@ sre_yield | |
pandas | ||
pyarrow | ||
pytest-xdist >= 2.0.0 | ||
findspark | ||
findspark | ||
fastparquet >= 2023.8.0 |
354 changes: 354 additions & 0 deletions
354
integration_tests/src/main/python/fastparquet_compatibility_test.py
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters