Skip to content

Conversation

CTTY
Copy link
Contributor

@CTTY CTTY commented Aug 6, 2025

Which issue does this PR close?

What changes are included in this PR?

  • Implemented update_table for GlueCatalog
  • Added test for GlueCatalog::update_table
  • Fixed exception type in RestCatalog
  • Fixed a typo in ErrorKind

Are these changes tested?

added a test

@CTTY CTTY marked this pull request as ready for review August 10, 2025 18:47
@@ -367,3 +368,69 @@ async fn test_list_namespace() -> Result<()> {

Ok(())
}

#[tokio::test]
async fn test_update_table() -> Result<()> {

Choose a reason for hiding this comment

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

should there be tests for non-happy paths?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think this is a good point, but I didn't test conflicts, because currently it's tricky to forge conflicts that are non-retryable without more complicated transaction actions like overwrite or rewrite

Choose a reason for hiding this comment

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

there isn't a way to mock the response?

.with_retryable(true),
_ => Error::new(
ErrorKind::Unexpected,
"Operation failed for hitting aws sdk error",

Choose a reason for hiding this comment

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

include table name here for completeness?

.with_retryable(true),
_ => Error::new(
ErrorKind::Unexpected,
"Operation failed for hitting aws sdk error",

Choose a reason for hiding this comment

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

Suggested change
"Operation failed for hitting aws sdk error",
"Operation failed for hitting AWS SDK error",

nit

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think the current convention is to use lower case for aws sdk-related messaged across glue and s3table's implementations, and this should be fixed in a separate PR if needed

"Operation failed for hitting aws sdk error",
),
}
.with_source(anyhow!("aws sdk error: {:?}", error))

Choose a reason for hiding this comment

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

Suggested change
.with_source(anyhow!("aws sdk error: {:?}", error))
.with_source(anyhow!("AWS SDK error: {:?}", error))

nit

@CTTY CTTY force-pushed the ctty/glue-update branch from 067ac58 to 7bcaed0 Compare August 20, 2025 22:42
Copy link
Contributor

@liurenjie1024 liurenjie1024 left a comment

Choose a reason for hiding this comment

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

Thanks @CTTY for this pr!

@liurenjie1024 liurenjie1024 merged commit 7fde148 into apache:main Aug 22, 2025
17 checks passed
Yiyang-C pushed a commit to Yiyang-C/iceberg-rust that referenced this pull request Aug 26, 2025
## Which issue does this PR close?

- Addresses the Glue part of apache#1389

## What changes are included in this PR?
- Implemented `update_table` for `GlueCatalog`
- Added test for `GlueCatalog::update_table`
- Fixed exception type in `RestCatalog`
- Fixed a typo in `ErrorKind`

## Are these changes tested?
added a test
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.

3 participants