Skip to content

feat(storage): add the user_warehouse table schema - #7386

Open
mengw15 wants to merge 1 commit into
apache:mainfrom
mengw15:feat/6931-user-warehouse-schema
Open

feat(storage): add the user_warehouse table schema#7386
mengw15 wants to merge 1 commit into
apache:mainfrom
mengw15:feat/6931-user-warehouse-schema

Conversation

@mengw15

@mengw15 mengw15 commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

What changes were proposed in this PR?

Adds the user_warehouse table (umbrella #6870): one row per warehouse a user registers. The DDL below is the full shape — base columns only; the assume-role (BYO-S3) columns come in a later change.

CREATE TABLE IF NOT EXISTS user_warehouse
(
    whid                    SERIAL PRIMARY KEY,
    uid                     INT          NOT NULL,
    name                    VARCHAR(128) NOT NULL,
    warehouse_name          VARCHAR(255) NOT NULL UNIQUE,
    lakekeeper_warehouse_id UUID,
    flavor                  VARCHAR(32)  NOT NULL,
    s3_bucket               VARCHAR(255),
    s3_endpoint             VARCHAR(255),
    s3_region               VARCHAR(64),
    created_at              TIMESTAMPTZ  NOT NULL DEFAULT now(),
    UNIQUE (uid, name),
    FOREIGN KEY (uid) REFERENCES "user" (uid) ON DELETE CASCADE
);

Schema only — nothing reads or writes the table yet. The DDL, the incremental migration (sql/updates/32.sql), and the changelog registration ship together; jOOQ classes are generated from the live database at build time as usual.

Any related issues, documentation, discussions?

Closes #6931. Part of #6870 (design discussions #5293 and #6040).

How was this PR tested?

A new UserWarehouseSpec (MockTexeraDB, embedded Postgres) pins the DDL's structural properties against the generated jOOQ classes: insert/read-back of a registered warehouse, the per-user name uniqueness, and the ownership cascade. Verified locally with sbt "DAO/testOnly *UserWarehouseSpec" plus scalafmt/scalafix; the cascade case was deliberately broken once to confirm it fails red.

Was this PR authored or co-authored using generative AI tooling?

Generated-by: Claude Code (claude-fable-5)

@github-actions github-actions Bot added feature ddl-change Changes to the TexeraDB DDL common labels Aug 7, 2026
@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Automated Reviewer Suggestions

Based on the git blame history of the changed files, we recommend the following reviewers:

  • Contributors with relevant context: @xuang7
    You can notify them by mentioning @xuang7 in a comment.

@codecov-commenter

codecov-commenter commented Aug 7, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.63%. Comparing base (d72b8be) to head (b8bbaef).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##               main    #7386   +/-   ##
=========================================
  Coverage     84.62%   84.63%           
- Complexity     4150     4152    +2     
=========================================
  Files          1169     1169           
  Lines         46740    46740           
  Branches       5202     5202           
=========================================
+ Hits          39556    39557    +1     
- Misses         5469     5470    +1     
+ Partials       1715     1713    -2     
Flag Coverage Δ *Carryforward flag
access-control-service 70.00% <ø> (ø)
agent-service 85.50% <ø> (ø) Carriedforward from d72b8be
amber 80.85% <ø> (+<0.01%) ⬆️
computing-unit-managing-service 50.72% <ø> (ø)
config-service 65.97% <ø> (ø)
file-service 69.05% <ø> (ø)
frontend 86.30% <ø> (ø) Carriedforward from d72b8be
notebook-migration-service 78.89% <ø> (ø)
pyamber 97.55% <ø> (ø) Carriedforward from d72b8be
workflow-compiling-service 26.31% <ø> (ø)

*This pull request uses carry forward flags. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

⚠️ Benchmark changes need a look

🟢 0 better · 🔴 11 worse · ⚪ 4 noise (<±5%) · 0 without baseline

Compared against main ae17c8f benchmarked on this same runner, so the delta is largely free of cross-runner hardware noise. The "7d avg" column still reflects the gh-pages dashboard. Treat <±5% as noise unless repeated.

Dashboard · Run

config throughput MB/s latency max Δ latest / 7d
🔴 bs=10 sw=10 sl=64 351 0.214 26,949/44,358/44,358 us 🔴 +26.2% / 🔴 +174.5%
🔴 bs=100 sw=10 sl=64 766 0.467 127,281/168,788/168,788 us 🔴 +21.9% / 🔴 +52.2%
🔴 bs=1000 sw=10 sl=64 897 0.547 1,107,351/1,200,586/1,200,586 us 🔴 +5.3% / 🔴 +13.3%
Baseline details

Latest main ae17c8f from same runner

config metric PR latest main 7d avg Δ latest Δ 7d
bs=10 sw=10 sl=64 throughput 351 tuples/sec 406 tuples/sec 755.31 tuples/sec -13.5% -53.5%
bs=10 sw=10 sl=64 MB/s 0.214 MB/s 0.248 MB/s 0.461 MB/s -13.7% -53.6%
bs=10 sw=10 sl=64 p50 26,949 us 24,981 us 12,952 us +7.9% +108.1%
bs=10 sw=10 sl=64 p95 44,358 us 35,149 us 16,161 us +26.2% +174.5%
bs=10 sw=10 sl=64 p99 44,358 us 35,149 us 19,292 us +26.2% +129.9%
bs=100 sw=10 sl=64 throughput 766 tuples/sec 823 tuples/sec 957.58 tuples/sec -6.9% -20.0%
bs=100 sw=10 sl=64 MB/s 0.467 MB/s 0.503 MB/s 0.584 MB/s -7.2% -20.1%
bs=100 sw=10 sl=64 p50 127,281 us 121,811 us 104,473 us +4.5% +21.8%
bs=100 sw=10 sl=64 p95 168,788 us 138,443 us 110,867 us +21.9% +52.2%
bs=100 sw=10 sl=64 p99 168,788 us 138,443 us 120,336 us +21.9% +40.3%
bs=1000 sw=10 sl=64 throughput 897 tuples/sec 910 tuples/sec 986.93 tuples/sec -1.4% -9.1%
bs=1000 sw=10 sl=64 MB/s 0.547 MB/s 0.556 MB/s 0.602 MB/s -1.6% -9.2%
bs=1000 sw=10 sl=64 p50 1,107,351 us 1,101,394 us 1,021,008 us +0.5% +8.5%
bs=1000 sw=10 sl=64 p95 1,200,586 us 1,139,842 us 1,059,187 us +5.3% +13.3%
bs=1000 sw=10 sl=64 p99 1,200,586 us 1,139,842 us 1,093,309 us +5.3% +9.8%
Raw CSV
config_idx,batch_size,schema_width,string_len,num_batches,total_ms,total_tuples,total_bytes,tuples_per_sec,mb_per_sec,lat_p50_us,lat_p95_us,lat_p99_us
0,10,10,64,20,570.01,200,128000,351,0.214,26948.52,44357.63,44357.63
1,100,10,64,20,2612.03,2000,1280000,766,0.467,127281.39,168787.52,168787.52
2,1000,10,64,20,22301.28,20000,12800000,897,0.547,1107350.94,1200586.09,1200586.09

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

Labels

common ddl-change Changes to the TexeraDB DDL feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BYO-S3] Schema: user_warehouse

2 participants