Skip to content

Conversation

@nastra
Copy link
Contributor

@nastra nastra commented Sep 12, 2023

No description provided.

@ValueSource(strings = {"none", "gzip"})
public void metadataCompression(String codecName) throws IOException {
Codec codec = Codec.fromName(codecName);
String location = Paths.get(tmp.toString(), "v1" + getFileExtension(codec)).toString();
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think that this should rely on getFileExtension. It's fine that it is used by BaseViewOperations to name the file, but there's no need to do that here. Instead, I think this should be parameterized by file name (v1.metadata.json and v1.gz.metadata.json) so that it is obvious what happens based on the file name in the test. Otherwise this is testing that the extension produced by getFileExtension triggers some behavior in the parser, rather than a specific extension triggers behavior in the parser.

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 was aligning this test with how compression was tested for table metadata in

public void testCompressionProperty() throws IOException {
but I've changed it to have explicit file names

@nastra nastra force-pushed the view-apis-with-compression branch from 8553226 to 2eb49de Compare October 4, 2023 07:35
@nastra nastra force-pushed the view-apis-with-compression branch from 2eb49de to 243a4b9 Compare October 4, 2023 07:36
@nastra nastra requested a review from rdblue October 6, 2023 17:07
@rdblue rdblue merged commit b7e5d68 into apache:master Oct 11, 2023
@rdblue
Copy link
Contributor

rdblue commented Oct 11, 2023

Thanks, @nastra!

@nastra nastra deleted the view-apis-with-compression branch October 12, 2023 06:05
@nastra nastra self-assigned this Nov 25, 2024
zhongyujiang pushed a commit to zhongyujiang/iceberg that referenced this pull request Apr 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants