-
Notifications
You must be signed in to change notification settings - Fork 14
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
Revisit regular expression functions #134
Comments
Here is an example of a UDF in MySQL that polyfills create function json_extract_scalar(json_doc JSON, json_path TEXT)
returns VARCHAR(512)
deterministic
return json_unquote(json_extract(json_doc, json_path)); Then: select json_extract_scalar(CAST('{"hello":"yes"}' AS JSON), '$'); --returns '{"hello": "yes"}'
select json_extract_scalar(CAST('{"hello":"yes"}' AS JSON), '$.hello'); --returns 'yes' |
If it is related to the optimisation of SQL queriesfor Regualr expression. We can try and improve the indexing scheme of the tables like using multigram indexes which optimise the search operation |
Thanks Neha. We have also had success using n-gram indexes to speed up pattern matching in a few of our implementations. I think the original reason for eliminating regular expression functions from the SQL grammar in the spec was to reduce the barrier to new implementations on various database platforms (MySQL, MS SQL Server, Oracle, various cloud databases, and so on). I'm curious: would a standardized requirement for JSON functions in Data Connect help with your use case? |
As noted by @jfuerth , these functions are very useful for "just in time" harmonization.
We may want to look at:
The text was updated successfully, but these errors were encountered: