You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@orc.apache.org by "dongjoon-hyun (via GitHub)" <gi...@apache.org> on 2023/06/22 09:54:21 UTC
[GitHub] [orc] dongjoon-hyun commented on a diff in pull request #1307: ORC-1298:[C++] Support dedicated ColumnVectorBatch of numeric types
dongjoon-hyun commented on code in PR #1307:
URL: https://github.com/apache/orc/pull/1307#discussion_r1238290036
##########
c++/src/ColumnReader.cc:
##########
@@ -1696,13 +1690,25 @@ namespace orc {
/**
* Create a reader for the given stripe.
*/
- std::unique_ptr<ColumnReader> buildReader(const Type& type, StripeStreams& stripe) {
+ std::unique_ptr<ColumnReader> buildReader(const Type& type, StripeStreams& stripe,
+ bool useTightNumericVector) {
switch (static_cast<int64_t>(type.getKind())) {
- case DATE:
- case INT:
+ case SHORT: {
+ if (useTightNumericVector) {
+ return std::unique_ptr<ColumnReader>(
+ new IntegerColumnReader<ShortVectorBatch>(type, stripe));
+ }
+ }
+ case INT: {
Review Comment:
This seems to cause `implicit-fallthrough` warning and compilation failure.
##########
c++/src/ColumnReader.cc:
##########
@@ -1696,13 +1690,25 @@ namespace orc {
/**
* Create a reader for the given stripe.
*/
- std::unique_ptr<ColumnReader> buildReader(const Type& type, StripeStreams& stripe) {
+ std::unique_ptr<ColumnReader> buildReader(const Type& type, StripeStreams& stripe,
+ bool useTightNumericVector) {
switch (static_cast<int64_t>(type.getKind())) {
- case DATE:
- case INT:
+ case SHORT: {
+ if (useTightNumericVector) {
+ return std::unique_ptr<ColumnReader>(
+ new IntegerColumnReader<ShortVectorBatch>(type, stripe));
+ }
+ }
+ case INT: {
Review Comment:
This seems to cause `implicit-fallthrough` warning and compilation failure in Clang environment.
--
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.
To unsubscribe, e-mail: issues-unsubscribe@orc.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org