lovasoa opened a new issue, #1492:
URL: https://github.com/apache/datafusion-sqlparser-rs/issues/1492

   Initially reported in https://github.com/sqlpage/SQLPage/issues/658
   
   This is a follow-up on 
https://github.com/apache/datafusion-sqlparser-rs/issues/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:
   
   ```sql
   SELECT jt.*
   FROM JSON_TABLE(
     '["Alice", "Bob", "Charlie"]',
     '$[*]' COLUMNS(
       row_num FOR ORDINALITY,
       name VARCHAR(50) PATH '$'
     )
   ) AS jt;
   ```
   
   [try 
online](https://sqliteonline.com/#sqltext=%23url-sqlite%3Ddb-mariadb%0D%0A%23tab-name%3DMariaDB%0D%0ASELECT%20jt.*%0AFROM%20JSON_TABLE(%0A%20%20'%5B%22Alice%22%2C%20%22Bob%22%2C%20%22Charlie%22%5D'%2C%0A%20%20'%24%5B*%5D'%20COLUMNS(%0A%20%20%20%20row_num%20FOR%20ORDINALITY%2C%0A%20%20%20%20name%20VARCHAR(50)%20PATH%20'%24'%0A%20%20)%0A)%20AS%20jt%3B)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to