You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@orc.apache.org by GitBox <gi...@apache.org> on 2021/03/24 22:20:24 UTC

[GitHub] [orc] noirello opened a new pull request #669: ORC-773: BinaryColumnWriter does not update Bloom filter

noirello opened a new pull request #669:
URL: https://github.com/apache/orc/pull/669


   <!--
   Thanks for sending a pull request!  Here are some tips for you:
     1. File a JIRA issue first and use it as a prefix of your PR title, e.g., `ORC-001: Fix ABC`.
     2. Use your PR title to summarize what this PR proposes instead of describing the problem.
     3. Make PR title and description complete because these will be the permanent commit log.
     4. If possible, provide a concise and reproducible example to reproduce the issue for a faster review.
     5. If the PR is unfinished, use GitHub PR Draft feature.
   -->
   
   ### What changes were proposed in this pull request?
   Add missing Bloom filter update, when new item is added to a binary column.
   
   
   ### Why are the changes needed?
   Even when the Bloom filter is enabled for a binary column, the filter won't be updated. 
   
   
   ### How was this patch tested?
   Copied the logic from the string column in testBloomFilter.
   


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



[GitHub] [orc] pgaref commented on a change in pull request #669: ORC-773: BinaryColumnWriter does not update Bloom filter

Posted by GitBox <gi...@apache.org>.
pgaref commented on a change in pull request #669:
URL: https://github.com/apache/orc/pull/669#discussion_r601273303



##########
File path: c++/src/ColumnWriter.cc
##########
@@ -1683,6 +1683,9 @@ namespace orc {
       if (!notNull || notNull[i]) {
         directDataStream->write(data[i], unsignedLength);
 
+        if (enableBloomFilter) {

Review comment:
       +1 This looks to be on par with the ColumnWriters above




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



[GitHub] [orc] wgtmac commented on pull request #669: ORC-773: BinaryColumnWriter does not update Bloom filter

Posted by GitBox <gi...@apache.org>.
wgtmac commented on pull request #669:
URL: https://github.com/apache/orc/pull/669#issuecomment-807920247


   Thanks for pinning me @pgaref !   The change is pretty clean. Thanks @noirello for contributing!
   
   I haven't implemented this in the C++ BinaryColumnWriter because the created BloomFilter is not used on the reader side: https://github.com/apache/orc/blob/master/java/core/src/java/org/apache/orc/impl/RecordReaderImpl.java#L741 . I am not sure if there is any valid case where literals of binary type appear in the predicate. If that is valid, we should also include the fix on the reader side.


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



[GitHub] [orc] wgtmac merged pull request #669: ORC-773: BinaryColumnWriter does not update Bloom filter

Posted by GitBox <gi...@apache.org>.
wgtmac merged pull request #669:
URL: https://github.com/apache/orc/pull/669


   


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



[GitHub] [orc] dongjoon-hyun commented on pull request #669: ORC-773: BinaryColumnWriter does not update Bloom filter

Posted by GitBox <gi...@apache.org>.
dongjoon-hyun commented on pull request #669:
URL: https://github.com/apache/orc/pull/669#issuecomment-808935541


   Thank you for your contribution, @noirello .


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



[GitHub] [orc] noirello commented on pull request #669: ORC-773: BinaryColumnWriter does not update Bloom filter

Posted by GitBox <gi...@apache.org>.
noirello commented on pull request #669:
URL: https://github.com/apache/orc/pull/669#issuecomment-808063423


   Oh I see. I didn't check the predicate implementation. I just only saw that the [Java counterpart](https://github.com/apache/orc/blob/master/java/core/src/java/org/apache/orc/impl/writer/BinaryTreeWriter.java#L95) updates the filter, and I thought it could be problematic initialising but not updating it on the C++ side.
   
   But now I checked Trino as another reference, where it seems neither the reader expects Bloom filter for a binary column (just like the implementations here), nor the writer creates Bloom filter for binary statistics.
   
   I guess there aren't many valid use cases for it. Should I close this with the related issue?


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