Commit f0a5cc3
authored
Support recursive normalizer in v2 API write (#2736)
#### Reference Issues/PRs
<!--Example: Fixes #1234. See also #3456.-->
https://man312219.monday.com/boards/7852509418/pulses/18298965201
#### What does this implement or fix?
1. Makes `def write` and `def write_pickle` in v2 API support recursive
normalizer
- Recursive normalizer enables ArcricDB to write and read nest data
structures (`dict`, `list`, `tuple`) of dataframes and arrays without
having to pickling the entire structure
- The data stored is not filterable, as is pickled data
- Please refer to
https://docs.arcticdb.io/latest/notebooks/arcticdb_demo_recursive_normalizers
for more details
3. Minor changes on formatter to support formatting individual files
Per discussed, in v2 API, recursive normalizer setting in LibraryOption
will be respected. Default library option of recursive normalizer will
be `False`. Existing libraries are unaffected.
#### Any other comments?
`def batch_write` in v1 API doesn't support recursive normalizer.
Ticket: https://man312219.monday.com/boards/7852509418/pulses/7855436309
Therefore the support of recursive normalizer in corresponding v2 API
will not be covered in this PR.
##### Pickling
`pickling` is a bit of a mess in V1 API.
For `arrow` and `pandas` data, if the normalization fails, it can
fallback to msgpack and pickling, depending on whether
`pickle_on_failure` is `True`.
However, for other kinds of data, it almost certainly fallback to
msgpack and pickling. The only option to prevent pickling is a library
config `strict_mode`. But I don't see there is any API to enable this
option, in V1/V2 nor internally.
#### Checklist
<details>
<summary>
Checklist for code changes...
</summary>
- [ ] Have you updated the relevant docstrings, documentation and
copyright notice?
- [ ] Is this contribution tested against [all ArcticDB's
features](../docs/mkdocs/docs/technical/contributing.md)?
- [ ] Do all exceptions introduced raise appropriate [error
messages](https://docs.arcticdb.io/error_messages/)?
- [ ] Are API changes highlighted in the PR description?
- [ ] Is the PR labelled as enhancement or bug so it appears in
autogenerated release notes?
</details>
<!--
Thanks for contributing a Pull Request to ArcticDB! Please ensure you
have taken a look at:
- ArcticDB's Code of Conduct:
https://github.com/man-group/ArcticDB/blob/master/CODE_OF_CONDUCT.md
- ArcticDB's Contribution Licensing:
https://github.com/man-group/ArcticDB/blob/master/docs/mkdocs/docs/technical/contributing.md#contribution-licensing
-->1 parent d89bf57 commit f0a5cc3
File tree
15 files changed
+861
-42
lines changed- build_tooling
- cpp/arcticdb/storage
- docs/mkdocs
- docs/notebooks
- python
- arcticdb
- adapters
- version_store
- tests
- integration/arcticdb
- unit/arcticdb/version_store
15 files changed
+861
-42
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
| 34 | + | |
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
41 | 46 | | |
42 | | - | |
| 47 | + | |
43 | 48 | | |
44 | | - | |
| 49 | + | |
45 | 50 | | |
46 | 51 | | |
47 | | - | |
| 52 | + | |
48 | 53 | | |
49 | 54 | | |
50 | 55 | | |
51 | 56 | | |
52 | 57 | | |
53 | 58 | | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
58 | 66 | | |
59 | 67 | | |
60 | 68 | | |
| |||
69 | 77 | | |
70 | 78 | | |
71 | 79 | | |
72 | | - | |
| 80 | + | |
73 | 81 | | |
74 | | - | |
| 82 | + | |
75 | 83 | | |
76 | | - | |
| 84 | + | |
77 | 85 | | |
78 | 86 | | |
79 | 87 | | |
| |||
105 | 113 | | |
106 | 114 | | |
107 | 115 | | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
108 | 121 | | |
109 | 122 | | |
110 | 123 | | |
| |||
122 | 135 | | |
123 | 136 | | |
124 | 137 | | |
| 138 | + | |
125 | 139 | | |
126 | 140 | | |
127 | 141 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
155 | 155 | | |
156 | 156 | | |
157 | 157 | | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
158 | 161 | | |
159 | 162 | | |
160 | 163 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
20 | 25 | | |
21 | 26 | | |
22 | 27 | | |
| |||
101 | 106 | | |
102 | 107 | | |
103 | 108 | | |
| 109 | + | |
| 110 | + | |
104 | 111 | | |
105 | 112 | | |
106 | 113 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
148 | 148 | | |
149 | 149 | | |
150 | 150 | | |
151 | | - | |
| 151 | + | |
| 152 | + | |
152 | 153 | | |
153 | 154 | | |
154 | 155 | | |
| |||
0 commit comments