Skip to content

feat(table): expose whether a DataSplit requires query authorization - #1538

Open
dragonknightk wants to merge 2 commits into
apache:mainfrom
dragonknightk:expose-query-auth-required-1463
Open

dragonknightk wants to merge 2 commits into
apache:mainfrom
dragonknightk:expose-query-auth-required-1463

Conversation

@dragonknightk

Copy link
Copy Markdown
Contributor

Purpose

Linked issue: close #1463

A custom reader that consumes a transported DataSplit needs to know whether the split requires catalog authorization before opening its files. has_query_auth_rules() only reports row filters or column masks, so an unrestricted response still looks like it needs no authorization.

Brief change log

Expose the existing DataSplit::query_auth_required accessor. The flag is already stored and survives serialization.

Tests

The new test transports splits through serde. After transport, query_auth_required() is true in all five cases. has_query_auth_rules() is false for an unrestricted response, an empty filter and mask, and a missing response, and true for a row filter and a column mask. An ordinary split has both false.

API and Format

This adds a public accessor for an existing field. The storage and serialization format is unchanged.

Documentation

The accessor is documented on DataSplit. No other documentation is added.

AI Disclosure

Human-led contribution. Grok Bot, working for dragonknightk, assisted with this change, including the code, tests, and description. All submitted content was reviewed by a human before submission.

### Purpose

Closes issue 1463

A custom reader that consumes a transported DataSplit needs to know whether the split requires catalog authorization before opening its files. has_query_auth_rules() only reports row filters or column masks, so an unrestricted response still looks like it needs no authorization.

### Brief change log

Expose the existing DataSplit::query_auth_required accessor. The flag is already stored and survives serialization.

### Tests

The new test transports splits through serde. After transport, query_auth_required() is true in all five cases. has_query_auth_rules() is false for an unrestricted response, an empty filter and mask, and a missing response, and true for a row filter and a column mask. An ordinary split has both false.

### API and Format

This adds a public accessor for an existing field. The storage and serialization format is unchanged.

### Documentation

The accessor is documented on DataSplit. No other documentation is added.

Signed-off-by: dragonknightk <37928252+dragonknightk@users.noreply.github.com>
…equired-1463

Signed-off-by: dragonknightk <37928252+dragonknightk@users.noreply.github.com>
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.

Expose whether a DataSplit requires query authorization

1 participant