You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@drill.apache.org by GitBox <gi...@apache.org> on 2018/06/29 15:50:44 UTC
[GitHub] vrozov commented on a change in pull request #1349: DRILL-6554:
Minor code improvements in parquet statistics handling
vrozov commented on a change in pull request #1349: DRILL-6554: Minor code improvements in parquet statistics handling
URL: https://github.com/apache/drill/pull/1349#discussion_r199204147
##########
File path: exec/java-exec/src/main/java/org/apache/drill/exec/expr/stat/ParquetPredicatesHelper.java
##########
@@ -39,22 +40,21 @@ static boolean isNullOrEmpty(Statistics stat) {
*
* @param stat parquet column statistics
* @param rowCount number of rows in the parquet file
- * @return True if all rows are null in the parquet file
- * False if at least one row is not null.
+ * @return <tt>true</tt> if all rows are null in the parquet file and <tt>false</tt> otherwise
*/
static boolean isAllNulls(Statistics stat, long rowCount) {
- return stat.isNumNullsSet() && stat.getNumNulls() == rowCount;
+ Preconditions.checkArgument(rowCount >= 0, String.format("negative rowCount %d is not valid", rowCount));
Review comment:
When can rowCount be negative?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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
With regards,
Apache Git Services