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

Paths keyword added to sparql algebra #1

Closed
wants to merge 11 commits into from
Closed

Paths keyword added to sparql algebra #1

wants to merge 11 commits into from

Conversation

psvkaushik
Copy link

No description provided.

@psvkaushik
Copy link
Author

psvkaushik commented Jul 2, 2024

Local verification is always failing, even on fresh clones. @keiji-numata and I tried it, but locally tests are failing, we also opened a new issue regarding the same on the original repo.

@balhoff
Copy link

balhoff commented Jul 2, 2024

@psvkaushik I did a clean checkout of the original repo and didn't have any errors running tests. I'm using node v21.7.1 and ran these commands:

  • npm install
  • npm run build
  • npm run test

@balhoff
Copy link

balhoff commented Jul 2, 2024

I enabled the CI action here, so I will close and reopen the PR to trigger it.

@balhoff balhoff closed this Jul 2, 2024
@balhoff balhoff reopened this Jul 2, 2024
lib/algebra.ts Outdated
Comment on lines 92 to 94
start?: rdfjs.Variable | IriTerm;
via?: rdfjs.Variable | IriTerm;
end?: rdfjs.Variable | IriTerm;
Copy link

Choose a reason for hiding this comment

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

start, end, and via should not be optional, according to the grammar.
Keep start and end as required type rdfjs.Variable, and add two more properties like:

startPattern?: IriTerm | Bgp
endPattern?: IriTerm | Bgp

I'm not sure if Bgp is the best match for <GRAPH PATTERN> from the grammar. Maybe check to see what the parser returns for WHERE clause in SELECT.

via should have type rdfjs.Variable | PropertyPathSymbol | Bgp (same uncertainty about Bgp).

Copy link

Choose a reason for hiding this comment

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

Or maybe the graph pattern is just Operation.

lib/algebra.ts Outdated
@@ -1,5 +1,5 @@
import * as rdfjs from '@rdfjs/types';
import { Wildcard } from 'sparqljs';
import { IriTerm, Wildcard } from 'sparqljs-nrt';
Copy link

Choose a reason for hiding this comment

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

I think we need to figure out the workflow for depending on a fork rather than changing the import name everywhere. This will be inconvenient later.

package.json Outdated
@@ -23,7 +23,8 @@
"rdf-isomorphic": "^1.3.0",
"rdf-string": "^1.6.0",
"rdf-terms": "^1.10.0",
"sparqljs": "^3.7.1"
"sparqlalgebrajs": "^4.3.7",
Copy link

Choose a reason for hiding this comment

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

Don't make it depend on itself.

Copy link
Author

Choose a reason for hiding this comment

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

Changes to the variables made as you've suggested. Also removed the self-dependency

@psvkaushik psvkaushik requested a review from balhoff July 15, 2024 19:10
lib/algebra.ts Outdated
Comment on lines 90 to 92
start: IriTerm ;
via: IriTerm;
end: IriTerm ;
Copy link

Choose a reason for hiding this comment

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

Check my previous review, and also look through the PATHS docs again; start and end must be variables. Another property is required to hold the optional IRIs.

@balhoff
Copy link

balhoff commented Aug 22, 2024

Closing this PR in favor of keeping a separate feature branch going.

@balhoff balhoff closed this Aug 22, 2024
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.

3 participants