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 when querying column of type array(row) #259

Open
tlegrave opened this issue Jul 2, 2024 · 2 comments
Open

Error when querying column of type array(row) #259

tlegrave opened this issue Jul 2, 2024 · 2 comments

Comments

@tlegrave
Copy link

tlegrave commented Jul 2, 2024

Hello there,

Plugin version: 1.0.7

I'm running into the following error when trying to query a table containing a column with the following type:

array(row(score double, word_start double, word_end double, word varchar)

Capture d’écran 2024-07-02 à 14 48 40

However, it works fine when querying a specific index.

Capture d’écran 2024-07-02 à 14 49 30

That doesn't seem to be a problem with trino, because querying directly with it seems to work well:

trino> SELECT transcription_words FROM iceberg.default.diarization_stock;
                                                                                                                                                                                   >
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->
 [{score=0.951171875, word_start=8.640000343322754, word_end=8.979999542236328, word= Bonsoir}, {score=0.9814453125, word_start=8.979999542236328, word_end=9.0, word= <C3><A0>}, {>
 [{score=0.85595703125, word_start=37.43000030517578, word_end=37.709999084472656, word= Une}, {score=0.99853515625, word_start=37.709999084472656, word_end=37.9900016784668, word>
@nineinchnick
Copy link
Member

That's kind of expected, as we don't know how to format the array. Until we figure this out, as a workaround, can you convert the array to a varchar in the query, like using array_join()?

@tlegrave
Copy link
Author

tlegrave commented Jul 3, 2024

Thank's for your quick reply!

I couldn't make it work with using array_join() specifically, but I could manage to get some results with a simple cast into JSON.

Here is a screenshot of how DBeaver outputs it. Might help to figure out how to format the array.

image (2)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants