fix: stringify ValueErrors for NaT types #22628
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
SUMMARY
similar to https://github.com/apache/superset/pull/22321/files, PyArrow will through a ValueError if converting an NaT type to a pa.array. I'm using the same stringify function that we're using for TypeErrors here.
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
Before:
![_DEV__Superset](https://user-images.githubusercontent.com/5186919/211112098-5f02a288-d10d-406e-b011-48c67df78d72.png)
After:
![_DEV__Superset](https://user-images.githubusercontent.com/5186919/211112167-d4957d98-512c-4199-bc25-e9ddc48fa66d.png)
TESTING INSTRUCTIONS
ADDITIONAL INFORMATION