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

Union With Wildcard And Number #61

Open
SoftCreatR opened this issue Nov 3, 2020 · 5 comments
Open

Union With Wildcard And Number #61

SoftCreatR opened this issue Nov 3, 2020 · 5 comments
Labels
enhancement New feature or request good first issue Good for newcomers hacktoberfest help wanted Extra attention is needed

Comments

@SoftCreatR
Copy link
Owner

SoftCreatR commented Nov 3, 2020

Test Data:

[
   "first",
   "second",
   "third",
   "forth",
   "fifth"
]

Selector:

$[*,1]

Resul:

Unable to parse token *,1 in expression: [*,1]

Expected result (Proposal A):

[
   "first",
   "second",
   "third",
   "forth",
   "fifth",
   "second"
]

https://cburgmer.github.io/json-path-comparison/results/union_with_wildcard_and_number.html

@SoftCreatR SoftCreatR added bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed labels Nov 3, 2020
@Amoldreamer
Copy link

Can you tell me what is meant by 'consensus'. For example in the link below:
https://cburgmer.github.io/json-path-comparison/results/union_with_wildcard_and_number.html

@SoftCreatR
Copy link
Owner Author

See it as expected result.

@Amoldreamer
Copy link

ok

@Amoldreamer
Copy link

Then what does it mean if the consensus is "not supported"?

@SoftCreatR
Copy link
Owner Author

SoftCreatR commented Nov 7, 2020

That's in fact just another consensus and simply means, that most implementations do not support this query.

An example: Let's assume a math problem:

5 + 1 = ?

There are multiple ways to calculate it, but no way is guaranteed to provide the correct result. So let's assume, there are 5 ways to calculate the result:

The first way gives 6
The 2nd way gives 6
The 3rd way gives 5
The 4th way gives 6
The 5th way gives 7

Without knowing, what the expected result is, we assume it's 6, because that's the consensus of all possible ways is 6.

I hope, this answers your question.

However, in this specific case, "Not supported" isn't really a desirable result. That's why we use the result from Proposal A. There's still no guarantee, that this is the result we should expect, but it's pretty likely, that it's result is, what most people would expect, when executing the given query.

@SoftCreatR SoftCreatR reopened this Nov 7, 2020
Repository owner deleted a comment from Amoldreamer Apr 6, 2021
Repository owner deleted a comment from Amoldreamer Apr 6, 2021
Repository owner deleted a comment from Amoldreamer Apr 6, 2021
@SoftCreatR SoftCreatR added enhancement New feature or request and removed bug Something isn't working labels Aug 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers hacktoberfest help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants