forked from apache/arrow
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PARQUET-720: Mark ScanAllValues as inline to prevent link error
Closes apache#161 Author: Uwe L. Korn <[email protected]> Author: fscheibner <[email protected]> Closes apache#163 from xhochy/PARQUET-720 and squashes the following commits: 4d3125d [Uwe L. Korn] Add ScanAllValues to parquet namespace b2c9ff1 [Uwe L. Korn] Format fixes 8f91550 [fscheibner] Move ScanAllValues to scan-all.cc 60dec35 [fscheibner] Mark ScanAllValues as inline to prevent link error Change-Id: Ide0c58ae3c5622a615c3732f72709c7ca37453dc
- Loading branch information
Showing
2 changed files
with
63 additions
and
33 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
// Licensed to the Apache Software Foundation (ASF) under one | ||
// or more contributor license agreements. See the NOTICE file | ||
// distributed with this work for additional information | ||
// regarding copyright ownership. The ASF licenses this file | ||
// to you under the Apache License, Version 2.0 (the | ||
// "License"); you may not use this file except in compliance | ||
// with the License. You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, | ||
// software distributed under the License is distributed on an | ||
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
// KIND, either express or implied. See the License for the | ||
// specific language governing permissions and limitations | ||
// under the License. | ||
|
||
#include "parquet/column/scan-all.h" | ||
|
||
namespace parquet { | ||
|
||
int64_t ScanAllValues(int32_t batch_size, int16_t* def_levels, int16_t* rep_levels, | ||
uint8_t* values, int64_t* values_buffered, parquet::ColumnReader* reader) { | ||
switch (reader->type()) { | ||
case parquet::Type::BOOLEAN: | ||
return ScanAll<parquet::BoolReader>( | ||
batch_size, def_levels, rep_levels, values, values_buffered, reader); | ||
case parquet::Type::INT32: | ||
return ScanAll<parquet::Int32Reader>( | ||
batch_size, def_levels, rep_levels, values, values_buffered, reader); | ||
case parquet::Type::INT64: | ||
return ScanAll<parquet::Int64Reader>( | ||
batch_size, def_levels, rep_levels, values, values_buffered, reader); | ||
case parquet::Type::INT96: | ||
return ScanAll<parquet::Int96Reader>( | ||
batch_size, def_levels, rep_levels, values, values_buffered, reader); | ||
case parquet::Type::FLOAT: | ||
return ScanAll<parquet::FloatReader>( | ||
batch_size, def_levels, rep_levels, values, values_buffered, reader); | ||
case parquet::Type::DOUBLE: | ||
return ScanAll<parquet::DoubleReader>( | ||
batch_size, def_levels, rep_levels, values, values_buffered, reader); | ||
case parquet::Type::BYTE_ARRAY: | ||
return ScanAll<parquet::ByteArrayReader>( | ||
batch_size, def_levels, rep_levels, values, values_buffered, reader); | ||
case parquet::Type::FIXED_LEN_BYTE_ARRAY: | ||
return ScanAll<parquet::FixedLenByteArrayReader>( | ||
batch_size, def_levels, rep_levels, values, values_buffered, reader); | ||
default: | ||
parquet::ParquetException::NYI("type reader not implemented"); | ||
} | ||
// Unreachable code, but supress compiler warning | ||
return 0; | ||
} | ||
|
||
} // namespace parquet |
This file contains 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