You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2020/04/23 00:51:15 UTC

[GitHub] [incubator-iceberg] shardulm94 opened a new pull request #953: Fix GenericOrcReader OutOfBoundsException when reading ORC file with …

shardulm94 opened a new pull request #953:
URL: https://github.com/apache/incubator-iceberg/pull/953


   …repeating rows
   
   #889 introduced a typo/bug at https://github.com/apache/incubator-iceberg/commit/45a44f4cf49300db9a89e205d172146591b0bad1#diff-00f918f8e7f8149323b1c7086f77ab7dR104 where an incorrect index was being passed which fails for an ORC RowBatch with all rows repeating.


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

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] [incubator-iceberg] rdblue commented on pull request #953: Fix GenericOrcReader OutOfBoundsException when reading ORC file with …

Posted by GitBox <gi...@apache.org>.
rdblue commented on pull request #953:
URL: https://github.com/apache/incubator-iceberg/pull/953#issuecomment-619146785


   Merged. Thanks for fixing this, I'm glad to get it in before the release!


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

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] [incubator-iceberg] shardulm94 commented on a change in pull request #953: Fix GenericOrcReader OutOfBoundsException when reading ORC file with …

Posted by GitBox <gi...@apache.org>.
shardulm94 commented on a change in pull request #953:
URL: https://github.com/apache/incubator-iceberg/pull/953#discussion_r414321088



##########
File path: data/src/test/java/org/apache/iceberg/data/orc/TestGenericData.java
##########
@@ -71,6 +72,30 @@ protected void writeAndValidate(Schema schema) throws IOException {
     for (int i = 0; i < expected.size(); i += 1) {
       DataTestHelpers.assertEquals(schema.asStruct(), expected.get(i), rows.get(i));
     }
+
+    // Also write and validate where all rows are the same (repeating)
+    List<Record> expectedRepeating = Collections.nCopies(100, expected.get(0));

Review comment:
       Fixed

##########
File path: spark/src/test/java/org/apache/iceberg/spark/data/TestSparkOrcReader.java
##########
@@ -60,5 +61,29 @@ protected void writeAndValidate(Schema schema) throws IOException {
       }
       Assert.assertFalse("Should not have extra rows", actualRows.hasNext());
     }
+
+    // Also write and validate where all rows are the same (repeating)
+    final Iterable<InternalRow> expectedRepeating = Collections.nCopies(100, expected.iterator().next());

Review comment:
       Fixed




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

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] [incubator-iceberg] rdblue commented on a change in pull request #953: Fix GenericOrcReader OutOfBoundsException when reading ORC file with …

Posted by GitBox <gi...@apache.org>.
rdblue commented on a change in pull request #953:
URL: https://github.com/apache/incubator-iceberg/pull/953#discussion_r413994201



##########
File path: data/src/test/java/org/apache/iceberg/data/orc/TestGenericData.java
##########
@@ -71,6 +72,30 @@ protected void writeAndValidate(Schema schema) throws IOException {
     for (int i = 0; i < expected.size(); i += 1) {
       DataTestHelpers.assertEquals(schema.asStruct(), expected.get(i), rows.get(i));
     }
+
+    // Also write and validate where all rows are the same (repeating)
+    List<Record> expectedRepeating = Collections.nCopies(100, expected.get(0));

Review comment:
       I think this should be a separate test case.




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

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] [incubator-iceberg] rdblue commented on a change in pull request #953: Fix GenericOrcReader OutOfBoundsException when reading ORC file with …

Posted by GitBox <gi...@apache.org>.
rdblue commented on a change in pull request #953:
URL: https://github.com/apache/incubator-iceberg/pull/953#discussion_r413994471



##########
File path: spark/src/test/java/org/apache/iceberg/spark/data/TestSparkOrcReader.java
##########
@@ -60,5 +61,29 @@ protected void writeAndValidate(Schema schema) throws IOException {
       }
       Assert.assertFalse("Should not have extra rows", actualRows.hasNext());
     }
+
+    // Also write and validate where all rows are the same (repeating)
+    final Iterable<InternalRow> expectedRepeating = Collections.nCopies(100, expected.iterator().next());

Review comment:
       Let's add new test cases instead of appending new validations to old ones.




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

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] [incubator-iceberg] rdblue commented on issue #953: Fix GenericOrcReader OutOfBoundsException when reading ORC file with …

Posted by GitBox <gi...@apache.org>.
rdblue commented on issue #953:
URL: https://github.com/apache/incubator-iceberg/pull/953#issuecomment-618541739


   @shardulm94, the fix looks good to me, but I'd like to fix the tests. Thanks!


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

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