Commit 5aa4b8f
150454: tree: clean up DOidWrapper usage r=yuzefovich a=yuzefovich
This PR cleans up usage of `DOidWrapper` utility. Throughout the years we've accumulated some dead code as well as in many cases we had blind copy-paste of unnecessary code, and this PR gets rid of it. Namely, `DOidWrapper` utility is now used to support `DName` and `DRefCursor` (on top of `DString`) and `DCIText` (on top of `DCollatedString`), and any other usages are forbidden. This PR removes all those other usages.
Please see each commit for more details.
Epic: None
152765: sql: replace a few context.Background() with what we have in scope r=yuzefovich a=yuzefovich
**sql: remove no longer used StubTableStats function**
**sql: replace a few context.Background() with what we have in scope**
I was looking into a timeout where we seemingly didn't respect the
context cancellation and noticed a couple of places where we use
`context.Backround()` that were easy to fix.
Touches: #152417.
Epic: None
153168: colcontainer: harden closing of files in diskQueue r=yuzefovich a=yuzefovich
The AI review of 31c3419 pointed out that `io.Closer` interface is such that calling `Close` multiple times can result in an undefined behavior. Previously, we had multiple places where if we got an error on the first `Close` call of read or write file of the disk queue, we could try to close the same file again - this was the case since we nil-ed out the file pointer after the error short-circuiting logic. This commit hardens the disk queue around this error to guarantee that we always close the file exactly once. This also allows us to remove some of explicit nilling out logic which now became redundant.
It's not immediately clear to me what actual "undefined behavior" would be in case of double-`Close` (or if it's even possible for implementations that we use to return an error), so I didn't include a release note. Still, it seems prudent to follow the interface's contract.
Epic: None
Release note: None
153176: sql/parser: fix minor issue with recent LTREE additions r=yuzefovich a=yuzefovich
We recently added parser support for FIRST_CONTAINS and FIRST_CONTAINED_BY operators (`?`@>`` and `?<`@`` respectively). The AI review pointed out a minor bug in how we handle these operators in the scanner - we incorrectly advanced the position unconditionally before matching the following characters. Instead, we need to use `peekN` to look a few characters ahead to see whether we have a match, and this commit does that. Note that the impact of the bug is very minor - we simply would put the `^` character in the error in the wrong position.
Note that two newly-added tests have slightly different behavior with regards to the `^` character which seems to be due to peculiarities of the tokenizing / parsing that I didn't look closely into.
Additionally, this commit adds a newline character in an unrelated parser test file.
Epic: None
Release note: None
153327: importer: simplify MakeTestingSimpleTableDescriptor r=yuzefovich a=yuzefovich
We no longer need any FK handling in this function, which allows us to remove some dead code. Also update error messages to not reference no longer open issues.
Epic: None
Release note: None
Co-authored-by: Yahor Yuzefovich <yahor@cockroachlabs.com>
File tree
50 files changed
+286
-826
lines changed- pkg
- backup
- ccl
- changefeedccl
- avro
- kcjsonschema
- partitionccl
- cmd/smith
- crosscluster/logical
- jobs
- multitenant/mtinfo
- server
- sql
- backfill
- catalog
- schematelemetry/schematelemetrycontroller
- systemschema
- colcontainer
- colexec/colbuilder
- importer
- opt
- exec/execbuilder
- norm
- paramparse
- parser/testdata
- rowcontainer
- rowenc
- valueside
- scanner
- sem
- builtins
- eval
- tree
- vecindex/vecstore
- util/parquet
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
50 files changed
+286
-826
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
161 | 161 | | |
162 | 162 | | |
163 | 163 | | |
164 | | - | |
| 164 | + | |
165 | 165 | | |
166 | 166 | | |
167 | 167 | | |
168 | | - | |
| 168 | + | |
169 | 169 | | |
170 | 170 | | |
171 | 171 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
544 | 544 | | |
545 | 545 | | |
546 | 546 | | |
547 | | - | |
| 547 | + | |
548 | 548 | | |
549 | 549 | | |
550 | 550 | | |
551 | 551 | | |
552 | | - | |
| 552 | + | |
553 | 553 | | |
554 | 554 | | |
555 | 555 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
450 | 450 | | |
451 | 451 | | |
452 | 452 | | |
453 | | - | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
454 | 458 | | |
455 | 459 | | |
456 | 460 | | |
| |||
460 | 464 | | |
461 | 465 | | |
462 | 466 | | |
463 | | - | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
464 | 472 | | |
465 | 473 | | |
466 | 474 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
75 | | - | |
| 75 | + | |
| 76 | + | |
76 | 77 | | |
77 | 78 | | |
78 | 79 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
342 | 342 | | |
343 | 343 | | |
344 | 344 | | |
345 | | - | |
| 345 | + | |
| 346 | + | |
346 | 347 | | |
347 | 348 | | |
348 | 349 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1284 | 1284 | | |
1285 | 1285 | | |
1286 | 1286 | | |
1287 | | - | |
| 1287 | + | |
1288 | 1288 | | |
1289 | 1289 | | |
1290 | 1290 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
825 | 825 | | |
826 | 826 | | |
827 | 827 | | |
828 | | - | |
| 828 | + | |
829 | 829 | | |
830 | 830 | | |
831 | 831 | | |
| |||
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
183 | 183 | | |
184 | 184 | | |
185 | 185 | | |
186 | | - | |
| 186 | + | |
| 187 | + | |
187 | 188 | | |
188 | 189 | | |
189 | 190 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
358 | 358 | | |
359 | 359 | | |
360 | 360 | | |
361 | | - | |
| 361 | + | |
| 362 | + | |
362 | 363 | | |
363 | 364 | | |
364 | 365 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
236 | 236 | | |
237 | 237 | | |
238 | 238 | | |
239 | | - | |
| 239 | + | |
| 240 | + | |
240 | 241 | | |
241 | 242 | | |
242 | 243 | | |
| |||
0 commit comments