Commit fee0fa2
authored
Implement unified vertex table architecture (#2278)
NOTE: This PR was built with AI tools and a human.
Implemented a unified vertex table architecture to be built off of.
Key changes:
Replaced per-label vertex tables with a single _ag_label_vertex table containing
columns: id (graphid), properties (agtype), labels (oid).
* Fixed vertex operations (CREATE, MATCH, SET, DELETE, VLE) to use unified
_ag_label_vertex table instead of label-specific tables.
* Fixed vertex label display: Added _label_name_from_table_oid() function to
extract label names from the labels column OID rather than parsing graphid
values (which is table-per-label specific)
* Fixed graphid generation: Updated transform_cypher_node() in cypher_clause.c to
use label_relation instead of default_vertex_relation when building id
expressions, ensuring labeled vertices receive label-specific sequence values in
their id.
* Disconnected all label id extraction from the vertex ids. This makes all
operations independent of the vertex id, except for as an id.
* Fixed regression tests.
Differences with regression tests are due to -
* Non-ordered output being reordered due to the new unified table.
* Different query plans with explain due to the new unified table.
* Displaying specific vertex label tables instead of the unified table.
modified: Makefile
modified: regress/expected/age_global_graph.out
modified: regress/expected/age_load.out
modified: regress/expected/cypher_create.out
modified: regress/expected/cypher_delete.out
modified: regress/expected/cypher_match.out
modified: regress/expected/cypher_merge.out
modified: regress/expected/cypher_remove.out
modified: regress/expected/cypher_set.out
modified: regress/expected/cypher_subquery.out
modified: regress/expected/cypher_vle.out
modified: regress/expected/expr.out
modified: regress/expected/graph_generation.out
modified: regress/expected/index.out
modified: regress/expected/list_comprehension.out
new file: regress/expected/unified_vertex_table.out
modified: regress/sql/age_global_graph.sql
modified: regress/sql/age_load.sql
modified: regress/sql/cypher_create.sql
modified: regress/sql/cypher_set.sql
modified: regress/sql/graph_generation.sql
modified: regress/sql/index.sql
new file: regress/sql/unified_vertex_table.sql
modified: sql/age_main.sql
modified: src/backend/catalog/ag_label.c
modified: src/backend/commands/label_commands.c
modified: src/backend/executor/cypher_create.c
modified: src/backend/executor/cypher_delete.c
modified: src/backend/executor/cypher_merge.c
modified: src/backend/executor/cypher_set.c
modified: src/backend/executor/cypher_utils.c
modified: src/backend/nodes/cypher_copyfuncs.c
modified: src/backend/nodes/cypher_outfuncs.c
modified: src/backend/nodes/cypher_readfuncs.c
modified: src/backend/parser/cypher_clause.c
modified: src/backend/utils/adt/age_global_graph.c
modified: src/backend/utils/adt/age_vle.c
modified: src/backend/utils/adt/agtype.c
modified: src/backend/utils/load/ag_load_labels.c
modified: src/backend/utils/load/age_load.c
modified: src/include/catalog/ag_label.h
modified: src/include/commands/label_commands.h
modified: src/include/executor/cypher_utils.h
modified: src/include/nodes/cypher_nodes.h
modified: regress/expected/pgvector.out
modified: regress/sql/pgvector.sql1 parent a44ca12 commit fee0fa2
File tree
46 files changed
+1549
-701
lines changed- regress
- expected
- sql
- sql
- src
- backend
- catalog
- commands
- executor
- nodes
- parser
- utils
- adt
- load
- include
- catalog
- commands
- executor
- nodes
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
46 files changed
+1549
-701
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
112 | 112 | | |
113 | 113 | | |
114 | 114 | | |
115 | | - | |
| 115 | + | |
| 116 | + | |
116 | 117 | | |
117 | 118 | | |
118 | 119 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
203 | 203 | | |
204 | 204 | | |
205 | 205 | | |
| 206 | + | |
206 | 207 | | |
207 | 208 | | |
208 | | - | |
209 | 209 | | |
210 | 210 | | |
211 | 211 | | |
| |||
288 | 288 | | |
289 | 289 | | |
290 | 290 | | |
291 | | - | |
292 | 291 | | |
293 | | - | |
294 | 292 | | |
295 | | - | |
296 | 293 | | |
297 | | - | |
298 | 294 | | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
299 | 299 | | |
300 | 300 | | |
301 | 301 | | |
| |||
306 | 306 | | |
307 | 307 | | |
308 | 308 | | |
309 | | - | |
| 309 | + | |
310 | 310 | | |
311 | 311 | | |
312 | 312 | | |
| |||
325 | 325 | | |
326 | 326 | | |
327 | 327 | | |
328 | | - | |
| 328 | + | |
329 | 329 | | |
330 | 330 | | |
331 | 331 | | |
| |||
345 | 345 | | |
346 | 346 | | |
347 | 347 | | |
348 | | - | |
349 | | - | |
| 348 | + | |
| 349 | + | |
350 | 350 | | |
351 | 351 | | |
352 | 352 | | |
| |||
357 | 357 | | |
358 | 358 | | |
359 | 359 | | |
360 | | - | |
| 360 | + | |
361 | 361 | | |
362 | 362 | | |
363 | 363 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
128 | | - | |
| 128 | + | |
| 129 | + | |
129 | 130 | | |
130 | 131 | | |
131 | 132 | | |
132 | 133 | | |
133 | 134 | | |
134 | | - | |
| 135 | + | |
| 136 | + | |
135 | 137 | | |
136 | 138 | | |
137 | 139 | | |
| |||
194 | 196 | | |
195 | 197 | | |
196 | 198 | | |
197 | | - | |
| 199 | + | |
| 200 | + | |
198 | 201 | | |
199 | 202 | | |
200 | 203 | | |
201 | 204 | | |
202 | 205 | | |
203 | | - | |
| 206 | + | |
| 207 | + | |
204 | 208 | | |
205 | 209 | | |
206 | 210 | | |
207 | 211 | | |
208 | 212 | | |
209 | | - | |
| 213 | + | |
| 214 | + | |
210 | 215 | | |
211 | 216 | | |
212 | 217 | | |
| |||
221 | 226 | | |
222 | 227 | | |
223 | 228 | | |
224 | | - | |
| 229 | + | |
| 230 | + | |
225 | 231 | | |
226 | 232 | | |
227 | 233 | | |
| |||
238 | 244 | | |
239 | 245 | | |
240 | 246 | | |
241 | | - | |
| 247 | + | |
242 | 248 | | |
243 | 249 | | |
244 | 250 | | |
| |||
247 | 253 | | |
248 | 254 | | |
249 | 255 | | |
250 | | - | |
| 256 | + | |
251 | 257 | | |
252 | 258 | | |
253 | 259 | | |
254 | 260 | | |
255 | 261 | | |
256 | 262 | | |
257 | 263 | | |
258 | | - | |
| 264 | + | |
259 | 265 | | |
260 | 266 | | |
261 | 267 | | |
| |||
264 | 270 | | |
265 | 271 | | |
266 | 272 | | |
267 | | - | |
| 273 | + | |
268 | 274 | | |
269 | 275 | | |
270 | 276 | | |
| |||
275 | 281 | | |
276 | 282 | | |
277 | 283 | | |
| 284 | + | |
278 | 285 | | |
279 | 286 | | |
280 | 287 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
136 | | - | |
| 136 | + | |
| 137 | + | |
137 | 138 | | |
138 | 139 | | |
139 | 140 | | |
| |||
331 | 332 | | |
332 | 333 | | |
333 | 334 | | |
334 | | - | |
| 335 | + | |
| 336 | + | |
335 | 337 | | |
336 | 338 | | |
337 | 339 | | |
| |||
393 | 395 | | |
394 | 396 | | |
395 | 397 | | |
396 | | - | |
397 | | - | |
398 | | - | |
399 | | - | |
400 | | - | |
401 | | - | |
402 | | - | |
403 | | - | |
404 | | - | |
405 | | - | |
406 | | - | |
407 | | - | |
408 | | - | |
409 | | - | |
410 | | - | |
411 | | - | |
412 | | - | |
413 | | - | |
414 | | - | |
415 | 398 | | |
416 | 399 | | |
417 | 400 | | |
| |||
438 | 421 | | |
439 | 422 | | |
440 | 423 | | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
441 | 443 | | |
442 | 444 | | |
443 | 445 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
535 | 535 | | |
536 | 536 | | |
537 | 537 | | |
538 | | - | |
539 | | - | |
540 | 538 | | |
| 539 | + | |
541 | 540 | | |
| 541 | + | |
542 | 542 | | |
543 | 543 | | |
544 | 544 | | |
| |||
710 | 710 | | |
711 | 711 | | |
712 | 712 | | |
713 | | - | |
714 | 713 | | |
| 714 | + | |
715 | 715 | | |
716 | 716 | | |
717 | 717 | | |
| |||
0 commit comments