Commit Graph
19 Commits
Author SHA1 Message Date
Uwe L. Korn 4fe873e58e ARROW-4903: [C++] Fix static/shared-only builds
This also add two new docker configurations (`cpp-static-only` and `cpp-shared-only`) to test for these issues.

This should also fix https://issues.apache.org/jira/browse/ARROW-4848

Author: Uwe L. Korn <uwelk@xhochy.com>

Closes #3928 from xhochy/ARROW-4903 and squashes the following commits:

a8070e35f <Uwe L. Korn> clang-format
20b779525 <Uwe L. Korn> cmake-format
d16900d2b <Uwe L. Korn> ARROW-4903:  Fix static/shared-only builds
2019-03-16 18:12:33 -05:00
Wes McKinney 73f94c93d7 ARROW-3762: [C++/Python] Support reading Parquet BYTE_ARRAY columns containing over 2GB of data
This patch ended up being a bit more of a bloodbath than I planned: please accept my apologies.

Associated changes in this patch:

* Split up builder.h/builder.cc into a new arrow/array directory. Public arrow/builder.h API preserved. I think this code is going to keep growing more specialized components, so I think we should get out ahead of it by having a subdirectory to contain files related to implementation details
* Implement ChunkedBinaryBuilder, ChunkedStringBuilder classes, add tests and benchmarks
* Deprecate parquet::arrow methods returning Array
* Allow implicit construction of Datum from its variant types (makes for a lot nicer syntax)

As far as what code to review, focus efforts on

* src/parquet/arrow
* src/arrow/array/builder_binary.h/cc, array-binary-test.cc, builder-benchmark
* src/arrow/compute changes
* Python changes

I'm going to tackle ARROW-2970 which should not be complicated after this patch; I will submit that as a PR after this is reviews and merged.

Author: Wes McKinney <wesm+git@apache.org>

Closes #3171 from wesm/ARROW-3762 and squashes the following commits:

822451280 <Wes McKinney> Fix int conversion warning on Windows
695ffc9df <Wes McKinney> Remove unimplemented and unused ChunkedBinaryBuilder ctor
5a525115c <Wes McKinney> Use strnlen to compute string length. Inline BinaryBuilder::AppendNextOffset
b90eb4b71 <Wes McKinney> Restore sstream include to pretty_print.cc
3669201be <Wes McKinney> Fix deprecated API use
5fdbbb261 <Wes McKinney> Rename columnar/ directory to array/
8ffaec1ef <Wes McKinney> Address preliminary code comments. Check in missing files
81e787c69 <Wes McKinney> Fix up Python bindings, unit test
2efae064c <Wes McKinney> Finish scaffolding. Get fully compiling again and original parquet-arrow test suite passing
3d075e4aa <Wes McKinney> Additional refactoring to make things chunked. Allow implicit construction of arrow::compute::Datum
922811278 <Wes McKinney> More refactoring
716322377 <Wes McKinney> Split up builder.h, builder.cc into smaller headers, compilation units. add failing test case for ARROW-3762. Add ChunkedBinaryBuilder, make BinaryBuilder Append methods inline
2018-12-14 14:49:12 -06:00
François Saint-Jacques 7ddfba6693 ARROW-3470: [C++] Fix row-wise example
- Implement the `ADD_EXAMPLE` cmake function with new ctest label
  `example`, also covered by the `runexample` target. This can be
  toggled via the `ARROW_BUILD_EXAMPLES` option which is ON by default.
- Implement fully working `row-wise-conversion-example.cc` and add it to
  the default build.
- Update documentation to embed (manually) the newly created example.

Author: François Saint-Jacques <fsaintjacques@gmail.com>

Closes #3078 from fsaintjacques/ARROW-3470-out-of-date-example and squashes the following commits:

