Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

materialize: boilerplate validator recommends explicit projections among ambiguous fields #2063

Merged
merged 1 commit into from
Oct 17, 2024

Conversation

williamhbaker
Copy link
Member

@williamhbaker williamhbaker commented Oct 17, 2024

Description:

A common case for user-defined projections are to change the capitalization of a field. For systems that do not allow identical-except-for-capitalization named fields, this is unfortunate because the user-defined explicit projection is currently getting marked as optional even if it would otherwise be recommended, since the field names only differ in capitalization.

This change has us recommend explicit projections if they would otherwise be recommended even if their field name is ambiguous with others. It is relatively simple to do so since the Flow build process will not allow projected field names that differ only in capitalization, so we know if there is an explicit projection it's the only one with those case-insensitive characters.

Workflow steps:

(How does one use this feature, and how has it changed)

Documentation links affected:

(list any documentation links that you created, or existing ones that you've identified as needing updates, along with a brief description)

Notes for reviewers:

(anything that might help someone review this PR)


This change is Reviewable

…ong ambiguous fields

A common case for user-defined projections are to change the capitalization of a
field. For systems that do not allow identical-except-for-capitalization named
fields, this is unfortunate because the user-defined explicit projection is
currently getting marked as optional even if it would otherwise be recommended,
since the field names only differ in capitalization.

This change has us recommend explicit projections if they would otherwise be
recommended even if their field name is ambiguous with others. It is relatively
simple to do so since the Flow build process will not allow projected field
names that differ only in capitalization, so we know if there is an explicit
projection it's the only one with those case-insensitive characters.
Copy link
Member

@psFried psFried left a comment

Choose a reason for hiding this comment

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

LGTM

@williamhbaker williamhbaker merged commit 0008448 into main Oct 17, 2024
52 of 53 checks passed
@williamhbaker williamhbaker deleted the wb/explicit-ambiguities branch October 17, 2024 17:29
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.

2 participants