apache / apache/polaris

Refactor StorageTypeFileIO discriminator to support S3 Tables without opt-out

Open
#4,486 1 comment 0 reactions 0 assignees View on GitHub
enhancement stale
Dominant language
Java
Stars
2.1k
Forks
522
Avg merge
1d 22h
Merged PRs (30d)
137

Description

### Is your feature request related to a problem? Please describe.

### Description

PR #4052 adds S3 Tables support with `validateAllowedStorageType=false` as a workaround because both S3 and S3 Tables resolve to `S3FileIO`, making
`StorageTypeFileIO` unable to discriminate between them based on FileIO class alone.

### Problem

The current discriminator assumes a 1:1 mapping between storage type and FileIO implementation. S3 Tables breaks this assumption since it uses the same
`S3FileIO` as standard S3 but requires different credential vending logic (different IAM actions, different ARN format).

### Describe the solution you'd like

### Proposed Fix

Refactor the discriminator to use a richer signal than FileIO class — e.g., the `signingName` from the catalog config, the ARN prefix
(`arn:aws:s3tables`), or a dedicated storage type field on the catalog entity.

### Context

Follow-up from review feedback on #4052 by @flyingImer. The current opt-out is functional but circumvents the validation contract rather than fixing
it.

### Describe alternatives you've considered

_No response_

### Additional context

_No response_

Contributor guide

Open the contributing guide

Research direction

Start by reviewing PR #4052 and the StorageTypeFileIO validation path, including the validateAllowedStorageType workaround. Trace how S3FileIO is used for standard S3 and S3 Tables, then define a discriminator signal that distinguishes them and preserves the validation contract without the opt-out.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, java
Domain
backend, cloud, security
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.