Skip to content

fix(glue-alpha): omit comments from struct type strings#38008

Open
sjh9714 wants to merge 1 commit into
aws:mainfrom
sjh9714:fix-glue-struct-comment-input-string
Open

fix(glue-alpha): omit comments from struct type strings#38008
sjh9714 wants to merge 1 commit into
aws:mainfrom
sjh9714:fix-glue-struct-comment-input-string

Conversation

@sjh9714
Copy link
Copy Markdown

@sjh9714 sjh9714 commented May 26, 2026

Issue # (if applicable)

Closes #26935.

Reason for this change

Schema.struct() rendered COMMENT '...' inside the generated nested struct type string when a struct field had a comment. Glue/Athena do not support COMMENT inside nested type definitions, so the resulting inputString could not be used for nested schemas.

Description of changes

This removes comment rendering from the Schema.struct() type string. Column comments remain available on Column objects for top-level table columns, where they are represented separately by Glue's Comment property 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 inputString values.

Describe any new or updated permissions being added

None.

Description of how you validated changes

Before the implementation change, yarn test in packages/@aws-cdk/aws-glue-alpha failed in test/schema.test.ts because the struct inputString still included nested COMMENT clauses.

Commands run:

  • yarn install --frozen-lockfile
  • npx lerna run build --scope @aws-cdk/aws-glue-alpha --include-dependencies --skip-nx-cache
  • yarn build from packages/@aws-cdk/aws-glue-alpha
  • yarn test from packages/@aws-cdk/aws-glue-alpha
  • git diff --check

Note: 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

@github-actions github-actions Bot added bug This issue is a bug. effort/medium Medium work item – several days of effort p2 beginning-contributor [Pilot] contributed between 0-2 PRs to the CDK labels May 26, 2026
Copy link
Copy Markdown
Collaborator

@aws-cdk-automation aws-cdk-automation left a comment

Choose a reason for hiding this comment

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

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.

@sjh9714
Copy link
Copy Markdown
Author

sjh9714 commented May 26, 2026

Exemption Request:

This fix changes only Schema.struct() input string rendering for nested Glue struct field comments. It is covered by the existing schema.test.ts unit coverage, and it does not change synthesized CloudFormation resources or integration snapshots.

I ran yarn test in packages/@aws-cdk/aws-glue-alpha; the package tests passed and all integration snapshots were reported as unchanged.

@aws-cdk-automation aws-cdk-automation added the pr-linter/exemption-requested The contributor has requested an exemption to the PR Linter feedback. label May 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

beginning-contributor [Pilot] contributed between 0-2 PRs to the CDK bug This issue is a bug. effort/medium Medium work item – several days of effort p2 pr-linter/exemption-requested The contributor has requested an exemption to the PR Linter feedback.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

(aws-glue-alpha): (struct schema produces unsupported inputStrings)

2 participants