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

Error while parsing a JSON_TABLE statement with placeholders in it #127

Open
priyanshi-yb opened this issue Dec 20, 2024 · 0 comments
Open

Comments

@priyanshi-yb
Copy link

priyanshi-yb commented Dec 20, 2024

If there is a select statement having JSON_TABLE syntax with placeholders in place of constant data -

SELECT jt.* FROM
 my_films,
 JSON_TABLE (js, $1
   PASSING $2 AS filter, $3 AS filter2
     COLUMNS (
     id FOR ORDINALITY,
     kind text PATH '$.kind',
     title text FORMAT JSON PATH '$.films[*].title' OMIT QUOTES,
     director text PATH '$.films[*].director' KEEP QUOTES)) AS jt

this is the error comes while parsing this query using the Parse() function -

ERROR:  only string constants are supported in JSON_TABLE path specification

cc: @lfittl @msepga
Is this a bug or an expected failure?
Do you think there's any workaround to be able to parse this statement?

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

No branches or pull requests

1 participant