Skip to content

Commit

Permalink
PARQUET-572: Rename public namespace to parquet from parquet_cpp
Browse files Browse the repository at this point in the history
cc @asandryh @majetideepak let me know if this would be problematic in some way. Thank you

Author: Wes McKinney <wesm@apache.org>

Closes apache#85 from wesm/PARQUET-572 and squashes the following commits:

2aa0803 [Wes McKinney] Rename public namespace to parquet from parquet_cpp, push Thrift into parquet::format

Change-Id: Ic1323ae5aa7f70837d1929930ca88b265c7ce423
  • Loading branch information
wesm committed Mar 28, 2016
1 parent fbb14d9 commit 21ce35a
Show file tree
Hide file tree
Showing 77 changed files with 249 additions and 250 deletions.
4 changes: 2 additions & 2 deletions cpp/src/parquet/column/column-reader-test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ using std::string;
using std::vector;
using std::shared_ptr;

namespace parquet_cpp {
namespace parquet {

using schema::NodePtr;

Expand Down Expand Up @@ -221,4 +221,4 @@ TEST_F(TestPrimitiveReader, TestDictionaryEncodedPages) {
}

} // namespace test
} // namespace parquet_cpp
} // namespace parquet
4 changes: 2 additions & 2 deletions cpp/src/parquet/column/levels-test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

using std::string;

namespace parquet_cpp {
namespace parquet {

void GenerateLevels(int min_repeat_factor, int max_repeat_factor,
int max_level, std::vector<int16_t>& input_levels) {
Expand Down Expand Up @@ -188,4 +188,4 @@ TEST(TestLevels, TestLevelsDecodeMultipleSetData) {
}
}

} // namespace parquet_cpp
} // namespace parquet
4 changes: 2 additions & 2 deletions cpp/src/parquet/column/levels.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#include "parquet/types.h"
#include "parquet/util/rle-encoding.h"

