BUG: allow None as upcasted_na value 
State: closed

In geopandas I use `dtype.na_value = None`, but this gives problems in `merge` (in `JoinUnit.get_reindexed_values`, `upcasted_na` of None is handled specifically).

The first commit works, but is not very nice, so in the second commit I attempted to just return `values` instead of `get_values`

Labels:
name: Missing-data
description: np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate
name: ExtensionArray
description: Extending pandas with custom dtypes or arrays.

Comments:
# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/20851?src=pr&el=h1) Report
> Merging [#20851](https://codecov.io/gh/pandas-dev/pandas/pull/20851?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/44d5498d8697513b7a4638c62dd711b1539d2335?src=pr&el=desc) will **decrease** coverage by `<.01%`.
> The diff coverage is `100%`.

[![Impacted file tree graph](https://codecov.io/gh/pandas-dev/pandas/pull/20851/graphs/tree.svg?width=650&token=eZ4WkYLtcO&height=150&src=pr)](https://codecov.io/gh/pandas-dev/pandas/pull/20851?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master   #20851      +/-   ##
==========================================
- Coverage   91.74%   91.74%   -0.01%     
==========================================
  Files         174      174              
  Lines       50763    50765       +2     
==========================================
- Hits        46575    46573       -2     
- Misses       4188     4192       +4
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `90.25% <100%> (ø)` | :arrow_up: |
| #single | `41.7% <100%> (-0.09%)` | :arrow_down: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/20851?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/core/internals/concat.py](https://codecov.io/gh/pandas-dev/pandas/pull/20851/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW50ZXJuYWxzL2NvbmNhdC5weQ==) | `96.48% <100%> (ø)` | :arrow_up: |
| [pandas/io/gbq.py](https://codecov.io/gh/pandas-dev/pandas/pull/20851/diff?src=pr&el=tree#diff-cGFuZGFzL2lvL2dicS5weQ==) | `78.94% <0%> (-10.53%)` | :arrow_down: |
| [pandas/core/frame.py](https://codecov.io/gh/pandas-dev/pandas/pull/20851/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZnJhbWUucHk=) | `97.02% <0%> (-0.12%)` | :arrow_down: |
| [pandas/core/tools/numeric.py](https://codecov.io/gh/pandas-dev/pandas/pull/20851/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvdG9vbHMvbnVtZXJpYy5weQ==) | `100% <0%> (ø)` | :arrow_up: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/20851?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/20851?src=pr&el=footer). Last update [44d5498...307265e](https://codecov.io/gh/pandas-dev/pandas/pull/20851?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).

values vs. get_values will have an effect for

- SparseBlock: not densified
- ExtensionBlock / NonConsolidatableMixin (no reshaping to `(1, len(values))`

No effect for

- Block (dtype is None)
- DatetimeTZBlock

Does that sound right?
From looking at the code, it seemed that `upcasted_na=None` only occurred in case of bool or numeric dtype, so for that block types, there is no difference between `values` and `get_values`. So therefore I tried to just change that.

The main problem with the current version is that this overloads the use of `None` there ("no upcasting -> different code path" vs "extensionarray with None as fill_value -> by "accident" the correct code" ). The first commit (if you look at it separately) is uglier but more "correct"
do any tests actually hit this?
can you rebase
not really sure what this is trying to fix. closing as stale.
Reviving this, as I hit this bug again with geopandas. 

For adding a test, I need an EA that uses None as missing value indicator. I could add a second version of the DecimalArray? (although that will duplicate quite a bit) Or I could adapt the JSON version to use None instead of `{}`, add a new ListArray that uses None as missing value indicator, or change the arrow-based one. Any preferences?
> For adding a test, I need an EA that uses None as missing value indicator. I could add a second version of the DecimalArray?

Can you subclass DecimalArray and override the na_value? That may not be too much duplication.
ListArray would also be nice 
@jorisvandenbossche can you merge master
I think this is stale so closing but feel free to reopen @jorisvandenbossche