iceberg icon indicating copy to clipboard operation
iceberg copied to clipboard

Deprecate usages of AssertHelpers in codebase

Open jackye1995 opened this issue 3 years ago • 17 comments

Feature Request / Improvement

as a part of discussions in #6977 , create an issue to track the effort.

This seems like a good beginners task, or for someone that have some spare time to remove all references.

This does not need to happen in a giant PR, can be done module by module.

Query engine

None

jackye1995 avatar Mar 13 '23 16:03 jackye1995

@jackye1995 I would like to work on this. Can you assign it to me? I think this can start after #6977 is merged, what do you think?

liuxiaocs7 avatar Mar 13 '23 18:03 liuxiaocs7

Sure, we should be merging it very soon, I can assign this to you

jackye1995 avatar Mar 13 '23 18:03 jackye1995

@liuxiaocs7 Doing this on a module-by-module basis would be a good thing, as it makes it easier for reviewers to review small PRs. Also might be worth starting in one of the modules that has a lower amount of usages of AssertHelpers (iceberg-orc can probably be combined with another module)

image

nastra avatar Mar 14 '23 10:03 nastra

@liuxiaocs7 Doing this on a module-by-module basis would be a good thing, as it makes it easier for reviewers to review small PRs. Also might be worth starting in one of the modules that has a lower amount of usages of AssertHelpers (iceberg-orc can probably be combined with another module)

image

Thank you for your suggestion. I will revise it step by step.

liuxiaocs7 avatar Mar 15 '23 06:03 liuxiaocs7

Hi! I'm going to try making this change to iceberg-orc module

akshaya-kp avatar Apr 27 '23 22:04 akshaya-kp

@liuxiaocs7 I sent out a PR to remove usage of AssertHelpers. Coincidentally, it overlaps with changes from your PR. Specifically these two files - https://github.com/apache/iceberg/pull/7482/files#diff-52c0deff4e445a4ed751511025b1cf380549283a85d91f67528116d9072bb86b and https://github.com/apache/iceberg/pull/7482/files#diff-65e74287fd4b789cbc6789d0f1435ca700c121114d98823e827fd1ee76174d08

Please note that I will remove these two files from my PR.

akshaya-kp avatar May 01 '23 17:05 akshaya-kp

Hi, @akshayakp97, sorry, I didn't notice your pr and covered ORC and MR modules in Hive module. Thanks for removing the related module in #7468.

liuxiaocs7 avatar May 02 '23 06:05 liuxiaocs7

Is there any module that i can pick up

gzagarwal avatar Oct 01 '23 09:10 gzagarwal

@gzagarwal you can just search through the codebase and pick up any of them, such as the ones in iceberg-aws module

nastra avatar Oct 02 '23 08:10 nastra

okay let me pick, I am working on iceberg-aws

gzagarwal avatar Oct 03 '23 16:10 gzagarwal

Working on flink module...

amshali avatar Oct 04 '23 01:10 amshali

okay let me pick, I am working on iceberg-aws

Shall i assume current test cases are working? on my local system they are not working so asking this question. Is there any perquisite to work on the iceberg workspace .Some settings do i need to run to work.

gzagarwal avatar Oct 04 '23 07:10 gzagarwal

@gzagarwal yes the tests should all be working. What issue are you seeing? https://github.com/apache/iceberg/blob/a3aff95f9e60962240b94242e24a778760bdd1d9/CONTRIBUTING.md and https://iceberg.apache.org/contribute/#building-the-project-locally should contain everything needed in order to configure the project locally

nastra avatar Oct 04 '23 08:10 nastra

@gzagarwal yes the tests should all be working. What issue are you seeing? https://github.com/apache/iceberg/blob/a3aff95f9e60962240b94242e24a778760bdd1d9/CONTRIBUTING.md and https://iceberg.apache.org/contribute/#building-the-project-locally should contain everything needed in order to configure the project locally

Some issue with my local system only, let me fix that first , if someone wants to take care of the changes they can pick it up. if my workspace works locally then will come back.,

gzagarwal avatar Oct 04 '23 09:10 gzagarwal

@gzagarwal you can just search through the codebase and pick up any of them, such as the ones in iceberg-aws module

I am running existing testcase in iceberg-aws module . am i having some issue or its failing other places. I am having Windows machine.where executing the test case. TestCase Name : TestDefaultAwsClientFactory.testS3FileIoCredentialsOverride Exception : while running the test case

Expecting actual throwable to be an instance of: software.amazon.awssdk.services.s3.model.S3Exception but was: software.amazon.awssdk.core.exception.SdkClientException: Unable to marshall request to JSON: Parameter 'Bucket' must not be null at software.amazon.awssdk.core.exception.SdkClientException$BuilderImpl.build(SdkClientException.java:111)

gzagarwal avatar Oct 06 '23 08:10 gzagarwal

The only modules left are Spark 3.2 + Spark 3.3

image

I don't think we want to spend time migrating those. Once Spark 3.2 + 3.3 are deprecated and removed from the codebase, we can remove AssertHelpers.

nastra avatar Nov 13 '23 08:11 nastra

follow-up to complete removal of AssertHelpers -- https://github.com/apache/iceberg/pull/10500

I don't think we want to spend time migrating those

agreed! fortunately they turned out mechanically updatable. in the PR above i did this using Intellij structural replace.

findepi avatar Jun 15 '24 19:06 findepi