fab63f6f <François Saint-Jacques> ARROW-3470: Fix status macro
1eba067d <François Saint-Jacques> ARROW-3470:  Fix row-wise example
2018-12-12 19:54:45 +01:00
Wes McKinney e453f5c6e0 ARROW-3898: [Example] parquet-arrow example has compilation errors
When compiling example, reader-writer.cc, it shows following compilation errors:

no member named 'cout' in namespace 'std'

  PARQUET_THROW_NOT_OK(arrow::PrettyPrint(*array, 4, &std::cout));

in multiple places.

Fix:
Add the #include<iostream>
Test:
make passed

Author: Wes McKinney <wesm+git@apache.org>
Author: wangmiao1981 <wm624@hotmail.com>

Closes #3049 from wangmiao1981/example and squashes the following commits:

ecca664a2 <Wes McKinney> Build all examples in examples/parquet when PARQUET_BUILD_EXAMPLES=ON
64d51b214 <wangmiao1981> add include file
2018-12-01 21:52:41 -06:00
Wes McKinney 723a437802 PARQUET-1427: [C++] Incorporate with build system, parquet target. Fix
parquet-arrow example per repo changes

Change-Id: I17239a300b376b0b7bcf7dead0fc1ac758af2206
2018-09-27 07:32:53 -04:00
Deepak Majeti 074915450a PARQUET-1372: Add an API to allow writing RowGroups based on size
I split the changes into multiple commits to ease the review.
Used the example program to test the new API.
I will add unit tests once we converge on the API after review.
Thanks to @anatolishein for collaborating with the API design.

Author: Deepak Majeti <deepak.majeti@hpe.com>

Closes #484 from majetideepak/PARQUET-1372 and squashes the following commits:

143ed51 [Deepak Majeti] improve comments
c10fe08 [Deepak Majeti] Add test
d12b10b [Deepak Majeti] Review comments
cb99b3f [Deepak Majeti] fix compiler warnings
e179a4c [Deepak Majeti] add example header
710bbe0 [Deepak Majeti] clang format
9e03004 [Deepak Majeti] reorg examples
410a3af [Deepak Majeti] remove flush_on_close
e148817 [Deepak Majeti] add BufferedPageWriter
26a52c1 [Deepak Majeti] clang format
20049c0 [Deepak Majeti] modify examples
9db26a2 [Deepak Majeti] Combine RowGroupWriter2 with RowGroupWriter
cb7d69c [Deepak Majeti] fix compiler errors
21642b3 [Deepak Majeti] clang format
530b835 [Deepak Majeti] example for RowGroupWriter2
0fc1f5c [Deepak Majeti] Extend Column Writer to flush pages on Close
f2f420d [Deepak Majeti] RowGroupWriter2, implementation that writes all columns at once

Change-Id: I749cbde733780c9a6499df6738b2236124b8a9f7
2018-08-25 13:33:35 +02:00
Uwe L. Korn 3a9dbdf467 PARQUET-1196: Example parquet_arrow project
Depends on https://github.com/apache/parquet-cpp/pull/434

Author: Uwe L. Korn <uwelk@xhochy.com>
Author: Korn, Uwe <Uwe.Korn@blue-yonder.com>

Closes #436 from xhochy/PARQUET-1196 and squashes the following commits:

a938da7 [Uwe L. Korn] Check Status for PrettyPrint
15d62f3 [Uwe L. Korn] PARQUET-1196: Example parquet_arrow project
1280fd5 [Korn, Uwe] PARQUET-1200: Support reading a single Arrow column from a Parquet file

Change-Id: I907f2276b319491f6e02117f4a21ab2383006a99
2018-02-15 18:42:22 +01:00
Wes McKinney eefd36eba3 PARQUET-1177: Add PARQUET_BUILD_WARNING_LEVEL option and more rigorous Clang warnings
These warnings will catch a number of things that have bitten us in the past, like missing virtual destructors. This brings Parquet's compiler warnings up to the same quality as Arrow's

Author: Wes McKinney <wes.mckinney@twosigma.com>
Author: Wes McKinney <wesmckinn@gmail.com>

