ArroyoSystems / arroyo

Distributed stream processing engine in Rust
https://arroyo.dev
Apache License 2.0
3.45k stars 189 forks source link

Comparisons involving lists cause runtime failure #575

Open mwylde opened 3 months ago

mwylde commented 3 months ago

This query causes a failure at runtime

CREATE TABLE mastodon (
    value TEXT
) WITH (
    connector = 'sse',
    format = 'raw_string',
    endpoint = 'http://mastodon.arroyo.dev/api/v1/streaming/public',
    events = 'update'
);

SELECT tags FROM (
    SELECT extract_json(value, '$.tags[*].name') AS tags
    FROM mastodon)
WHERE tags != '[]'
2024-03-31T18:00:41.790792Z ERROR arroyo_server_common: panicked at crates/arroyo-worker/src/arrow/mod.rs:90:31:
should be able to compute batch: ArrowError(InvalidArgumentError("Invalid comparison operation: List(Field { name: \"item\", data_type: Utf8, nullable: true, dict_id: 0, dict_is_ordered: false, metadata: {} }) != List(Field { name: \"item\", data_type: Utf8, nullable: true, dict_id: 0, dict_is_ordered: false, metadata: {} })"), None) panic.file="crates/arroyo-worker/src/arrow/mod.rs" panic.line=90 panic.column=31

We also get a failure comparing it with [], so this seems to be a general problem with comparing lists.