[C++] Importing Decimal with invalid range from C Data Interface results in a crash
Open
Component: C++
Type: bug
- Dominant language
- C++
- Stars
- 17.1k
- Forks
- 4.3k
- Avg merge
- 3d 13h
- Merged PRs (30d)
- 88
Description
### Describe the bug, including details regarding any error messages, version, and platform.
Found when adding Decimal 32 support to nanoarrow/R!
```python
import nanoarrow as na
import pyarrow as pa
pa.DataType._import_from_c_capsule(
na.c_schema(na.null()).modify(format="d:10,0,32").__arrow_c_schema__()
)
#> The Kernel crashed while executing code in the current cell or a previous cell.
#> Bad status: Invalid: Decimal precision out of range [1, 9]: 10
```
We should probably check the precision on import and raise an error there?
### Component(s)
C++
Contributor guide
Assessment
This issue has not been assessed yet.