Closes #425 from wesm/PARQUET-1177 and squashes the following commits:

3769a8c [Wes McKinney] Add -Wno-missing-noreturn
5b6cd80 [Wes McKinney] Compile with /bigobj in MSVC
cc5bca0 [Wes McKinney] Add noreturn to static methods in ParquetException
e3ffb71 [Wes McKinney] Fix -Wconversion warnings in decode_benchmark.cc
758a216 [Wes McKinney] Fix warnings on macOS Clang
3aef3b4 [Wes McKinney] Do not pass -Werror via PARQUET_CXXFLAGS
5a98e81 [Wes McKinney] Fix usage of PrimitiveArray::raw_values
c848855 [Wes McKinney] Fix compiler warnings with gcc 4.9
ca9a374 [Wes McKinney] Add SetupCxxFlags.cmake from Apache Arrow. Add PARQUET_BUILD_WARNING_LEVEL flag. Fix Clang compiler warnings

Change-Id: I428d1d90bc4eb3dab8b56a538d1eb58656664b74
2017-12-13 17:19:22 -05:00
Wes McKinney d02cd9d0e3 PARQUET-1068: Modify .clang-format to use straight Google format with 90-character line width
The main change is horizontal alignment. We should also do a clang-tidy pass sometime to do some further scrubbing

Author: Wes McKinney <wes.mckinney@twosigma.com>

Closes #375 from wesm/PARQUET-1068 and squashes the following commits:

b81145d [Wes McKinney] Modify .clang-format to use straight Google format with 90-character line width

Change-Id: If8345d1d2a03d785ed41a5848de2c40e4bf53b5b
2017-07-31 11:14:52 -04:00
Phillip Cloud 09cd54540c PARQUET-1053: Fix unused result warnings due to unchecked Statuses
Author: Phillip Cloud <cpcloud@gmail.com>

Closes #369 from cpcloud/PARQUET-1053 and squashes the following commits:

e0598b4 [Phillip Cloud] PARQUET-1053: Fix unused result warnings due to unchecked Statuses

Change-Id: I91d267f56685c0e1267b6069c5bff52f2a1eca15
2017-07-10 22:03:25 -04:00
Deepak Majeti 80dc883630 PARQUET-1048: Apache Arrow static transitive dependencies
Author: Deepak Majeti <deepak.majeti@hpe.com>

Closes #367 from majetideepak/PARQUET-1048 and squashes the following commits:

42635f2 [Deepak Majeti] try another script
bb96b28 [Deepak Majeti] disable boost shared
b3a0e75 [Deepak Majeti] enable mem check
db50b65 [Deepak Majeti] build arrow shared only if parquet shared is specified
5fe857e [Deepak Majeti] Remove mem check
68f8c59 [Deepak Majeti] Fix Arrow visibility warnings
0bbd073 [Deepak Majeti] add env vars
e4406ab [Deepak Majeti] Add static linking for travis ci
032c8c7 [Deepak Majeti] Fix linking of benchmarks and examples
bdb5b2f [Deepak Majeti] Add Arrow lib transitive dependencies

Change-Id: I7869ce951e2087d713775787b5239921ada43da0
2017-07-10 19:40:10 +02:00
Wes McKinney 4d21fd36f9 PARQUET-1029: [C++] Some extern template symbols not being exported in gcc
Extern template visibility contributes to be a mystery to me, but this fixes the regression from PARQUET-991.

cc @saatvikshah1994

Author: Wes McKinney <wes.mckinney@twosigma.com>

Closes #352 from wesm/PARQUET-1029 and squashes the following commits:

3f52852 [Wes McKinney] Some extern template symbols not being exported in gcc

Change-Id: Icd71f67290c25de8f9fc38153b48a70e20bfa438
2017-06-14 10:31:14 -04:00
Max Risuhin 67f84a997d PARQUET-991: Resolve msvc warnings; Appveyor treats msvc warnings as …
…errors (/WX flag)

