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

simdjson support #4526

Open
bluestreak01 opened this issue May 20, 2024 · 0 comments
Open

simdjson support #4526

bluestreak01 opened this issue May 20, 2024 · 0 comments
Labels
New feature Feature requests

Comments

@bluestreak01
Copy link
Member

Is your feature request related to a problem?

We need SQL function, to create JSON projections from VARCHAR column type.

Lets assume we store JSON in the following tables:

create table xyz(json varchar);

I would like to be able to create projection as follows:

select extract_json(json, json_path, cast_as_type, fail_on_error) from xyz
  • json - varchar field
  • json_path - examples of json path can be taken from https://www.postgresqltutorial.com/postgresql-json-functions/postgresql-json-path/
  • cast_as_type - our type to CAST json value as
  • fail_on_error - boolean when true function must fail when json path is invalid. When json field contains incorrect json or there is error execution jsonpath, the function can throw CairoException when fail_on_error is true. Otherwise function must return NULL in the correct datatype

https://github.com/simdjson/simdjson is a library that alrady supports JSONPath and type casts. We should attempt to integrate with those.

Describe the solution you'd like.

No response

Describe alternatives you've considered.

No response

Full Name:

Vlad Ilyushchenko

Affiliation:

QuestDB

Additional context

No response

@bluestreak01 bluestreak01 added the New feature Feature requests label May 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
New feature Feature requests
Projects
None yet
Development

No branches or pull requests

1 participant