This repository was archived by the owner on Nov 7, 2025. It is now read-only.
Commit d46cf78
authored
Improve validation of Array types (#1248)
Before this change, `validateValueAgainstType` would just compare the
type name string in case of arrays. This could cause problems in case of
arrays of numbers, for example if the user had an `Array(Float64)`
ClickHouse column, but tried to insert an array of ints (e.g. `[3, 5,
7]`).
After this fix, the `validateValueAgainstType` logic now works
recursively, validating the element type of `Array` (e.g. `Float64` of
`Array(Float64)`) and comparing that with an element of incoming array
from Elastic API.1 parent f553c27 commit d46cf78
2 files changed
+48
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
169 | 169 | | |
170 | 170 | | |
171 | 171 | | |
172 | | - | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
173 | 203 | | |
174 | 204 | | |
175 | 205 | | |
176 | | - | |
| 206 | + | |
177 | 207 | | |
178 | 208 | | |
179 | 209 | | |
| |||
217 | 247 | | |
218 | 248 | | |
219 | 249 | | |
220 | | - | |
| 250 | + | |
221 | 251 | | |
222 | 252 | | |
223 | 253 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
49 | | - | |
| 49 | + | |
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | | - | |
| 56 | + | |
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
| |||
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
100 | 103 | | |
101 | 104 | | |
102 | 105 | | |
| |||
124 | 127 | | |
125 | 128 | | |
126 | 129 | | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
127 | 133 | | |
128 | 134 | | |
129 | 135 | | |
| |||
163 | 169 | | |
164 | 170 | | |
165 | 171 | | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
166 | 179 | | |
167 | 180 | | |
168 | 181 | | |
| |||
0 commit comments