Author: Max Risuhin <risuhin.max@gmail.com>

Closes #340 from MaxRis/PARQUET-991 and squashes the following commits:

98a2544 [Max Risuhin] PARQUET-991: Resolve msvc warnings; Appveyor treats msvc warnings as errors (/WX flag)

Change-Id: I8fe6ca37debbd3b300e7aa51c5d015da11ecf79d
2017-05-29 15:55:59 -04:00
Wes McKinney 3e150214ec PARQUET-595: API for KeyValue metadata
This supersedes #309 and incorporates the `std::shared_ptr<const KeyValueMetadata>` pattern so less copying is needed in Parquet for metadata inbound from Arrow (and vice versa).

close #309

Author: Wes McKinney <wes.mckinney@twosigma.com>
Author: Phillip Cloud <cpcloud@gmail.com>

Closes #314 from wesm/PARQUET-595 and squashes the following commits:

c0199c5 [Wes McKinney] Remove some more std::string includes
3d3be4e [Wes McKinney] Remove string include
b2ed09e [Wes McKinney] Add backwards compatible schema APIs
116575a [Wes McKinney] Use std::shared_ptr<const KeyValueMetadata> from upstream Arrow
5116eaa [Phillip Cloud] Add support for reading/writing Schema-level Arrow metadata

Change-Id: Ib46a73ac77cc952b032f0f93ee3297808b9f959e
2017-04-29 13:57:50 -04:00
Deepak Majeti 4b444c6269 PARQUET-909: Reduce buffer allocations (mallocs) on critical path
Author: Deepak Majeti <deepak.majeti@hpe.com>

Closes #268 from majetideepak/ReuseBuffers and squashes the following commits:

bbf5453 [Deepak Majeti] Review comments
4d93d4b [Deepak Majeti] Improve example
3a3e2bb [Deepak Majeti] Fix Resize shrink_to_fit
53c8ac1 [Deepak Majeti] Improve API
22f422f [Deepak Majeti] clang format
8ae02cc [Deepak Majeti] optimize for uncompressed data
3190cef [Deepak Majeti] change fit_to_size of InMemoryOutputStream
03d4862 [Deepak Majeti] clang format
261aa1c [Deepak Majeti] Rewrite Compress API
b09c4a8 [Deepak Majeti] Reuse uncompressed_data buffer
6b9a81b [Deepak Majeti] Clang fromat
31af602 [Deepak Majeti] Reuse levels rle buffer
82eabfb [Deepak Majeti] Re-use def and rep levels sink
edc8e3c [Deepak Majeti] Add API to InMemoryOutputStream

Change-Id: I77483a383043d590936b42c06d425fbdc1edf9fc
2017-03-17 18:07:59 -04:00
Wes McKinney 22a96d9a69 PARQUET-892: Specify public link targets for parquet_static so that transitive dependencies are linked in executables
Author: Wes McKinney <wes.mckinney@twosigma.com>

Closes #259 from wesm/PARQUET-892 and squashes the following commits:

1e932c4 [Wes McKinney] Specify public link targets for parquet_static so that transitive dependencies are linked in executables

Change-Id: Ib0bea0cd272919dffa82aa1c12d7658ea15d9cb5
2017-02-23 09:22:06 +01:00
Wes McKinney 58ad1a8b68 PARQUET-807: Allow user to retain ownership of parquet::FileMetaData.
Also implements PARQUET-808: opening file with existing metadata object.

This allows a user to create a reader only for the purposes of obtaining the metadata.

Do you all think it's worth having a convenience method for reading the metadata out of a file?

Author: Wes McKinney <wes.mckinney@twosigma.com>

Closes #213 from wesm/PARQUET-807 and squashes the following commits:

