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

improve json_populate_record/json_populate_recordset to accept null::<table> as the first parameter #18601

Open
lmatz opened this issue Sep 19, 2024 · 1 comment
Assignees
Milestone

Comments

@lmatz
Copy link
Contributor

lmatz commented Sep 19, 2024

PG:

CREATE TABLE IF NOT EXISTS t (host text, message text, payload jsonb);


SELECT * FROM jsonb_populate_record(null::t, '{"host": "abc", "message": "bcd", "payload": {"d": 4, "e": "zzz"}}');

RW:

dev=> SELECT * FROM jsonb_populate_record(null::t, '{"host": "abc", "message": "bcd", "payload": {"d": 4, "e": "zzz"}}');
ERROR:  Failed to run the query

Caused by:
  Feature is not yet implemented: unsupported data type: t
No tracking issue yet. Feel free to submit a feature request at https://github.com/risingwavelabs/risingwave/issues/new?labels=type/feature&template=feature_request.yml

RW can use struct<> to replace t, but in the case of integration, it is required to support using table to indicate the row type:
https://github.com/vectordotdev/vector/pull/21248/files#diff-e940b31386309d22cca11fff761d2467ff4a590c8110378b7a6d2a8747859031R123

@github-actions github-actions bot added this to the release-2.1 milestone Sep 19, 2024
@fuyufjh
Copy link
Member

fuyufjh commented Sep 20, 2024

1

Even the requirement is from intergration of https://github.com/vectordotdev/vector, It looks like a general requirement to me - converting JSON records to rows of table.

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

3 participants