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/11/06 18:19:46 UTC

[GitHub] [iceberg] samarthjain opened a new pull request #1736: [Parquet] Fix vectorized reads for negative decimals

samarthjain opened a new pull request #1736:
URL: https://github.com/apache/iceberg/pull/1736


   


----------------------------------------------------------------
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] [iceberg] rdblue merged pull request #1736: [Parquet] Fix vectorized reads for negative decimals

Posted by GitBox <gi...@apache.org>.
rdblue merged pull request #1736:
URL: https://github.com/apache/iceberg/pull/1736


   


----------------------------------------------------------------
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] [iceberg] samarthjain commented on a change in pull request #1736: [Parquet] Fix vectorized reads for negative decimals

Posted by GitBox <gi...@apache.org>.
samarthjain commented on a change in pull request #1736:
URL: https://github.com/apache/iceberg/pull/1736#discussion_r518957217



##########
File path: api/src/test/java/org/apache/iceberg/util/RandomUtil.java
##########
@@ -31,6 +31,12 @@
   private RandomUtil() {
   }
 
+  private static final Random NEGATIVE_VALUES = new Random();

Review comment:
       For some reason, TestLocalScan#testRandomData() fails if I use the random passed in to do
   ```
   boolean negate = random.nextInt(2) == 1
   ```
   




----------------------------------------------------------------
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] [iceberg] rdblue commented on a change in pull request #1736: [Parquet] Fix vectorized reads for negative decimals

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



##########
File path: api/src/test/java/org/apache/iceberg/util/RandomUtil.java
##########
@@ -31,6 +31,12 @@
   private RandomUtil() {
   }
 
+  private static final Random NEGATIVE_VALUES = new Random();

Review comment:
       All tests need to use the `Random` that is passed in so that the values that are generated are deterministic and repeatable. That's what allows us to generated an iterator instead of a list in some cases, and makes it so if we do have a problem, we can repeat the test and debug.




----------------------------------------------------------------
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] [iceberg] rdblue commented on pull request #1736: [Parquet] Fix vectorized reads for negative decimals

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


   Thanks, @samarthjain!


----------------------------------------------------------------
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] [iceberg] aokolnychyi commented on a change in pull request #1736: [Parquet] Fix vectorized reads for negative decimals

Posted by GitBox <gi...@apache.org>.
aokolnychyi commented on a change in pull request #1736:
URL: https://github.com/apache/iceberg/pull/1736#discussion_r518987239



##########
File path: api/src/test/java/org/apache/iceberg/util/RandomUtil.java
##########
@@ -155,15 +160,15 @@ public static Object generateDictionaryEncodablePrimitive(Type.PrimitiveType pri
         return true; // doesn't really matter for booleans since they are not dictionary encoded
       case INTEGER:
       case DATE:
-        return value;
+        return  negate(value) ? -1 * value : value;

Review comment:
       nit: extra space




----------------------------------------------------------------
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] [iceberg] samarthjain commented on a change in pull request #1736: [Parquet] Fix vectorized reads for negative decimals

Posted by GitBox <gi...@apache.org>.
samarthjain commented on a change in pull request #1736:
URL: https://github.com/apache/iceberg/pull/1736#discussion_r518984048



##########
File path: api/src/test/java/org/apache/iceberg/util/RandomUtil.java
##########
@@ -31,6 +31,12 @@
   private RandomUtil() {
   }
 
+  private static final Random NEGATIVE_VALUES = new Random();

Review comment:
       Looks like this caused a test failure in TestSparkParquetWriter#testCorrectness also. Pushed a commit to get rid of the new Random. 




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