c1b5c7c [Wes McKinney] Use ReadMetaData function in test
d382cca [Wes McKinney] Add note about ARROW-455
05ecd37 [Wes McKinney] Implement/test opening with provided metadata. Do not close Arrow output files automatically
d790bb5 [Wes McKinney] Tweak
0dd4184 [Wes McKinney] Add ReadMetaData convenience method
97527ba [Wes McKinney] Change FileMetaData in ParquetFileReader to a shared_ptr so that ownership can be transferred away

Change-Id: Ic76c48671b41816d3dc1ebb736eb5a06c907c95d
2017-01-05 12:19:31 -05:00
Wes McKinney 713c6cda9f PARQUET-818: Refactoring to utilize common IO, buffer, memory management abstractions and implementations
This refactoring is a bit of a bloodbath, but I've attempted to preserve as much API backwards compatibility as possible.

Several points

* Arrow does not use exceptions, so will need to be very careful about making sure that no Status goes unchecked. I've tried to get most of them, but might have missed some
* parquet-cpp still exposes an abstract file read and write API as before, but this makes it easy to pass in an Arrow file handle (e.g. HDFS, OS files, memory maps, etc.)
* Custom memory allocators will need to subclass `arrow::MemoryPool` instead. If this becomes onerous for some reason, we can try to find alternatives, but basically it's the exact same class as `parquet::MemoryAllocator`

Does not require any upstream changes in Arrow.

Author: Wes McKinney <wes.mckinney@twosigma.com>

Closes #210 from wesm/arrow-consolidation and squashes the following commits:

ef81084 [Wes McKinney] Configurable Arrow linkage. Slight .travis.yml cleaning
50b44f0 [Wes McKinney] Make some const refs
8438f86 [Wes McKinney] Revert ParquetFileReader::Open to use std::unique_ptr<RandomAccessFile>
671d981 [Wes McKinney] Actually tee output to console
ca8df13 [Wes McKinney] Do not hide test output from travis logs
f516115 [Wes McKinney] Add public link libs to dependencies to avoid race conditions with external projects
414c75f [Wes McKinney] README cleanups
be1acb5 [Wes McKinney] Move thirdparty ep's / setup to separate cmake module
46342ea [Wes McKinney] Remove unneeded ParquetAllocator interface, cleaning
b546f08 [Wes McKinney] Use MemoryAllocator alias within parquet core
8c1226d [Wes McKinney] Add Arrow to list of third party deps. Needs to be added to thirdparty
f9d8a2a [Wes McKinney] Check some unchecked Statuses
0d04820 [Wes McKinney] Fix benchmark builds. Do not fail in benchmarks if gtest.h is included due to <tr1/tuple> issue
ee312af [Wes McKinney] cpplint
6a05cd9 [Wes McKinney] Update installed header files
8d962f1 [Wes McKinney] Build and unit tests pass again
c82e2b4 [Wes McKinney] More refactoring
6ec5b71 [Wes McKinney] Re-expose original abstract IO interfaces, add Arrow subclasses that wrap inptu
c320c95 [Wes McKinney] clang-format
f10080c [Wes McKinney] Fix missed include
6ade22f [Wes McKinney] First cut refactoring, not fully compiling yet

Change-Id: Ibc4238396c035e185346c2562a0c6dc029c254ff
2016-12-30 11:36:05 -05:00
Deepak Majeti de3f844000 PARQUET-702: Add a writer + reader example with detailed comments
1. Added a reader writer example.
    -  Covered all the physical types supported by Parquet.

Author: Deepak Majeti <deepak.majeti@hpe.com>

Closes #187 from majetideepak/readerwriterexample and squashes the following commits:

c7061d9 [Deepak Majeti] review comments
d075ec5 [Deepak Majeti] Use Typed Writer and Reader
7c2357c [Deepak Majeti] Review comments
616ccdb [Deepak Majeti] add Optional and repetition fields
3bb2b08 [Deepak Majeti] clang format
0eea968 [Deepak Majeti] Parquet Reader Writer example

Change-Id: I50da1d9924451fe3f84a1a20917cf6b7f42e93f9
2016-11-15 21:13:30 +01:00