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
Allow redundant dots in JSON paths accepted by json_extract[_scalar] Presto #9585
Conversation
This pull request was exported from Phabricator. Differential Revision: D56467690 |
✅ Deploy Preview for meta-velox canceled.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mbasmanova LGTM % nit!
/// equivalent. This is not part of JSONPath syntax, but this is the behavior of | ||
/// Jayway implementation used by Presto. | ||
/// | ||
/// It is allowed to use dot-notation redundantly, e.g. non-standaed path |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/standaed/standard/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mbasmanova LGMT. Thanks!
774e0d7
to
27b0cd6
Compare
…Presto (facebookincubator#9585) Summary: json_extract_scalar and json_extract Presto function allow paths like '$.[0]. [1].[2].foo' that include "redundant" dots before opening brackets. These paths are non-standard. They are enabled via use of Jayway engine. This change allows Velox to support these paths by ignoring dots that appear before opening brackets. See prestodb/presto#22589 Part of facebookincubator#7049 Reviewed By: xiaoxmeng Differential Revision: D56467690
…alar] Presto functions (facebookincubator#9584) Summary: json_extract_scalar and json_extract Presto function allow paths like 'foo' and 'foo.bar'. These paths are non-standard. They are enabled via use of Jayway engine, which handles paths without leading '$' by prepending the path with '$.'. Path 'foo' becomes '$.foo'. However, this logic has some unexpected side effects. Path '.foo' becomes '$..foo', which uses deep scan operator '..' and matches 'foo' keys anywhere in the document, rather then just at the top level. This change allows Velox to support paths like 'foo' and 'foo.bar[2].bar', but not '.foo' or '[10]'. These paths are handled as if they contained leading '$.' characters. See prestodb/presto#22589 Part of facebookincubator#7049 Differential Revision: D56465662
…Presto (facebookincubator#9585) Summary: json_extract_scalar and json_extract Presto function allow paths like '$.[0]. [1].[2].foo' that include "redundant" dots before opening brackets. These paths are non-standard. They are enabled via use of Jayway engine. This change allows Velox to support these paths by ignoring dots that appear before opening brackets. See prestodb/presto#22589 Part of facebookincubator#7049 Reviewed By: xiaoxmeng Differential Revision: D56467690
This pull request was exported from Phabricator. Differential Revision: D56467690 |
27b0cd6
to
c05d5fd
Compare
This pull request was exported from Phabricator. Differential Revision: D56467690 |
This pull request has been merged in 2a67b6e. |
Conbench analyzed the 1 benchmark run on commit There were no benchmark performance regressions. 🎉 The full Conbench report has more details. |
Summary:
json_extract_scalar and json_extract Presto function allow paths like '$.[0].
[1].[2].foo' that include "redundant" dots before opening brackets. These paths
are non-standard. They are enabled via use of Jayway engine.
This change allows Velox to support these paths by ignoring dots that appear
before opening brackets.
See prestodb/presto#22589 Part of
#7049
Differential Revision: D56467690