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

Add support for GENERATED Columns #1296

Closed altmannmarcelo closed 3 months ago

altmannmarcelo commented 4 months ago

Description

Add support for https://dev.mysql.com/doc/refman/8.4/en/create-table-generated-columns.html

Example functions:

  field_c int GENERATED ALWAYS AS (((nullif(field_a,_utf8mb4'') is null) and (nullif(field_b,_utf8mb4'') is null))) STORED,
  field_a tinyint(1) GENERATED ALWAYS AS (if((((field_b = _utf8mb4'') or (field_c is null)) and (field_d is null) and (field_f is null) and (field_g <> _utf8mb4'') and (field_h is not null)),_utf8mb4'1',_utf8mb4'0')) STORED,

Change in user-visible behavior

Requires documentation change