You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "ajantha-bhat (via GitHub)" <gi...@apache.org> on 2023/07/19 06:43:31 UTC

[GitHub] [iceberg] ajantha-bhat opened a new pull request, #8098: Remove duplicate testcases from iceberg-parquet

ajantha-bhat opened a new pull request, #8098:
URL: https://github.com/apache/iceberg/pull/8098

   `TestReadProjection.java` in `iceberg-parquet` module is an exact duplicate of `iceberg-core` module's `TestReadProjection.java`.  'iceberg-parquet' module can directly extend a test class from `iceberg-core` as it already depends on test artifacts. 
   
   Note: Empty struct is supported for `iceberg-core` avro readers. That time 5 new testcases were added. which won't work for parquet readers.  


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [PR] Parquet: Remove duplicate test code [iceberg]

Posted by "ajantha-bhat (via GitHub)" <gi...@apache.org>.
ajantha-bhat commented on code in PR #8098:
URL: https://github.com/apache/iceberg/pull/8098#discussion_r1379600584


##########
parquet/src/test/java/org/apache/iceberg/avro/TestParquetReadProjection.java:
##########
@@ -32,7 +32,7 @@ public class TestParquetReadProjection extends TestReadProjection {
   protected GenericData.Record writeAndRead(
       String desc, Schema writeSchema, Schema readSchema, GenericData.Record record)
       throws IOException {
-    File file = temp.resolve(desc + ".parquet").toFile();

Review Comment:
   Done. Rebased. Now it is on Junit 5.  



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [PR] Parquet: Remove duplicate test code [iceberg]

Posted by "ajantha-bhat (via GitHub)" <gi...@apache.org>.
ajantha-bhat commented on code in PR #8098:
URL: https://github.com/apache/iceberg/pull/8098#discussion_r1379600138


##########
parquet/src/test/java/org/apache/iceberg/avro/TestParquetReadProjection.java:
##########
@@ -45,4 +45,20 @@ protected GenericData.Record writeAndRead(
 
     return Iterables.getOnlyElement(records);
   }
+
+  // Empty struct read is not supported for Parquet
+  @Override
+  public void testEmptyStructProjection() throws Exception {}

Review Comment:
   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. 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [PR] Parquet: Remove duplicate test code [iceberg]

Posted by "ajantha-bhat (via GitHub)" <gi...@apache.org>.
ajantha-bhat commented on code in PR #8098:
URL: https://github.com/apache/iceberg/pull/8098#discussion_r1380068898


##########
parquet/src/test/java/org/apache/iceberg/avro/TestParquetReadProjection.java:
##########
@@ -45,4 +45,20 @@ protected GenericData.Record writeAndRead(
 
     return Iterables.getOnlyElement(records);
   }
+
+  // Empty struct read is not supported for Parquet

Review Comment:
   Done. PR build passed. 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] nastra commented on a diff in pull request #8098: Parquet: Remove duplicate test code

Posted by "nastra (via GitHub)" <gi...@apache.org>.
nastra commented on code in PR #8098:
URL: https://github.com/apache/iceberg/pull/8098#discussion_r1269104241


##########
parquet/src/test/java/org/apache/iceberg/avro/TestParquetReadProjection.java:
##########
@@ -32,7 +32,7 @@ public class TestParquetReadProjection extends TestReadProjection {
   protected GenericData.Record writeAndRead(
       String desc, Schema writeSchema, Schema readSchema, GenericData.Record record)
       throws IOException {
-    File file = temp.resolve(desc + ".parquet").toFile();

Review Comment:
   It would be better to first switch `TestReadProjection` from `iceberg-core` to JUnit5 and then removing `TestReadProjection` from `iceberg-parquet`



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] ajantha-bhat commented on pull request #8098: Parquet: Remove duplicate test code

Posted by "ajantha-bhat (via GitHub)" <gi...@apache.org>.
ajantha-bhat commented on PR #8098:
URL: https://github.com/apache/iceberg/pull/8098#issuecomment-1642158518

   > @ajantha-bhat can you rebase please?
   
   Done. I would have saved some effort on https://github.com/apache/iceberg/pull/8056 if I have found it earlier. 
   Since, this PR removes one of the file it just refactored :) 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [PR] Parquet: Remove duplicate test code [iceberg]

Posted by "ajantha-bhat (via GitHub)" <gi...@apache.org>.
ajantha-bhat commented on code in PR #8098:
URL: https://github.com/apache/iceberg/pull/8098#discussion_r1379603818


##########
parquet/src/test/java/org/apache/iceberg/avro/TestParquetReadProjection.java:
##########
@@ -45,4 +45,20 @@ protected GenericData.Record writeAndRead(
 
     return Iterables.getOnlyElement(records);
   }
+
+  // Empty struct read is not supported for Parquet
+  @Override
+  public void testEmptyStructProjection() throws Exception {}

Review Comment:
   Also, This class uses (extends) `TestReadProjection` from api module now. Instead of duplicated local copy.  



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [PR] Parquet: Remove duplicate test code [iceberg]

Posted by "ajantha-bhat (via GitHub)" <gi...@apache.org>.
ajantha-bhat commented on PR #8098:
URL: https://github.com/apache/iceberg/pull/8098#issuecomment-1790077472

   @nastra, @Fokko: I have rebased this PR. I think it is good to go. Please check and merge.   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [PR] Parquet: Remove duplicate test code [iceberg]

Posted by "nastra (via GitHub)" <gi...@apache.org>.
nastra commented on code in PR #8098:
URL: https://github.com/apache/iceberg/pull/8098#discussion_r1379909688


##########
parquet/src/test/java/org/apache/iceberg/avro/TestParquetReadProjection.java:
##########
@@ -45,4 +45,20 @@ protected GenericData.Record writeAndRead(
 
     return Iterables.getOnlyElement(records);
   }
+
+  // Empty struct read is not supported for Parquet

Review Comment:
   rather than this comment, this should use proper annotations for each test method to indicate that it is skipped:
   ```
     @Override
     @Test
     @Disabled("...")
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] ajantha-bhat commented on a diff in pull request #8098: Parquet: Remove duplicate test code

Posted by "ajantha-bhat (via GitHub)" <gi...@apache.org>.
ajantha-bhat commented on code in PR #8098:
URL: https://github.com/apache/iceberg/pull/8098#discussion_r1269221590


##########
parquet/src/test/java/org/apache/iceberg/avro/TestParquetReadProjection.java:
##########
@@ -32,7 +32,7 @@ public class TestParquetReadProjection extends TestReadProjection {
   protected GenericData.Record writeAndRead(
       String desc, Schema writeSchema, Schema readSchema, GenericData.Record record)
       throws IOException {
-    File file = temp.resolve(desc + ".parquet").toFile();

Review Comment:
   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. 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] fivetran-ashokborra commented on pull request #8098: Parquet: Remove duplicate test code

Posted by "fivetran-ashokborra (via GitHub)" <gi...@apache.org>.
fivetran-ashokborra commented on PR #8098:
URL: https://github.com/apache/iceberg/pull/8098#issuecomment-1643129036

   @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.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [PR] Parquet: Remove duplicate test code [iceberg]

Posted by "nastra (via GitHub)" <gi...@apache.org>.
nastra merged PR #8098:
URL: https://github.com/apache/iceberg/pull/8098


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] coded9 commented on pull request #8098: Parquet: Remove duplicate test code

Posted by "coded9 (via GitHub)" <gi...@apache.org>.
coded9 commented on PR #8098:
URL: https://github.com/apache/iceberg/pull/8098#issuecomment-1643130146

   @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.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] nastra commented on pull request #8098: Parquet: Remove duplicate test code

Posted by "nastra (via GitHub)" <gi...@apache.org>.
nastra commented on PR #8098:
URL: https://github.com/apache/iceberg/pull/8098#issuecomment-1642124333

   @ajantha-bhat can you rebase please?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] ajantha-bhat commented on a diff in pull request #8098: Parquet: Remove duplicate test code

Posted by "ajantha-bhat (via GitHub)" <gi...@apache.org>.
ajantha-bhat commented on code in PR #8098:
URL: https://github.com/apache/iceberg/pull/8098#discussion_r1268942247


##########
parquet/src/test/java/org/apache/iceberg/avro/TestParquetReadProjection.java:
##########
@@ -32,7 +32,7 @@ public class TestParquetReadProjection extends TestReadProjection {
   protected GenericData.Record writeAndRead(
       String desc, Schema writeSchema, Schema readSchema, GenericData.Record record)
       throws IOException {
-    File file = temp.resolve(desc + ".parquet").toFile();

Review Comment:
   This was modified by https://github.com/apache/iceberg/pull/8056. 
   Hence, reverting this line and making it compatible with parent class in `iceberg-core`



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org