Skip to content

Views M1: add typed HTS access and entity isolation - #757

Open
ruolin59 wants to merge 1 commit into
linkedin:mainfrom
ruolin59:rufan-linkedin-view-hts-foundation
Open

ruolin59 wants to merge 1 commit into
linkedin:mainfrom
ruolin59:rufan-linkedin-view-hts-foundation

Conversation

@ruolin59

Copy link
Copy Markdown
Collaborator

Summary

Adds typed VIEW and type-neutral HTS access while keeping table consumers isolated from non-TABLE entities. This is the HTS/entity-isolation foundation for Views M1; #728 remains the dependent metadata-engine follow-up and is not superseded.

Changes

  • Client-facing API Changes

  • Internal API Changes

  • Bug Fixes

  • New Features

  • Performance Improvements

  • Code Style

  • Refactoring

  • Documentation

  • Tests

  • Carry HouseTable.entityType through mapping, stamp TABLE/VIEW writes explicitly, and keep the namespace-stripping helper private so MapStruct cannot apply it to arbitrary string fields.

  • Add neutral occupancy lookup and typed view lookup/list/save/delete repository methods, preserving typed-read validation, pagination, retry boundaries, and single-attempt mutation error/timeout contracts.

  • Expose OpenHouseInternalCatalog.findEntityById and reject non-TABLE name collisions in the table repository before allocation.

  • Preserve coverage in both H2 repository implementations and their tests for filtering, legacy hydration, pagination, errors, and table/view collisions.

No public view service/API or metadata engine is included. The foundation contains exactly 18 files, with 2,470 additions and 48 deletions.

Testing Done

  • Manually Tested on local docker setup. Please include commands ran, and their output.
  • Added new tests for the changes made.
  • Updated existing tests to reflect the changes made.
  • No tests added or updated. Please explain why. If unsure, please feel free to ask for help.
  • Some other form of testing like staging or soak time in production. Please explain.
  • Local code review completed

The approved foundation tests run unchanged on the rebased branch. One combined Gradle invocation completed successfully under JDK 11.0.21: 219 tests, zero failures, zero errors, zero skipped.

Module Selected suites Tests
iceberg:openhouse:internalcatalog OpenHouseInternalCatalogTest, HouseTableMapperTest, HouseTableRepositoryImplTest, HouseTableViewRepositoryImplTest 79
services:tables RepositoryTest, RepositoryTestWithSettableComponents, TablesControllerTest, OpenHouseInternalRepositoryImplTest 116
tables-test-fixtures:tables-test-fixtures_2.12 HouseTablesH2ViewAccessorTest 12
tables-test-fixtures:tables-test-fixtures-iceberg-1.5_2.12 HouseTablesH2ViewAccessorTest 12

Full-repository spotlessCheck and checkstyleMain/checkstyleTest for all four modules passed. Checkstyle reported 99 warning-level diagnostics and zero errors. Only CopyGitHooksTask was excluded because it assumes .git is a directory; the equivalent formatting gate ran on the final branch.

Validation command
./gradlew \
  :iceberg:openhouse:internalcatalog:test \
  --tests com.linkedin.openhouse.internal.catalog.OpenHouseInternalCatalogTest \
  --tests com.linkedin.openhouse.internal.catalog.mapper.HouseTableMapperTest \
  --tests com.linkedin.openhouse.internal.catalog.repository.HouseTableRepositoryImplTest \
  --tests com.linkedin.openhouse.internal.catalog.repository.HouseTableViewRepositoryImplTest \
  :services:tables:test \
  --tests com.linkedin.openhouse.tables.e2e.h2.RepositoryTest \
  --tests com.linkedin.openhouse.tables.e2e.h2.RepositoryTestWithSettableComponents \
  --tests com.linkedin.openhouse.tables.e2e.h2.TablesControllerTest \
  --tests com.linkedin.openhouse.tables.repository.impl.OpenHouseInternalRepositoryImplTest \
  :tables-test-fixtures:tables-test-fixtures_2.12:test \
  --tests com.linkedin.openhouse.tablestest.HouseTablesH2ViewAccessorTest \
  :tables-test-fixtures:tables-test-fixtures-iceberg-1.5_2.12:test \
  --tests com.linkedin.openhouse.tablestest.HouseTablesH2ViewAccessorTest \
  spotlessCheck \
  :iceberg:openhouse:internalcatalog:checkstyleMain \
  :iceberg:openhouse:internalcatalog:checkstyleTest \
  :services:tables:checkstyleMain \
  :services:tables:checkstyleTest \
  :tables-test-fixtures:tables-test-fixtures_2.12:checkstyleMain \
  :tables-test-fixtures:tables-test-fixtures_2.12:checkstyleTest \
  :tables-test-fixtures:tables-test-fixtures-iceberg-1.5_2.12:checkstyleMain \
  :tables-test-fixtures:tables-test-fixtures-iceberg-1.5_2.12:checkstyleTest \
  -x CopyGitHooksTask --console=plain --no-parallel --max-workers=2

Additional Information

  • Breaking Changes
  • Deprecations
  • Large PR broken into smaller PRs, and PR plan linked in the description.

Split plan: this PR supplies typed HTS access and entity isolation; #728 remains the dependent view commit engine and metadata behavior follow-up. Engine classes, the engine-specific MockApplication storage mock, and IcebergViewBeanBoundaryTest are excluded.

Based on upstream main at efa659bdb0031f951e1af03ddcfde35acc2dff80, preserving the PostCommitOperationRunner wiring from #729. The foundation patch is unchanged by the conflict-free rebase: the original and final diffs have the same stable patch ID, and no engine types are imported by this slice.

🤖 Generated with GitHub Copilot CLI

Add typed view and neutral HTS repository access, entity-aware mapping, and table-name collision isolation with the approved foundation coverage from linkedin#728.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@ruolin59 ruolin59 mentioned this pull request Sep 18, 2026
6 of 18 tasks

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant