-
Notifications
You must be signed in to change notification settings - Fork 109
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
Error with json_table in mariadb. #658
Comments
Thank you for reporting this, @xylle ! I proposed a fix for this in the sql parser we are using: apache/datafusion-sqlparser-rs#1493 In the meantime, you can use a window function instead to count row numbers: SELECT
jt.*,
row_number() OVER () AS row_num
FROM JSON_TABLE(
'["Alice", "Bob", "Charlie"]',
'$[*]' COLUMNS(
name VARCHAR(50) PATH '$')
) AS jt |
I was trying to understand how JSON works. SQL and JSON are obscure to me. |
The fix was merged in the sql library. It's coming soon to sqlpage |
I just updated the SQL parser. This is fixed :) |
Introduction
Error with json_table in mariadb.
To Reproduce
Query work correctly with phpmyadmin. The SQL code comes from the page : https://sql.datapage.app/blog.sql?post=JSON%20in%20SQL%3A%20A%20Comprehensive%20Guide
Actual behavior
Not working.
Screenshots
Expected behavior
Version information
The text was updated successfully, but these errors were encountered: