Commit 88240a3
155133: scbuild: allow multiple column renames r=rafiss a=rafiss
Please review each commit individually.
informs #148340
### schemaexpr: add isComputed to ColumnLookupFn
### scbuild: move function definitions to helpers.go
### schemaexpr: add iterColsWithLookupFn
This function allows the computed column validation to be used from the
declarative schema changer -- it uses a lookup function to access
columns rather than referring to the table descriptor directly.
### scbuild: use ValidateComputedColumnExpressionWithLookup function
This validates the computed column by referencing the builder state
rather than the table descriptor. The table descriptor would not reflect
the schema changes that are being staged by the declarative schema
changer.
### scplan: relax constraint for cleaning up non-index-backed constraints
This rule was matching all non-index-backed constraints, but it only
needs to apply to UNIQUE WITHOUT INDEX constraints.
### scplan: tighten rule for transient check constraints
This rule was only needed for the ALTER COLUMN TYPE op, so the rule is
updated to only apply in that case.
### scbuild: allow multiple column renames
This includes new dependency rules so that we fully remove the old name
before allowing a new column to take on that name, and another one to
make sure that a name is available before we create a computed column
expression that uses that name.
Release note: None
156557: sql: update MaxBatchSize comments r=yuzefovich a=andy-kimball
The comments for MaxBatchSize incorrectly state that it limits the number of KV batch entries. It actually limits the number of SQL-level batch rows. It includes only primary index rows, not secondary index rows. This commit updates all the comments to reflect what the code is actually doing.
Epic: none
Release note: None
156584: copy: fix vectorized auto commit behavior r=yuzefovich a=yuzefovich
When we implemented the vectorized INSERT which supports COPY in some cases, we missed one condition for auto-committing the txn that is present in the regular `tableWriterBase` path. Namely, we need to check whether the deadline that might be set on the txn hasn't expired yet, and if it has, we shouldn't be auto-committing and should be leaving it up to the connExecutor (which will try to refresh the deadline). The impact of the bug is that often if COPY took longer than 40s (controlled via `server.sqlliveness.ttl`), we'd hit the txn retry error and propagate it to the client.
Fixes: #155300.
Release note (bug fix): Previously, the "atomic" COPY command (controlled via `copy_from_atomic_enabled`, which is `true` by default) could encounter RETRY_COMMIT_DEADLINE_EXCEEDED txn errors if the whole command took 1 minute or more. This was the case only when the vectorized engine was used for COPY and is now fixed.
156654: sql: add optimizer_use_max_frequency_selectivity session setting r=mgartner a=mgartner
The `optimizer_use_max_frequency_selectivity` session setting has been
added. It is enabled by default. Disabling it reverts the selectivity
improvements added in #151409.
Release note: None
156673: build: update `MungeTestXML` and `MergeTestXMLs` behavior r=rail a=rickystewart
The `test.xml` produced by `rules_go` changed with the latest upgrade; this change restores the previous behavior.
Epic: DEVINF-1477
Closes #156597
Release note: none
Co-authored-by: Rafi Shamim <rafi@cockroachlabs.com>
Co-authored-by: Andrew Kimball <andyk@cockroachlabs.com>
Co-authored-by: Yahor Yuzefovich <yahor@cockroachlabs.com>
Co-authored-by: Marcus Gartner <marcus@cockroachlabs.com>
Co-authored-by: Ricky Stewart <ricky@cockroachlabs.com>
File tree
73 files changed
+3082
-421
lines changed- pkg
- build/util
- ccl
- changefeedccl
- schemachangerccl
- sctestbackupccl
- testdata/end_to_end/add_column_multiple_regional_by_row
- cmd/roachtest/tests
- sql
- catalog/schemaexpr
- colexec
- logictest/testdata/logic_test
- mutations
- opt
- exec/execbuilder
- memo
- testdata/stats
- schemachanger
- scbuild
- internal/scbuildstmt
- testdata
- scplan
- internal/rules/current
- testdata
- testdata
- testdata/end_to_end
- add_column_default_unique_not_null
- add_column_default_unique
- alter_table_add_bit
- alter_table_drop_add_same_col_implicit
- alter_table_rename_multiple_columns
- sessiondatapb
- sessionmutator
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
73 files changed
+3082
-421
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
12 | 11 | | |
13 | 12 | | |
14 | 13 | | |
| |||
30 | 29 | | |
31 | 30 | | |
32 | 31 | | |
33 | | - | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
34 | 37 | | |
| 38 | + | |
35 | 39 | | |
36 | 40 | | |
37 | 41 | | |
| |||
41 | 45 | | |
42 | 46 | | |
43 | 47 | | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
49 | 54 | | |
50 | 55 | | |
51 | 56 | | |
| |||
122 | 127 | | |
123 | 128 | | |
124 | 129 | | |
125 | | - | |
126 | 130 | | |
127 | 131 | | |
128 | 132 | | |
| |||
135 | 139 | | |
136 | 140 | | |
137 | 141 | | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
142 | 163 | | |
143 | | - | |
144 | | - | |
| 164 | + | |
145 | 165 | | |
146 | 166 | | |
147 | | - | |
148 | | - | |
149 | | - | |
150 | | - | |
| 167 | + | |
| 168 | + | |
151 | 169 | | |
152 | 170 | | |
153 | 171 | | |
154 | 172 | | |
155 | | - | |
156 | | - | |
157 | | - | |
158 | | - | |
159 | | - | |
160 | | - | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
161 | 178 | | |
162 | | - | |
163 | | - | |
| 179 | + | |
| 180 | + | |
164 | 181 | | |
165 | | - | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
166 | 190 | | |
167 | 191 | | |
168 | | - | |
169 | | - | |
170 | | - | |
171 | | - | |
172 | | - | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
173 | 197 | | |
174 | | - | |
175 | | - | |
176 | | - | |
177 | | - | |
178 | | - | |
179 | | - | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
180 | 213 | | |
181 | 214 | | |
182 | 215 | | |
183 | 216 | | |
184 | | - | |
185 | | - | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
186 | 236 | | |
187 | | - | |
188 | | - | |
189 | | - | |
190 | | - | |
| 237 | + | |
191 | 238 | | |
192 | 239 | | |
193 | 240 | | |
| |||
0 commit comments