This is an automated email from the ASF dual-hosted git repository.
dongjoon pushed a commit to branch branch-1.9
in repository https://gitbox.apache.org/repos/asf/orc.git
The following commit(s) were added to refs/heads/branch-1.9 by this push:
new b19bfaf5c ORC-1453: Fix `implicit-fallthrough` warnings (#1548)
b19bfaf5c is described below
commit b19bfaf5c7c3868ffa50e65404d54bb350160232
Author: Dongjoon Hyun <[email protected]>
AuthorDate: Fri Jun 23 01:00:54 2023 -0700
ORC-1453: Fix `implicit-fallthrough` warnings (#1548)
### What changes were proposed in this pull request?
This PR aims to fix `implicit-fallthrough` warning.
### Why are the changes needed?
To pass `Docker` tests on `clang`
### How was this patch tested?
Pass the CIs and manual docker testing.
---
c++/src/ColumnReader.cc | 8 ++++----
c++/src/ColumnWriter.cc | 2 ++
c++/src/TypeImpl.cc | 23 +++++++++++------------
3 files changed, 17 insertions(+), 16 deletions(-)
diff --git a/c++/src/ColumnReader.cc b/c++/src/ColumnReader.cc
index 3552acf39..7fdcd530f 100644
--- a/c++/src/ColumnReader.cc
+++ b/c++/src/ColumnReader.cc
@@ -1722,16 +1722,16 @@ namespace orc {
}
switch (static_cast<int64_t>(type.getKind())) {
- case SHORT: {
+ case SHORT:
if (useTightNumericVector) {
return std::make_unique<IntegerColumnReader<ShortVectorBatch>>(type,
stripe);
}
- }
- case INT: {
+ return std::make_unique<IntegerColumnReader<LongVectorBatch>>(type,
stripe);
+ case INT:
if (useTightNumericVector) {
return std::make_unique<IntegerColumnReader<IntVectorBatch>>(type,
stripe);
}
- }
+ return std::make_unique<IntegerColumnReader<LongVectorBatch>>(type,
stripe);
case LONG:
case DATE:
return std::make_unique<IntegerColumnReader<LongVectorBatch>>(type,
stripe);
diff --git a/c++/src/ColumnWriter.cc b/c++/src/ColumnWriter.cc
index 0c72e1ccf..8b795b4f6 100644
--- a/c++/src/ColumnWriter.cc
+++ b/c++/src/ColumnWriter.cc
@@ -2824,10 +2824,12 @@ namespace orc {
if (options.getUseTightNumericVector()) {
return std::make_unique<IntegerColumnWriter<ShortVectorBatch>>(type,
factory, options);
}
+ return std::make_unique<IntegerColumnWriter<LongVectorBatch>>(type,
factory, options);
case INT:
if (options.getUseTightNumericVector()) {
return std::make_unique<IntegerColumnWriter<IntVectorBatch>>(type,
factory, options);
}
+ return std::make_unique<IntegerColumnWriter<LongVectorBatch>>(type,
factory, options);
case LONG:
return std::make_unique<IntegerColumnWriter<LongVectorBatch>>(type,
factory, options);
case BYTE:
diff --git a/c++/src/TypeImpl.cc b/c++/src/TypeImpl.cc
index 7e9af806f..0fd640b2d 100644
--- a/c++/src/TypeImpl.cc
+++ b/c++/src/TypeImpl.cc
@@ -286,38 +286,37 @@ namespace orc {
MemoryPool&
memoryPool, bool encoded,
bool
useTightNumericVector) const {
switch (static_cast<int64_t>(kind)) {
- case BOOLEAN: {
+ case BOOLEAN:
if (useTightNumericVector) {
return std::make_unique<ByteVectorBatch>(capacity, memoryPool);
}
- }
- case BYTE: {
+ return std::make_unique<LongVectorBatch>(capacity, memoryPool);
+ case BYTE:
if (useTightNumericVector) {
return std::make_unique<ByteVectorBatch>(capacity, memoryPool);
}
- }
- case SHORT: {
+ return std::make_unique<LongVectorBatch>(capacity, memoryPool);
+ case SHORT:
if (useTightNumericVector) {
return std::make_unique<ShortVectorBatch>(capacity, memoryPool);
}
- }
- case INT: {
+ return std::make_unique<LongVectorBatch>(capacity, memoryPool);
+ case INT:
if (useTightNumericVector) {
return std::make_unique<IntVectorBatch>(capacity, memoryPool);
}
- }
+ return std::make_unique<LongVectorBatch>(capacity, memoryPool);
case LONG:
- case DATE: {
+ case DATE:
return std::make_unique<LongVectorBatch>(capacity, memoryPool);
- }
case FLOAT:
if (useTightNumericVector) {
return std::make_unique<FloatVectorBatch>(capacity, memoryPool);
}
- case DOUBLE: {
return std::make_unique<DoubleVectorBatch>(capacity, memoryPool);
- }
+ case DOUBLE:
+ return std::make_unique<DoubleVectorBatch>(capacity, memoryPool);
case STRING:
case BINARY: