readysettech / readyset

Readyset is a MySQL and Postgres wire-compatible caching layer that sits in front of existing databases to speed up queries and horizontally scale read throughput. Under the hood, ReadySet caches the results of cached select statements and incrementally updates these results over time as the underlying data changes.
https://readyset.io
Other
4.54k stars 125 forks source link

Panic with `LITERAL != COLUMN` #1391

Closed jscheid closed 3 weeks ago

jscheid commented 1 month ago

Describe the problem

psql> CREATE CACHE FROM SELECT SUM(val) FROM m WHERE 123 != foo_id;
server closed the connection unexpectedly
    This probably means the server terminated abnormally
    before or while processing the request.

To Reproduce

See above. I don't think any special table layout is necessary to reproduce but let me know if you need more information.

Expected behavior

Should work as foo_id != 123 does, or as 123 = foo_id does.

Additional data / screenshots

See full backtrace

Environment

Additional context

Famous last words? 😺

gvsg-rs commented 1 month ago

We did not in fact check 'op.is_ordering_comparison()' in this code path. Thank you for the report!

vassili-zarouba commented 3 weeks ago

The issue has been fixed and merged into main branch.