Repository navigation
Commit 0056565
fix: Infer vector width when vector_length is undeclared
Addresses item 3 of #6907, which asked for vector_length to be required when
vector_index=True. That specific change is not viable, so this takes a
non-breaking route to the same goal.
Requiring it would break roughly 29 call sites that declare vector_index=True
without vector_length, including the bundled feast init -t rag and -t ray_rag
templates, several entries under examples/, and four online stores that
deliberately fall back to 512. The onboarding path would stop working.
The underlying problem is still real: vector_length defaults to 0 and 0 meant
skip, so the common case was unvalidated. Instead of skipping, the width of the
first non-null row now becomes the contract for the rest of the table. An
approximate nearest neighbour index requires a fixed width, so a ragged vector
column is a defect whether or not anyone declared a length, and inferring is
strictly better than skipping.
A declared vector_length still wins over inference, so nothing about the
declared case changes. Fixed-size list columns are uniform by construction, so
an undeclared one needs no check at all. Null rows carry no width and are
neither used for inference nor compared.
The gate moves from vector_length to vector_index, since vector_index is what
says the field is a vector.
Verified no regressions by diffing failure names across the full unit suite
before and after: 41 pre-existing failures on both sides, none introduced,
which also confirms none of the undeclared sites produce ragged columns.
Signed-off-by: hao-xu5 <[email protected]>1 parent 1196e22 commit 0056565
3 files changed
Lines changed: 139 additions & 20 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3630 | 3630 | | |
3631 | 3631 | | |
3632 | 3632 | | |
3633 | | - | |
| 3633 | + | |
3634 | 3634 | | |
3635 | 3635 | | |
3636 | 3636 | | |
3637 | 3637 | | |
3638 | 3638 | | |
3639 | 3639 | | |
3640 | | - | |
3641 | 3640 | | |
| 3641 | + | |
3642 | 3642 | | |
3643 | 3643 | | |
3644 | 3644 | | |
| |||
3652 | 3652 | | |
3653 | 3653 | | |
3654 | 3654 | | |
| 3655 | + | |
| 3656 | + | |
| 3657 | + | |
| 3658 | + | |
| 3659 | + | |
| 3660 | + | |
| 3661 | + | |
| 3662 | + | |
| 3663 | + | |
| 3664 | + | |
| 3665 | + | |
| 3666 | + | |
| 3667 | + | |
| 3668 | + | |
| 3669 | + | |
3655 | 3670 | | |
3656 | 3671 | | |
3657 | 3672 | | |
| |||
3669 | 3684 | | |
3670 | 3685 | | |
3671 | 3686 | | |
| 3687 | + | |
| 3688 | + | |
| 3689 | + | |
| 3690 | + | |
| 3691 | + | |
3672 | 3692 | | |
3673 | 3693 | | |
3674 | | - | |
3675 | | - | |
| 3694 | + | |
3676 | 3695 | | |
3677 | 3696 | | |
3678 | 3697 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2027 | 2027 | | |
2028 | 2028 | | |
2029 | 2029 | | |
2030 | | - | |
| 2030 | + | |
2031 | 2031 | | |
2032 | 2032 | | |
2033 | 2033 | | |
2034 | 2034 | | |
2035 | 2035 | | |
2036 | | - | |
2037 | | - | |
| 2036 | + | |
| 2037 | + | |
| 2038 | + | |
| 2039 | + | |
| 2040 | + | |
| 2041 | + | |
| 2042 | + | |
| 2043 | + | |
2038 | 2044 | | |
2039 | 2045 | | |
2040 | 2046 | | |
2041 | 2047 | | |
2042 | 2048 | | |
2043 | 2049 | | |
2044 | | - | |
| 2050 | + | |
| 2051 | + | |
2045 | 2052 | | |
2046 | 2053 | | |
2047 | | - | |
| 2054 | + | |
2048 | 2055 | | |
2049 | 2056 | | |
2050 | 2057 | | |
2051 | 2058 | | |
2052 | 2059 | | |
2053 | 2060 | | |
2054 | | - | |
2055 | 2061 | | |
2056 | 2062 | | |
| 2063 | + | |
2057 | 2064 | | |
2058 | | - | |
| 2065 | + | |
2059 | 2066 | | |
| 2067 | + | |
| 2068 | + | |
| 2069 | + | |
| 2070 | + | |
| 2071 | + | |
2060 | 2072 | | |
2061 | | - | |
| 2073 | + | |
2062 | 2074 | | |
2063 | 2075 | | |
2064 | 2076 | | |
2065 | 2077 | | |
2066 | | - | |
2067 | | - | |
| 2078 | + | |
| 2079 | + | |
| 2080 | + | |
| 2081 | + | |
2068 | 2082 | | |
2069 | 2083 | | |
2070 | 2084 | | |
2071 | 2085 | | |
| 2086 | + | |
| 2087 | + | |
| 2088 | + | |
| 2089 | + | |
| 2090 | + | |
| 2091 | + | |
| 2092 | + | |
| 2093 | + | |
| 2094 | + | |
| 2095 | + | |
2072 | 2096 | | |
2073 | 2097 | | |
2074 | | - | |
2075 | | - | |
| 2098 | + | |
2076 | 2099 | | |
2077 | 2100 | | |
2078 | 2101 | | |
2079 | | - | |
| 2102 | + | |
2080 | 2103 | | |
2081 | 2104 | | |
2082 | | - | |
| 2105 | + | |
| 2106 | + | |
2083 | 2107 | | |
2084 | | - | |
2085 | | - | |
| 2108 | + | |
| 2109 | + | |
2086 | 2110 | | |
2087 | 2111 | | |
2088 | 2112 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
250 | 250 | | |
251 | 251 | | |
252 | 252 | | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
0 commit comments