namespace parquet_cpp {
namespace parquet {

class LevelEncoder {
public:
Expand Down Expand Up @@ -165,5 +165,5 @@ class LevelDecoder {
std::unique_ptr<BitReader> bit_packed_decoder_;
};

} // namespace parquet_cpp
} // namespace parquet
#endif // PARQUET_COLUMN_LEVELS_H
8 changes: 4 additions & 4 deletions cpp/src/parquet/column/page.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@
#include "parquet/types.h"
#include "parquet/util/buffer.h"

namespace parquet_cpp {
namespace parquet {

// TODO: Parallel processing is not yet safe because of memory-ownership
// semantics (the PageReader may or may not own the memory referenced by a
// page)
//
// TODO(wesm): In the future Parquet implementations may store the crc code
// in parquet::PageHeader. parquet-mr currently does not, so we also skip it
// in format::PageHeader. parquet-mr currently does not, so we also skip it
// here, both on the read and write path
class Page {
public:
Expand Down Expand Up @@ -168,7 +168,7 @@ class DataPageV2 : public Page {
int32_t repetition_levels_byte_length_;
bool is_compressed_;

// TODO(wesm): parquet::DataPageHeaderV2.statistics
// TODO(wesm): format::DataPageHeaderV2.statistics
};


Expand Down Expand Up @@ -210,6 +210,6 @@ class PageReader {
virtual std::shared_ptr<Page> NextPage() = 0;
};

} // namespace parquet_cpp
} // namespace parquet

#endif // PARQUET_COLUMN_PAGE_H
4 changes: 2 additions & 2 deletions cpp/src/parquet/column/reader.cc
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#include "parquet/encodings/dictionary-encoding.h"
#include "parquet/encodings/plain-encoding.h"

namespace parquet_cpp {
namespace parquet {

ColumnReader::ColumnReader(const ColumnDescriptor* descr,
std::unique_ptr<PageReader> pager, MemoryAllocator* allocator)
Expand Down Expand Up @@ -224,4 +224,4 @@ std::shared_ptr<ColumnReader> ColumnReader::Make(
return std::shared_ptr<ColumnReader>(nullptr);
}

} // namespace parquet_cpp
} // namespace parquet
4 changes: 2 additions & 2 deletions cpp/src/parquet/column/reader.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
#include "parquet/types.h"
#include "parquet/util/mem-allocator.h"

namespace parquet_cpp {
namespace parquet {

class ColumnReader {
public:
Expand Down Expand Up @@ -216,6 +216,6 @@ typedef TypedColumnReader<Type::DOUBLE> DoubleReader;
typedef TypedColumnReader<Type::BYTE_ARRAY> ByteArrayReader;
typedef TypedColumnReader<Type::FIXED_LEN_BYTE_ARRAY> FixedLenByteArrayReader;

} // namespace parquet_cpp
} // namespace parquet

#endif // PARQUET_COLUMN_READER_H
4 changes: 2 additions & 2 deletions cpp/src/parquet/column/scanner-test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ using std::string;
using std::vector;
using std::shared_ptr;

namespace parquet_cpp {
namespace parquet {

using schema::NodePtr;

Expand Down Expand Up @@ -272,4 +272,4 @@ TEST_F(TestFlatFLBAScanner, TestFLBAPrinterNext) {
}

} // namespace test
} // namespace parquet_cpp
} // namespace parquet
4 changes: 2 additions & 2 deletions cpp/src/parquet/column/scanner.cc
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

#include "parquet/column/reader.h"

namespace parquet_cpp {
namespace parquet {

std::shared_ptr<Scanner> Scanner::Make(std::shared_ptr<ColumnReader> col_reader,
int64_t batch_size, MemoryAllocator* allocator) {
Expand Down Expand Up @@ -51,4 +51,4 @@ std::shared_ptr<Scanner> Scanner::Make(std::shared_ptr<ColumnReader> col_reader,
return std::shared_ptr<Scanner>(nullptr);
}

} // namespace parquet_cpp
} // namespace parquet
4 changes: 2 additions & 2 deletions cpp/src/parquet/column/scanner.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
#include "parquet/types.h"
#include "parquet/util/mem-allocator.h"

namespace parquet_cpp {
namespace parquet {

static constexpr int64_t DEFAULT_SCANNER_BATCH_SIZE = 128;

Expand Down Expand Up @@ -243,6 +243,6 @@ typedef TypedScanner<Type::DOUBLE> DoubleScanner;
typedef TypedScanner<Type::BYTE_ARRAY> ByteArrayScanner;
typedef TypedScanner<Type::FIXED_LEN_BYTE_ARRAY> FixedLenByteArrayScanner;

} // namespace parquet_cpp
} // namespace parquet

#endif // PARQUET_COLUMN_SCANNER_H
4 changes: 2 additions & 2 deletions cpp/src/parquet/column/test-util.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
using std::vector;
using std::shared_ptr;

namespace parquet_cpp {
namespace parquet {

namespace test {

Expand Down Expand Up @@ -457,6 +457,6 @@ static int MakePages(const ColumnDescriptor *d, int num_pages, int levels_per_pa

} // namespace test

} // namespace parquet_cpp
} // namespace parquet

#endif // PARQUET_COLUMN_TEST_UTIL_H
4 changes: 2 additions & 2 deletions cpp/src/parquet/compression/codec-test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
using std::string;
using std::vector;

namespace parquet_cpp {
namespace parquet {

template <typename T>
void CheckCodecRoundtrip(const vector<uint8_t>& data) {
Expand Down Expand Up @@ -83,4 +83,4 @@ TEST(TestCompressors, GZip) {
CheckCodec<GZipCodec>();
}

} // namespace parquet_cpp
} // namespace parquet
4 changes: 2 additions & 2 deletions cpp/src/parquet/compression/codec.cc
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#include "parquet/exception.h"
#include "parquet/types.h"

namespace parquet_cpp {
namespace parquet {

std::unique_ptr<Codec> Codec::Create(Compression::type codec_type) {
std::unique_ptr<Codec> result;
Expand All @@ -44,4 +44,4 @@ std::unique_ptr<Codec> Codec::Create(Compression::type codec_type) {
return result;
}

} // namespace parquet_cpp
} // namespace parquet
4 changes: 2 additions & 2 deletions cpp/src/parquet/compression/codec.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#include "parquet/exception.h"
#include "parquet/types.h"

namespace parquet_cpp {
namespace parquet {

class Codec {
public:
Expand Down Expand Up @@ -121,6 +121,6 @@ class GZipCodec : public Codec {
bool decompressor_initialized_;
};

} // namespace parquet_cpp
} // namespace parquet

#endif
4 changes: 2 additions & 2 deletions cpp/src/parquet/compression/gzip-codec.cc
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#include "parquet/compression/codec.h"
#include "parquet/exception.h"

namespace parquet_cpp {
namespace parquet {

// These are magic numbers from zlib.h. Not clear why they are not defined
// there.
Expand Down Expand Up @@ -187,4 +187,4 @@ int64_t GZipCodec::Compress(int64_t input_length, const uint8_t* input,
return output_length - stream_.avail_out;
}

} // namespace parquet_cpp
} // namespace parquet
4 changes: 2 additions & 2 deletions cpp/src/parquet/compression/lz4-codec.cc
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#include "parquet/compression/codec.h"
#include "parquet/exception.h"

namespace parquet_cpp {
namespace parquet {

void Lz4Codec::Decompress(int64_t input_len, const uint8_t* input,
int64_t output_len, uint8_t* output_buffer) {
Expand All @@ -42,4 +42,4 @@ int64_t Lz4Codec::Compress(int64_t input_len, const uint8_t* input,
reinterpret_cast<char*>(output_buffer), input_len);
}

} // namespace parquet_cpp
} // namespace parquet
6 changes: 3 additions & 3 deletions cpp/src/parquet/compression/snappy-codec.cc
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@
#include "parquet/compression/codec.h"
#include "parquet/exception.h"

namespace parquet_cpp {
namespace parquet {

void SnappyCodec::Decompress(int64_t input_len, const uint8_t* input,
int64_t output_len, uint8_t* output_buffer) {
if (!snappy::RawUncompress(reinterpret_cast<const char*>(input),
static_cast<size_t>(input_len), reinterpret_cast<char*>(output_buffer))) {
throw parquet_cpp::ParquetException("Corrupt snappy compressed data.");
throw parquet::ParquetException("Corrupt snappy compressed data.");
}
}

Expand All @@ -45,4 +45,4 @@ int64_t SnappyCodec::Compress(int64_t input_len, const uint8_t* input,
return output_len;
}

} // namespace parquet_cpp
} // namespace parquet
6 changes: 3 additions & 3 deletions cpp/src/parquet/encodings/decoder.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@
#include "parquet/types.h"
#include "parquet/util/mem-allocator.h"

namespace parquet_cpp {
namespace parquet {

class ColumnDescriptor;

// The Decoder template is parameterized on parquet_cpp::Type::type
// The Decoder template is parameterized on parquet::Type::type
template <int TYPE>
class Decoder {
public:
Expand Down Expand Up @@ -65,6 +65,6 @@ class Decoder {
int num_values_;
};

} // namespace parquet_cpp
} // namespace parquet

#endif // PARQUET_ENCODINGS_DECODER_H
4 changes: 2 additions & 2 deletions cpp/src/parquet/encodings/delta-bit-pack-encoding.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#include "parquet/util/bit-stream-utils.inline.h"
#include "parquet/util/buffer.h"

namespace parquet_cpp {
namespace parquet {

template <int TYPE>
class DeltaBitPackDecoder : public Decoder<TYPE> {
Expand Down Expand Up @@ -119,6 +119,6 @@ class DeltaBitPackDecoder : public Decoder<TYPE> {

int32_t last_value_;
};
} // namespace parquet_cpp
} // namespace parquet

#endif
4 changes: 2 additions & 2 deletions cpp/src/parquet/encodings/delta-byte-array-encoding.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#include "parquet/encodings/delta-length-byte-array-encoding.h"
#include "parquet/encodings/delta-bit-pack-encoding.h"

namespace parquet_cpp {
namespace parquet {

class DeltaByteArrayDecoder : public Decoder<Type::BYTE_ARRAY> {
public:
Expand Down Expand Up @@ -77,6 +77,6 @@ class DeltaByteArrayDecoder : public Decoder<Type::BYTE_ARRAY> {
ByteArray last_value_;
};

} // namespace parquet_cpp
} // namespace parquet

#endif
4 changes: 2 additions & 2 deletions cpp/src/parquet/encodings/delta-length-byte-array-encoding.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#include "parquet/encodings/decoder.h"
#include "parquet/encodings/delta-bit-pack-encoding.h"

namespace parquet_cpp {
namespace parquet {

class DeltaLengthByteArrayDecoder : public Decoder<Type::BYTE_ARRAY> {
public:
Expand Down Expand Up @@ -66,6 +66,6 @@ class DeltaLengthByteArrayDecoder : public Decoder<Type::BYTE_ARRAY> {
int len_;
};

} // namespace parquet_cpp
} // namespace parquet

#endif
4 changes: 2 additions & 2 deletions cpp/src/parquet/encodings/dictionary-encoding.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
#include "parquet/util/mem-pool.h"
#include "parquet/util/rle-encoding.h"

namespace parquet_cpp {
namespace parquet {

template <int TYPE>
class DictionaryDecoder : public Decoder<TYPE> {
Expand Down Expand Up @@ -441,6 +441,6 @@ inline int DictEncoderBase::WriteIndices(uint8_t* buffer, int buffer_len) {
return 1 + encoder.len();
}

} // namespace parquet_cpp
} // namespace parquet

#endif
4 changes: 2 additions & 2 deletions cpp/src/parquet/encodings/encoder.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#include "parquet/exception.h"
#include "parquet/types.h"

namespace parquet_cpp {
namespace parquet {

class ColumnDescriptor;
class OutputStream;
Expand Down Expand Up @@ -52,6 +52,6 @@ class Encoder {
MemoryAllocator* allocator_;
};

} // namespace parquet_cpp
} // namespace parquet

#endif // PARQUET_ENCODINGS_ENCODER_H
4 changes: 2 additions & 2 deletions cpp/src/parquet/encodings/encoding-test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
using std::string;
using std::vector;

namespace parquet_cpp {
namespace parquet {

namespace test {

Expand Down Expand Up @@ -311,4 +311,4 @@ TEST(TestDictionaryEncoding, CannotDictDecodeBoolean) {

} // namespace test

} // namespace parquet_cpp
} // namespace parquet
Loading

0 comments on commit 21ce35a

Please sign in to comment.