Xiao-zhen-Liu opened a new pull request, #5967:
URL: https://github.com/apache/texera/pull/5967

   ### What changes were proposed in this PR?
   
   Adds the `operator_port_cache` table that records a materialized output port
   result so it can be reused across executions. It is keyed by
   `(workflow_id, global_port_id, cache_key)` and stores the JSON the cache key 
was
   computed from, the result location, an optional tuple count and source 
execution
   id, and a database-managed `updated_at`. The foreign key to `workflow(wid)` 
is
   `ON DELETE CASCADE`. The stored JSON (`cache_key_json`) lets a lookup 
confirm a
   hash match by comparing the full JSON, so a hash collision never reuses the 
wrong
   result.
   
   The change is additive: a new table in `sql/texera_ddl.sql` (fresh installs) 
plus
   a Liquibase migration `sql/updates/26.sql` registered in `sql/changelog.xml`
   (existing deployments). No code reads or writes the table yet; the cache 
read/write
   logic and its tests land with the cache service that uses it, following the
   convention of testing a table through its consumer (as `feedback` is tested 
via
   `FeedbackResourceSpec`).
   
   ### Any related issues, documentation, discussions?
   
   Part of #5882 (umbrella #5881). Design discussion: #5880.
   
   ### How was this PR tested?
   
   Verified the schema directly against Postgres: the migration applies 
cleanly, the
   columns and primary key `(workflow_id, global_port_id, cache_key)` are 
correct,
   the foreign key's delete rule is `CASCADE`, the schema file and the migration
   define identical columns/keys, and `changelog.xml` is well-formed and 
registers
   `26.sql`. The generated jOOQ classes build from the table. The table's 
runtime
   behavior is exercised by the cache service tests in the follow-up PR.
   
   ### Was this PR authored or co-authored using generative AI tooling?
   
   Generated-by: Claude Opus 4.8 (Claude Code)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to