risingwavelabs / risingwave

Best-in-class stream processing, analytics, and management. Perform continuous analytics, or build event-driven applications, real-time ETL pipelines, and feature stores in minutes. Unified streaming and batch. PostgreSQL compatible.
https://go.risingwave.com/slack
Apache License 2.0
7.02k stars 577 forks source link

bug(frontend): pgwire binary response unimplemented for list and struct #7949

Open jon-chuang opened 1 year ago

jon-chuang commented 1 year ago

Describe the bug

pgwire binary response unimplemented for list and struct

To Reproduce

import psycopg

conn = psycopg.connect(host='localhost', port='4566', dbname='dev', user='root')
with conn.cursor() as cur:
    cur.execute("select Array[1::bigint, 2::bigint, 3::bigint]", binary=True)
    for row in cur:
        print(row)

Expected behavior

No panic in frontend.

Additional context

No response

jon-chuang commented 1 year ago

Loading binary for array here: https://github.com/psycopg/psycopg/blob/0d2ea7648336712988206ac1dac28f01be775413/psycopg/psycopg/types/array.py#L434

xxchan commented 1 year ago

https://github.com/risingwavelabs/risingwave/issues/3676#issuecomment-1254826683

@ZENOTME Do we have plan to support them?

ZENOTME commented 1 year ago

It's not easy to support multiple demision list so there is no work for that now.

https://github.com/MaterializeInc/materialize/blob/61a82dfd8432b094189c4f839f67ab738f0f3bc1/src/pgrepr/src/value.rs#L390-L421

We can try to implement a single dimension list first. BTW, rust-postgres seems also only support to single dimension list.

xxchan commented 1 year ago

We should avoid its panic first 😄

neverchanje commented 8 months ago

single dimension list.

Let's support the single-dim array first. I think it's doable. At least we can eliminate the majority of error cases.

fuyufjh commented 1 month ago

+1 for https://github.com/risingwavelabs/risingwave/issues/7949#issuecomment-1978126393 & https://github.com/risingwavelabs/risingwave/issues/7949#issuecomment-1432819897. Let's finish these first.