man-group / ArcticDB

ArcticDB is a high performance, serverless DataFrame database built for the Python Data Science ecosystem.
http://arcticdb.io
Other
1.51k stars 93 forks source link

Bugfix/1841/maintain empty series names #1983

Closed alexowens90 closed 2 weeks ago

alexowens90 commented 2 weeks ago

Reference Issues/PRs

Fixes #1841

What does this implement or fix?

Before this change, if a Series had an empty-string as a name, this would be roundtripped as a None. This introduces a has_name bool to the normalization metadata protobuf, as a backwards-compatible way of effectively making the name field optional.

The behaviour (which has been verified) can be summarised as follows:

Writer version | Series name | Protobuf name field | Protobuf has_name field | Series name read by <=5.0.0 | Series name read by this branch
---------------|-------------|---------------------|-------------------------|-----------------------------|--------------------------------
       <=5.0.0 |     "hello" |             "hello" |             Not present |                     "hello" |                         "hello"
       <=5.0.0 |          "" |                  "" |             Not present |                        None |                            None
       <=5.0.0 |        None |                  "" |             Not present |                        None |                            None
   This branch |     "hello" |             "hello" |                    True |                     "hello" |                         "hello"
   This branch |          "" |                  "" |                    True |                        None |                              ""
   This branch |        None |                  "" |                   False |                        None |                            None