fix(glue-alpha): omit comments from struct type strings#38008
Conversation
There was a problem hiding this comment.
The pull request linter fails with the following errors:
❌ Fixes must contain a change to an integration test file and the resulting snapshot.
If you believe this pull request should receive an exemption, please comment and provide a justification. A comment requesting an exemption should contain the text Exemption Request. Additionally, if clarification is needed, add Clarification Request to a comment.
✅ A exemption request has been requested. Please wait for a maintainer's review.
|
Exemption Request: This fix changes only I ran |
Issue # (if applicable)
Closes #26935.
Reason for this change
Schema.struct()renderedCOMMENT '...'inside the generated nested struct type string when a struct field had acomment. Glue/Athena do not supportCOMMENTinside nested type definitions, so the resultinginputStringcould not be used for nested schemas.Description of changes
This removes comment rendering from the
Schema.struct()type string. Column comments remain available onColumnobjects for top-level table columns, where they are represented separately by Glue'sCommentproperty rather than embedded in a nested type string.The existing schema unit test now covers the reported case by asserting that comments on struct fields are not emitted into nested
inputStringvalues.Describe any new or updated permissions being added
None.
Description of how you validated changes
Before the implementation change,
yarn testinpackages/@aws-cdk/aws-glue-alphafailed intest/schema.test.tsbecause the structinputStringstill included nestedCOMMENTclauses.Commands run:
yarn install --frozen-lockfilenpx lerna run build --scope @aws-cdk/aws-glue-alpha --include-dependencies --skip-nx-cacheyarn buildfrompackages/@aws-cdk/aws-glue-alphayarn testfrompackages/@aws-cdk/aws-glue-alphagit diff --checkNote: I used Codex while preparing this change and reviewed the final diff and local verification.
Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license