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

Rdf predicate iri processing #2071

Merged
merged 1 commit into from
Sep 25, 2023
Merged

Conversation

andyfengHKU
Copy link
Contributor

@andyfengHKU andyfengHKU commented Sep 23, 2023

This PR address the following issues

  • Allow querying node and rel pattern through RDF label instead of RDF resource or triples label. E.g. MATCH (a:Taxonomy) ...
  • Allow querying predicate IRI property as if it is a regular rel property. Note that we only materialize predicate internal ID in rel table rather than predicate IRI. Instead, predicate IRI is stored as a node property in resource table. This PR allows querying predicate IRI e.g. MATCH (s:Taxonomy)-[p:Taxonomy]->(o:Taxonomy) RETURN p.iri and compiles the property reading as a sequential scan over resource table followed by a hash join over predicate internal ID. The plan can be abstracted as the following
             HJ(o._id)
            /         \
        HJ(p._id)     S(o.*)
        /         \   
E(p._id, o._id)     S(p.*)
     |
   S(s.*)

We temporarily introduce LogicalFillTableID operator because the table ID of internal ID column is not materialized currently so we don't have a way to map the predicate ID from rel table to the internal ID from node table because their table IDs are different.

src/include/binder/binder.h Outdated Show resolved Hide resolved
src/catalog/catalog_content.cpp Outdated Show resolved Hide resolved
src/include/processor/operator/scan_node_id.h Outdated Show resolved Hide resolved
@andyfengHKU andyfengHKU marked this pull request as ready for review September 25, 2023 05:45
@codecov
Copy link

codecov bot commented Sep 25, 2023

Codecov Report

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

Comparison is base (c22396f) 90.25% compared to head (2c0c063) 90.27%.
Report is 2 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2071      +/-   ##
==========================================
+ Coverage   90.25%   90.27%   +0.01%     
==========================================
  Files         963      967       +4     
  Lines       34654    34712      +58     
==========================================
+ Hits        31278    31335      +57     
- Misses       3376     3377       +1     
Files Coverage Δ
src/binder/bind/bind_ddl.cpp 99.39% <100.00%> (+<0.01%) ⬆️
src/binder/bind/bind_updating_clause.cpp 96.21% <100.00%> (+0.02%) ⬆️
...inder/bind_expression/bind_function_expression.cpp 96.45% <100.00%> (+0.05%) ⬆️
...inder/bind_expression/bind_property_expression.cpp 90.19% <ø> (+3.05%) ⬆️
src/catalog/catalog_content.cpp 97.29% <100.00%> (+1.27%) ⬆️
src/include/binder/binder.h 100.00% <ø> (ø)
...rc/include/binder/expression/property_expression.h 100.00% <100.00%> (ø)
src/include/binder/expression/rel_expression.h 100.00% <100.00%> (ø)
src/include/binder/expression_binder.h 100.00% <ø> (ø)
...include/planner/join_order/cardinality_estimator.h 100.00% <ø> (ø)
... and 21 more

... and 3 files with indirect coverage changes

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

@andyfengHKU andyfengHKU merged commit a6d6aeb into master Sep 25, 2023
11 checks passed
@andyfengHKU andyfengHKU deleted the rdf-predicate-iri-processing branch September 25, 2023 20:10
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