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

wrong JSON key classification #161

Merged
merged 11 commits into from
Aug 4, 2024
Merged

Conversation

galsalomon66
Copy link

@galsalomon66 galsalomon66 commented Jun 24, 2024

-- some JSON processing identifies key-value as key-object or key-array,
this wrong identification may cause wrong results

-- wrong initialization of the JSON parser engine had caused missing a projection-key-path upon using different combinations of the from-clause path.

-- a fix for copy-constructor, upon a JSON value is an empty string, it causes a wrong result.

-- modification for JSON star operation, the new-type container saves only unique keys, to avoid high memory consumption.

-- the from-clause can handle a wild-card. i.e. upon wild-card(*) it skips the corresponding part in projection-key-path.

-- key-path may include meta-char(like a dot) select _1."i.e."[0] the "i.e." is part of the key-path.
a key-path

TODO :

{
  "array": [
    {
      "classname2": [
        {
          "a": "a_value"
        }
      ],
      "classname3": [
        {
          "a": "a_value_classname3"
        }
      ]
    }
  ]
}

the following statement returns the wrong result
select _1.array.classname2.a from s3object[*];

TODO: from-clause may point on array, _1 may scan array-values

https://bugzilla.redhat.com/show_bug.cgi?id=2242089
[s3select][json]: some of the "from" clause filters with "limit 1" are taking time as if to query the entire object and results are also incorrect

…ay, this wrong identification may cause wrong results

Signed-off-by: Gal Salomon <[email protected]>
…ctually, a miss-match)

different combinations of from-clause and projection-key-path had caused a miss-match

Signed-off-by: Gal Salomon <[email protected]>
…match all operator); it is part of the specs, and also add great flexability

Signed-off-by: Gal Salomon <[email protected]>
… all keys related to the statement

this might cause a high memory consumption.
the new-type container upload only the unique keys, it has an impact on the order of results.

Signed-off-by: Gal Salomon <[email protected]>
TODO : JSON-from-clause to handle meta-char in path structure.

Signed-off-by: Gal Salomon <[email protected]>
add test accessing object-key with meta-char.

Signed-off-by: Gal Salomon <[email protected]>
a defintion for parsing the from-clause-json-path per JSON statements.

Signed-off-by: Gal Salomon <[email protected]>
Signed-off-by: Gal Salomon <[email protected]>
@galsalomon66 galsalomon66 merged commit a616839 into master Aug 4, 2024
2 checks passed
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.

1 participant