(aws-glue-alpha): (struct schema produces unsupported inputStrings) #26935
Labels
@aws-cdk/aws-glue
Related to AWS Glue
bug
This issue is a bug.
effort/medium
Medium work item – several days of effort
p2
Describe the bug
Regarding this line: https://github.com/aws/aws-cdk/blame/main/packages/%40aws-cdk/aws-glue-alpha/lib/schema.ts#L209
As far as I can tell, this will happily create invalid inputStrings for nested structs:
Will generate the following inputString for the nested struct:
If you create a Glue table with this in the schema, athena will throw an error whenever you try to query the table:
From what I can tell, 'COMMENT' is not supported in nested structs. If I try to manually create a schema in a fresh glue table, adding "COMMENT" to the inputString of a nested string causes Glue to treat the type as 'unknown'
For example, before the COMMENT I can inspect the schema and see its type:
But if I add the comment and inspect the type of the column I see:
Expected Behavior
Ideally Glue would support nested comments (or at worst ignore them), but the CDK construct should at least not generate input strings that are guaranteed to not work.
Current Behavior
See description
Reproduction Steps
See description
Possible Solution
See expected behavior
Additional Information/Context
No response
CDK CLI Version
2.87.0 (build 9fca790)
Framework Version
No response
Node.js Version
v18.16.0
OS
AL2
Language
Typescript
Language Version
5.1.3
Other information
No response
The text was updated successfully, but these errors were encountered: