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

Use OPENJSON array element identity when it becomes available #33623

Open
roji opened this issue Apr 27, 2024 · 0 comments
Open

Use OPENJSON array element identity when it becomes available #33623

roji opened this issue Apr 27, 2024 · 0 comments

Comments

@roji
Copy link
Member

roji commented Apr 27, 2024

OPENJSON currently doesn't allow projecting out the index of elements in the JSON array ("array element identity"), when the WITH clause is used. This feature does exist in Synapse (docs), but not in any other version.

As a result, we currently identify OPENJSON usages where ordering matters, and rewrite them to OPENJSON without WITH, which is less efficient, doesn't support all types (e.g. varbinary can't be used because casting from base64 string data isn't supported), and adds complexity. On the SQL Server side, bringing over array element identity is planned - switch to that when that's done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant