Repository navigation
ORC-1399 [C++] Return LongVectorBatch when createRowBatch for boolean type with useTightNumericVector option - #1449
Merged
Merged
Conversation
Member
|
cc @wgtmac |
Contributor
Author
|
I ve uploaded a new patch which supports reading/writing |
wgtmac
reviewed
Mar 27, 2023
wgtmac
left a comment
Member
There was a problem hiding this comment.
The overall is looking good. Left some cosmetic comments.
| BatchType* byteBatch = dynamic_cast<BatchType*>(&rowBatch); | ||
| if (byteBatch == nullptr) { | ||
| throw InvalidArgument("Failed to cast to LongVectorBatch"); | ||
| throw InvalidArgument("Failed to cast to BooleanVectorBatch"); |
Member
There was a problem hiding this comment.
The exception message may be incorrect. You may need to #include <typeinfo> to use its name field to build the message.
Member
There was a problem hiding this comment.
Comment on lines
+176
to
+177
| // Since the byte rle places the output in a char* | ||
| // we cheat here and use the other type and then expand it in a second pass. |
Member
There was a problem hiding this comment.
Suggested change
| // Since the byte rle places the output in a char* | |
| // we cheat here and use the other type and then expand it in a second pass. | |
| // Since the byte rle places the output in a char* and BatchType here may be | |
| // LongVectorBatch with long*. We cheat here in that case and use the long* | |
| // and then expand it in a second pass. |
wgtmac
approved these changes
Mar 27, 2023
Member
cxzl25
pushed a commit
to cxzl25/orc
that referenced
this pull request
Jan 11, 2024
### What changes were proposed in this pull request? Fix using ByteVectorBatch for BOOLEAN type with useTightNumericVector enabled. ### Why are the changes needed? If a ByteVectorBatch is returned, BooleanColumnReader/Writer would crash because they only accept LongVectorBatch. This closes apache#1449
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
Return LongVectorBatch when create a RowBatch for BOOLEAN type with useTightNumericVector option, instead of ByteVectorBatch.
Why are the changes needed?
If a ByteVectorBatch is returned, BooleanColumnReader/Writer would crash because they only accept LongVectorBatch.
How was this patch tested?
no test