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 rdf literal and literal triples table #2247

Merged
merged 1 commit into from
Oct 26, 2023
Merged

Add rdf literal and literal triples table #2247

merged 1 commit into from
Oct 26, 2023

Conversation

andyfengHKU
Copy link
Contributor

@andyfengHKU andyfengHKU commented Oct 23, 2023

This PR re-model RDF graph as 4 tables:

Resource node table
----------------------
_id, IRI (primary key)
----------------------

Literal node table
----------------------
_id, ID (SERIAL), IRI
----------------------

Resource triple rel table
------------------------
s_id, p_id, o_id (resource)
------------------------

Literal triple rel table
-----------------------
s_id, p_id, o_id (literal)
-----------------------

Model rational

The rational behind separate node table design is because we want to apply typed literal design rather than handling every literal as a STRING. As for separate rel table design, we need to utilize the fact that subject can only be resource. So subject-object join can only happen on resource triple table.

Copy

Copy is divided into 4 steps for simplicity. We will revisit this at the end of RDF development. Copy with one step is certainly doable.

@codecov
Copy link

codecov bot commented Oct 23, 2023

Codecov Report

Attention: 7 lines in your changes are missing coverage. Please review.

Comparison is base (fdbcfea) 89.62% compared to head (6aa24bf) 89.48%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2247      +/-   ##
==========================================
- Coverage   89.62%   89.48%   -0.14%     
==========================================
  Files        1018     1021       +3     
  Lines       35838    36003     +165     
==========================================
+ Hits        32119    32219     +100     
- Misses       3719     3784      +65     
Files Coverage Δ
src/binder/bind/bind_copy.cpp 94.73% <100.00%> (-0.11%) ⬇️
src/binder/bind/bind_ddl.cpp 98.63% <100.00%> (+0.14%) ⬆️
src/binder/bind/bind_graph_pattern.cpp 96.22% <100.00%> (+0.02%) ⬆️
src/catalog/catalog_content.cpp 100.00% <100.00%> (ø)
src/catalog/rdf_graph_schema.cpp 100.00% <100.00%> (ø)
src/common/data_chunk/data_chunk_state.cpp 100.00% <100.00%> (ø)
src/include/binder/binder.h 100.00% <100.00%> (ø)
src/include/binder/copy/bound_copy_from.h 100.00% <100.00%> (ø)
src/include/binder/ddl/bound_create_table_info.h 100.00% <100.00%> (ø)
src/include/common/copier_config/copier_config.h 100.00% <100.00%> (ø)
... and 26 more

... and 11 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

src/binder/bind/bind_copy.cpp Outdated Show resolved Hide resolved
src/binder/bind/bind_copy.cpp Show resolved Hide resolved
src/binder/bind/bind_graph_pattern.cpp Show resolved Hide resolved
src/binder/bind/bind_graph_pattern.cpp Show resolved Hide resolved
src/common/data_chunk/data_chunk_state.cpp Show resolved Hide resolved
src/include/processor/operator/persistent/copy_rdf.h Outdated Show resolved Hide resolved
src/include/processor/operator/persistent/copy_node.h Outdated Show resolved Hide resolved
@andyfengHKU andyfengHKU merged commit f91a957 into master Oct 26, 2023
12 checks passed
@andyfengHKU andyfengHKU deleted the rdf-literal branch October 26, 2023 06:50
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.

2 participants