Skip to content

Glue: default Hive-required table fields on get_table - #10121

Open
parisni wants to merge 1 commit into
getmoto:masterfrom
leboncoin:pr/glue-get-table-hive-defaults
Open

Glue: default Hive-required table fields on get_table#10121
parisni wants to merge 1 commit into
getmoto:masterfrom
leboncoin:pr/glue-get-table-hive-defaults

Conversation

@parisni

@parisni parisni commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Real AWS Glue populates Retention and the StorageDescriptor's Compressed,
NumberOfBuckets and StoredAsSubDirectories fields with defaults when they are
omitted from the TableInput. Clients that unbox those fields (e.g. the Hive
metastore Glue client used by Spark) throw a NullPointerException when they are
absent from GetTable.

This defaults them the same way real Glue does, so such clients work against moto.

Test added in tests/test_glue/test_datacatalog.py.

Real AWS Glue populates Retention and the StorageDescriptor's Compressed,
NumberOfBuckets and StoredAsSubDirectories fields with defaults when they
are omitted from the TableInput. Clients that unbox them (e.g. the Hive
metastore Glue client) throw a NullPointerException when they are absent.
Mirror the real defaulting behaviour so those clients work against moto.
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.

1 participant