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

add support for FOR ORDINALITY in JSON_TABLE #1492

Closed
lovasoa opened this issue Oct 30, 2024 · 0 comments · Fixed by #1493
Closed

add support for FOR ORDINALITY in JSON_TABLE #1492

lovasoa opened this issue Oct 30, 2024 · 0 comments · Fixed by #1493

Comments

@lovasoa
Copy link
Contributor

lovasoa commented Oct 30, 2024

Initially reported in sqlpage/SQLPage#658

This is a follow-up on #1019

I already implemented most of json_table, but we are still missing support for FOR ORDINALITY columns.

Reference: https://dev.mysql.com/doc/refman/8.0/en/json-table-functions.html#function_json-table

Exemple:

SELECT jt.*
FROM JSON_TABLE(
  '["Alice", "Bob", "Charlie"]',
  '$[*]' COLUMNS(
    row_num FOR ORDINALITY,
    name VARCHAR(50) PATH '$'
  )
) AS jt;

try online

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

Successfully merging a pull request may close this issue.

1 participant