Skip to content

fix(catalog/glue): Fix nil map assignment issue in glue catalog - #446

Merged
zeroshade merged 1 commit into
apache:mainfrom
lliangyu-lin:nil-map-fix
May 29, 2025
Merged

zeroshade merged 1 commit into
apache:mainfrom
lliangyu-lin:nil-map-fix

Conversation

@lliangyu-lin

@lliangyu-lin lliangyu-lin commented May 28, 2025 •

Copy link
Copy Markdown
Contributor

Description

When calling NewCatalog in glue catalog without any AWS properties, causing the catalog properties to be nil

props:     iceberg.Properties(glueOps.awsProperties),

Hence, when creating a staged table and need to clone the catalog properties in

ioProps := maps.Clone(catprops)
maps.Copy(ioProps, cfg.Properties)
, it will result in nil map assignment.

Similar is happening in

func prepareProperties(icebergProperties iceberg.Properties, newMetadataLocation string) iceberg.Properties {
	glueProperties := maps.Clone(icebergProperties)

where if staged table has no properties in the metadata, it will return nil and causing nil map.

Testing

Glue integration tests were failing because they are using NewCatalog(WithAwsConfig(awsCfg)). Re-ran the Glue integration tests with the fix, and now they are passing

@zeroshade
zeroshade merged commit ff2f3de into apache:main May 29, 2025
@lliangyu-lin
lliangyu-lin deleted the nil-map-fix branch May 29, 2025 23:55
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