apache / apache/arrow-nanoarrow

Windows issue with negative decimals

Open
#594 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
249
Forks
68
Avg merge
2d 21h
Merged PRs (30d)
11

Description

Not sure if this is a nanoarrow issue or with the PyArrow export, but figured I'd start here.

When consuming an array like this:

```python
schema = pa.schema([("col", pa.decimal128(38, 10))])
tbl = pa.Table.from_arrays([
pa.array(["1234567890.123456789", "-99876543210.987654321",])
], schema=schema)
```

and using `ArrowDecimalAppendDigitsToBuffer` in nanoarrow, it seems like negative values on windows only are not properly represented.

I created an "MRE" for this in this library:

https://github.com/WillAyd/capsule_testing/tree/739bc608b96101ada424ef6d9736e2dfffcc2f11

You can see the issue for Windows in CI logs:

https://github.com/WillAyd/capsule_testing/actions/runs/10482665140/job/29034136906#step:4:358

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with ArrowDecimalAppendDigitsToBuffer and the linked capsule_testing MRE, then compare its Windows CI output with the expected negative decimal values. Reproduce the issue on Windows and trace the decimal formatting path; done means negative decimals are represented correctly there without changing the existing positive-value behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, python
Domain
data
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.