Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add SERIAL as node table primary key #1493

Merged
merged 1 commit into from
Apr 27, 2023
Merged

Add SERIAL as node table primary key #1493

merged 1 commit into from
Apr 27, 2023

Conversation

ray6080
Copy link
Contributor

@ray6080 ray6080 commented Apr 27, 2023

This PR introduces SERIAL as a special data type for primary key properties, whose values are same as internal node offsets. This can speed up data ingestion, as no index construction/lookup is required during data ingestion.
SERIAL is limited to primary key of node tables only for now.

This PR hasn't handled updates, index scan, and expression evaluations over SERIAL. See #1496 .

@codecov
Copy link

codecov bot commented Apr 27, 2023

Codecov Report

Patch coverage: 90.90% and project coverage change: -0.03 ⚠️

Comparison is base (247cf1b) 92.20% compared to head (71625c6) 92.18%.

❗ Current head 71625c6 differs from pull request most recent head dafb55b. Consider uploading reports for the commit dafb55b to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1493      +/-   ##
==========================================
- Coverage   92.20%   92.18%   -0.03%     
==========================================
  Files         671      671              
  Lines       24069    24123      +54     
==========================================
+ Hits        22194    22238      +44     
- Misses       1875     1885      +10     
Impacted Files Coverage Δ
src/include/binder/binder.h 100.00% <ø> (ø)
src/include/common/statement_type.h 100.00% <ø> (ø)
src/include/common/types/types.h 100.00% <ø> (ø)
src/storage/storage_structure/column.cpp 89.75% <14.28%> (-3.37%) ⬇️
src/common/types/types.cpp 94.68% <66.66%> (-0.32%) ⬇️
src/storage/wal_replayer_utils.cpp 98.55% <77.77%> (-1.45%) ⬇️
src/binder/bind/bind_ddl.cpp 100.00% <100.00%> (ø)
src/binder/binder.cpp 96.26% <100.00%> (ø)
src/include/binder/ddl/bound_create_node_clause.h 100.00% <100.00%> (ø)
src/include/binder/ddl/bound_create_rel_clause.h 100.00% <100.00%> (ø)
... and 16 more

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@ray6080 ray6080 marked this pull request as ready for review April 27, 2023 14:00
src/include/common/types/types.h Show resolved Hide resolved
assert(structureIDAndFName.storageStructureID.columnFileID.columnType ==
ColumnType::REL_PROPERTY_COLUMN);
StorageStructureType::COLUMN &&
structureIDAndFName.storageStructureID.columnFileID.columnType ==
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not related to this PR but I really hate this structureIDAndFName.storageStructureID.storageStructureType naming and call chain.

I think we should just use s to stand for storageStructure. It's insane to see storageStructure everywhere as a naming prefix.

src/binder/bind/bind_ddl.cpp Show resolved Hide resolved
src/binder/bind/bind_ddl.cpp Show resolved Hide resolved
src/binder/bind/bind_ddl.cpp Outdated Show resolved Hide resolved
src/include/storage/storage_structure/storage_structure.h Outdated Show resolved Hide resolved
src/include/storage/storage_utils.h Outdated Show resolved Hide resolved
src/storage/copier/node_copy_executor.cpp Outdated Show resolved Hide resolved
src/storage/copier/table_copy_executor.cpp Outdated Show resolved Hide resolved
src/storage/store/node_table.cpp Show resolved Hide resolved
@ray6080 ray6080 merged commit d9695fd into master Apr 27, 2023
@ray6080 ray6080 deleted the copy-rework branch April 27, 2023 20:18
@semihsalihoglu-uw semihsalihoglu-uw mentioned this pull request May 4, 2023
20 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants