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

Simple grouping with untyped properties or open types #2034

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

HeikoTheissen
Copy link
Contributor

In the simple grouping algorithm, the last sub-bullet point of the projection function says:

Otherwise, if $p'$ is a prefix of a path in $G$, let $v[q]=s_G (u[q],p')$

and the recursively called function $s_G$ assumes that its first argument is a structured instance. But if $q$ is an untyped property or a property of an open type, $u[q]$ can also be primitive1, and then the first bullet point does not make sense:

Let $v$ be an instance of the type of $u$ without properties and without entity-id.

I suggest to rephrase the last sub-bullet point so that the recursive call is omitted in such cases. This is the least invasive change and its leads to $q$ being omitted from the projection.

1 Of course $u[q]$ can also be primitive if $q$ declares a primitive type, but the problem occurs only if $p'$ is a prefix of a path in $G$, which means for a grouping criterion of the form $q/r$ or $s/q/r$. And if $q$ declares a primitive type, $q/r$ does not make sense at all.

@HeikoTheissen HeikoTheissen added the Data Aggregation Extension for Data Aggregation label Nov 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Data Aggregation Extension for Data Aggregation
Projects
Status: Review
Development

Successfully merging this pull request may close these issues.

2 participants