-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Parquet: Remove duplicate test code #8098
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
@ajantha-bhat can you rebase please? |
Done. I would have saved some effort on #8056 if I have found it earlier. |
|
@ajantha-bhat I found it the day before merging the PR when I observed package collisions. I wanted to handle it in a separate PR after discussion with @nastra. Thanks for this PR. |
| protected GenericData.Record writeAndRead( | ||
| String desc, Schema writeSchema, Schema readSchema, GenericData.Record record) | ||
| throws IOException { | ||
| File file = temp.resolve(desc + ".parquet").toFile(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was modified by #8056.
Hence, reverting this line and making it compatible with parent class in iceberg-core
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be better to first switch TestReadProjection from iceberg-core to JUnit5 and then removing TestReadProjection from iceberg-parquet
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That may require moving to Junit5 for a whole iceberg-core module. I am afraid I don't have a time to work on that.
@coded9, if you are intersted, please feel free to work on it.
I was doing a POC of partition stats where I had to move all the files of iceberg-parquet into iceberg-core, that time I found this duplicate code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done. Rebased. Now it is on Junit 5.
8002fd8 to
2b15fef
Compare
|
|
||
| // Empty struct read is not supported for Parquet | ||
| @Override | ||
| public void testEmptyStructProjection() throws Exception {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These tests was added for Avro. When empty struct was supported. But it is not yet supported for parquet. Since both avro and parquet now use the common class. Ignoring the tests for parquet.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, This class uses (extends) TestReadProjection from api module now. Instead of duplicated local copy.
TestReadProjection.javainiceberg-parquetmodule is an exact duplicate oficeberg-coremodule'sTestReadProjection.java.iceberg-parquetmodule can directly extend a test class fromiceberg-coreas it already depends on test artifacts.Note: Empty struct is supported for
iceberg-coreavro readers (#2953).That time 5 new testcases were added. which won't work for parquet readers.