Skip to content

[connectors] Improve Avro key name validation#6632

Merged
mihaibudiu merged 1 commit into
feldera:mainfrom
mihaibudiu:issue6629
Jul 15, 2026
Merged

[connectors] Improve Avro key name validation#6632
mihaibudiu merged 1 commit into
feldera:mainfrom
mihaibudiu:issue6629

Conversation

@mihaibudiu

Copy link
Copy Markdown
Contributor

The connector validation rejects an Avro key field named like "view.key" because Avro identifiers cannot contain dots. However, "view.key" is not supposed to be an identifier, but a "fullname", which may contain namespaces separated by dots. So the name should be accepted. The PR introduces a "fullname" validation layer for Avro.

Fixes #6629

Checklist

  • Unit tests added/updated

Signed-off-by: Mihai Budiu <mbudiu@feldera.com>
@mihaibudiu
mihaibudiu requested a review from anandbraman July 14, 2026 21:21
@mihaibudiu
mihaibudiu enabled auto-merge July 14, 2026 21:24

@mythical-fred mythical-fred left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Clean fix for the view.key rejection: relax the identifier check on relation names to Avro-fullname semantics, then split the trailing segment as the record name and fold the prefix into the namespace (appended to any pre-configured one). The namespace composition rule matches the Avro spec: full name = <namespace>.<name>, and dot-splitting on the input yields exactly that.

Test coverage is thorough for a one-file change: validator positive/negative cases, namespace prefixing with and without a configured namespace, plain-name path preserved, invalid-name rejection, and a round-trip through apache_avro::Schema::parse_str to make sure the generated schema actually parses. Signed-off, no AI trailers, CI green.

Non-blocking nit: the error message enumerates the segment rules, but for inputs like v..key, .key, key. the real failure is "empty segment", not "must start with a letter". Message-only, not worth another round.

LGTM.

@anandbraman anandbraman left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Tested with minimal example. Pipeline initializes and runs

@mihaibudiu
mihaibudiu added this pull request to the merge queue Jul 14, 2026
Merged via the queue into feldera:main with commit 3f11627 Jul 15, 2026
3 checks passed
@mihaibudiu
mihaibudiu deleted the issue6629 branch July 15, 2026 01:45
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.

Avro Schema Error for Views with Index

3 participants