Skip to content

Expansion Algorithm confusing Step 13.8.3.7.2.3 not covered by the expansion tests #477

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

Closed
timothee-haudebourg opened this issue Apr 19, 2020 · 4 comments · Fixed by #481

Comments

@timothee-haudebourg
Copy link

In the Expansion Algorithm I personally find the description of the Step 13.8.3.7.2.3 hard to understand:

Initialize index property values to the concatenation of re-expanded index
with any existing values of expanded index key in item.

The variable re-expanded index holds a value object. I don't understand how to "concatenate" a value object with anything. I find the use of "any" confusing, does it mean "all", or "the first one you find"? Moreover, expanded index key is most likely to be an expanded IRI and I don't see any situation where it would appear in item (unless we consider the expanded keys in item? I'm lost).

In my implementation, I temporarily simplified this step by just defining index property values as re-expanded index. My plan was to come back to it while running the expansion tests, trying to understand reading the tests.

However I now pass all the tests without changing this part...

@gkellogg
Copy link
Member

The result in re-expanded index may be a value object or a node reference, and any values from expanded index key in item means all values; the language is not incorrect (at least from an American English understanding), but "all" or "any and all" would be clearer.

And, the "concatenate" to re-expanded index should be represented in an array, so that concatentation is clear.

A future version could restate this point by saying "Initialize index property values to an array containing re-expanded index followed by any or all existing values from expanded index key in item."

In practice, if there are such values they are already in an array, or there are no values.

@iherman
Copy link
Member

iherman commented Apr 24, 2020

This issue was discussed in a meeting.

  • RESOLVED: Improve wording to clarify any/all and concatenate per api #477
View the transcript Rob Sanderson: #477
Gregg Kellogg: This is editorial. I suggested an improvement to the wording. This would not change the intention, only improve the wording.
Proposed resolution: Improve wording to clarify any/all and concatenate per api #477 (Rob Sanderson)
Ruben Taelman: +1
Gregg Kellogg: +1
Rob Sanderson: +1
Ivan Herman: +1
Pierre-Antoine Champin: +1
Benjamin Young: +1
Resolution #3: Improve wording to clarify any/all and concatenate per api #477
David I. Lehn: +1

gkellogg added a commit that referenced this issue Apr 27, 2020
@gkellogg
Copy link
Member

@timothee-haudebourg This is fixed in #481. Please let us know if that satisfies your concern.

@timothee-haudebourg
Copy link
Author

timothee-haudebourg commented Apr 28, 2020

If I understand the new phrasing well, step 13.8.3.7.2.3 (doing the concatenation) is actually covered by, for instance, expand#tpi07. The purpose of this step is to make sure that we don't end up missing the "foo" values for nodes person/2 and person/3 just because those nodes are indexed with prop, right?

If I'm correct, then I think it's good for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants