Skip to content

fix(rest): Encode table names in UTF-8 in REST paths - #2074

Open
alessandro-nori wants to merge 1 commit into
apache:mainfrom
alessandro-nori:anori/fix-plus-table-identifiers
Open

alessandro-nori wants to merge 1 commit into
apache:mainfrom
alessandro-nori:anori/fix-plus-table-identifiers

Conversation

@alessandro-nori

@alessandro-nori alessandro-nori commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Changes

  • add form-style UTF-8 encoding for table names used in REST path segments
  • keep table names in JSON request payloads unencoded
  • add coverage for spaces, reserved characters, plus signs, and non-ASCII characters

Motivation

REST table path parameters must distinguish literal plus signs from spaces. Encoding table names before inserting them into request paths preserves the original identifier while leaving other path component behavior unchanged.

Testing

  • go test ./catalog/rest
  • go test ./catalog/...

@alessandro-nori
alessandro-nori force-pushed the anori/fix-plus-table-identifiers branch from 44b2783 to 3842e21 Compare September 29, 2026 08:47
@alessandro-nori alessandro-nori changed the title Fix plus signs in REST paths Align REST path encoding with Java Sep 29, 2026
@alessandro-nori
alessandro-nori force-pushed the anori/fix-plus-table-identifiers branch 2 times, most recently from fa65eab to 5a45135 Compare September 29, 2026 08:53
@alessandro-nori alessandro-nori changed the title Align REST path encoding with Java Encode table names in REST paths Sep 29, 2026
@alessandro-nori
alessandro-nori force-pushed the anori/fix-plus-table-identifiers branch from 5a45135 to cd112dc Compare September 29, 2026 09:00
@alessandro-nori alessandro-nori changed the title Encode table names in REST paths Encode table names in UTF-8 in REST paths Sep 29, 2026
@alessandro-nori
alessandro-nori force-pushed the anori/fix-plus-table-identifiers branch from cd112dc to c84a31a Compare September 29, 2026 09:06
}

func TestEncodeString(t *testing.T) {
assert.Equal(t, "+%25%26%2B%C2%A3%E2%82%AC", encodeString(" %&+£€"))

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alessandro-nori alessandro-nori changed the title Encode table names in UTF-8 in REST paths fix(rest) Encode table names in UTF-8 in REST paths Sep 29, 2026
@alessandro-nori alessandro-nori changed the title fix(rest) Encode table names in UTF-8 in REST paths fix(rest): Encode table names in UTF-8 in REST paths Sep 29, 2026
@alessandro-nori
alessandro-nori marked this pull request as ready for review September 29, 2026 09:14

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