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

Improve new json functions #5235

Merged

Conversation

vitlibar
Copy link
Member

@vitlibar vitlibar commented May 10, 2019

I hereby agree to the terms of the CLA available at: https://yandex.ru/legal/cla/?lang=en

Improved JSON support: added functions JSONExtractRaw, JSONExtractKeyAndValues, other JSON functions have been slightly changed and optimized.

Category:

  • Improvement

List of changes:

  1. added functions JSONExtractRaw, JSONExtractKeyAndValues.
  2. renamed functions jsonExtract<type> to JSONExtract<type>. When something goes wrong these functions return the correspondent values, not NULL.
  3. modified function JSONExtract, now it gets the return type from its last parameter and doesn't inject nullables.
  4. implemented fallback to RapidJSON in case AVX2 instructions are not available.
  5. simdjson library updated to a new version.

@vitlibar vitlibar force-pushed the improve-new-json-functions branch 4 times, most recently from 7bd388b to b7c2dad Compare May 15, 2019 23:58
@vitlibar vitlibar force-pushed the improve-new-json-functions branch from b7c2dad to f494200 Compare May 16, 2019 11:10
@vitlibar vitlibar force-pushed the improve-new-json-functions branch from 5e9c8de to 85a592e Compare May 16, 2019 13:45
@vitlibar vitlibar force-pushed the improve-new-json-functions branch from 85a592e to ae4f472 Compare May 16, 2019 13:48
@vitlibar vitlibar changed the title [WIP] Improve new json functions Improve new json functions May 16, 2019
@vitlibar vitlibar marked this pull request as ready for review May 16, 2019 17:32
@vitlibar vitlibar force-pushed the improve-new-json-functions branch from 0422175 to 095fc7b Compare May 17, 2019 14:24
static constexpr bool need_preallocate = false;
void preallocate(size_t) {}

bool parse(const StringRef &) { throw Exception{"Functions JSON* are not supported without AVX2", ErrorCodes::NOT_IMPLEMENTED}; }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO check the error message.

@alexey-milovidov alexey-milovidov merged commit 24b16da into ClickHouse:master May 18, 2019
@vitlibar vitlibar added the pr-improvement Pull request with some product improvements label May 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr-improvement Pull request with some product improvements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants