Commit Graph
1975 Commits
Author SHA1 Message Date
Wes McKinney f65c9cf5bf ARROW-5495: [C++] Update some dependency URLs from http to https
HTTPS is more secure.

I will leave this patch up in case anyone else wants to look for HTTP URLs to change to HTTPS. It's a bit hard to find them because of the `http://` in the Apache license header. Maybe we should change our Apache license headers to use https?

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

Closes #4463 from wesm/use-https and squashes the following commits:

6ee7a4ef4 <Wes McKinney> Update some URLs from http to https
2019-06-06 13:28:22 +02:00
Yurui Zhou ec6879b764 ARROW-4714: [C++][JAVA] Providing JNI interface to Read ORC file via Arrow C++
- setup necessary dev environment for JNI development on JAVA and C++ codebase
- implemented JNI interface to enable reading arrow record batch from ORC files
- implemented a naive arrow buffer reference manager to ensure c++ memory release

Author: Yurui Zhou <yurui.zyr@alibaba-inc.com>

Closes #4348 from yuruiz/JniOrcReader and squashes the following commits:

41592bf04 <Yurui Zhou> minor doc fix
44b54203b <Yurui Zhou> make sure lookup operation are performed under lock
706c8dcd5 <Yurui Zhou> resolve comments
de8529cf1 <Yurui Zhou> resolve comments
fc801756d <Yurui Zhou> resolve comments
9b04b762d <Yurui Zhou> fix style issues and add proper docs
9b13d7f62 <Yurui Zhou> replace nullptr with NULLPTR macro
dd981af5f <Yurui Zhou> fix lint and clang-format
44505df5d <Yurui Zhou> Fix cmake format
f2a0c04b8 <Yurui Zhou> destruct schema reader when finish reading
4f89e3454 <Yurui Zhou> Make sure resources are properly released.
26d74db82 <Yurui Zhou> fix minor style check error
ce30933b1 <Yurui Zhou> Add Arrow Jni Reader Unittests
7a80fbd0d <Yurui Zhou> Minor refactor
e4c063041 <Yurui Zhou> remove redundant code
e932aa8b1 <Yurui Zhou> Move jni code to src/jni and change build flag to arrow_jni
1b6a7042a <Yurui Zhou> Interface refactor and performance optimization
3604c24d3 <Yurui Zhou> Resolve merge conflicts
1c0e0b2a5 <Yurui Zhou> Fix minor build errors
e0d9c1f29 <Yurui Zhou> implement JNI interface on both size
a1e80a6dd <Yurui Zhou> Add arrow-orc setup
2019-06-06 02:28:51 -07:00
François Saint-Jacques a2ef7d9ab4 ARROW-4990: [C++] Support Array-Array comparison
Comparison only supported for the left argument to be an array and the right argument a scalar. This extends support for comparing two arrays, but also supporting the case where the left argument is a scalar and the right an array.

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

Closes #4398 from fsaintjacques/ARROW-4990-compare-array-array and squashes the following commits:

864c67966 <François Saint-Jacques> Conform style guide
1402a98ee <François Saint-Jacques> Address review
b498eddc9 <François Saint-Jacques> mvcc again
c427313e8 <François Saint-Jacques> Make mvcc happy
56e467725 <François Saint-Jacques> autoformat
f6f5274fb <François Saint-Jacques> Supports comparison of Arrays
8643411d5 <François Saint-Jacques> Add binary operation support to PropagateNulls
53703acdd <François Saint-Jacques> Add length() to Datum.
2019-06-05 17:55:31 -07:00
Antoine Pitrou f22aee6063 ARROW-5507: [Plasma] [CUDA] Fix compile error
Author: Antoine Pitrou <antoine@python.org>

Closes #4468 from pitrou/ARROW-5507-plasma-cuda-compile-error and squashes the following commits:

66387d290 <Antoine Pitrou> ARROW-5507:   Fix compile error
2019-06-04 16:59:36 +02:00
Antoine Pitrou 6727f90ddf ARROW-5334: [C++] Ensure all type classes end with "Type"
This is for consistency and also for readability ("Integer" or "Number" do not explicitly stand out as *type* classes or instances).

Author: Antoine Pitrou <antoine@python.org>

Closes #4470 from pitrou/ARROW-5334-type-classes-type-suffix and squashes the following commits:

e55a372d9 <Antoine Pitrou> ARROW-5334:  Ensure all type classes end with "Type"
2019-06-04 16:47:21 +02:00
shengjun.li 135b5e3538 ARROW-5285: [C++][Plasma] Implement to release GpuProcessHandle
Author: shengjun.li <shengjun.li@zilliz.com>

Closes #4277 from shengjun1985/gpu and squashes the following commits:

7207ed769 <shengjun.li> ARROW-5285:  implement to release GpuProcessHandle
2019-06-04 15:40:30 +02:00
Brian Hulette 40f876bbb3 ARROW-5491: [C++] Remove unecessary semicolons following MACRO definitions
To be honest I'm not sure how these semicolons aren't causing an issue currently. Either way, removing them seems like a noop and improves clarity in my opinion.

Author: Brian Hulette <bhulette@google.com>

Closes #4422 from TheNeuralBit/semicolon and squashes the following commits:

af8c0a1e8 <Brian Hulette> remove semicolons after macro definitions
2019-06-03 20:56:21 -07:00
Sutou Kouhei 12ed730a31 ARROW-5498: [C++][CI] Fix Flatbuffers related error with MinGW
We should send a pull request that adds -DCMAKE_BUILD_TYPE=Release to
https://github.com/msys2/MINGW-packages/blob/master/mingw-w64-flatbuffers/PKGBUILD
.

Author: Sutou Kouhei <kou@clear-code.com>

Closes #4465 from kou/cpp-appveyor-flatbuffers and squashes the following commits:

76f49a6a6 <Sutou Kouhei>  Fix Flatbuffers related error with MinGW
2019-06-03 20:38:38 -05:00
Sutou Kouhei b6f597999f ARROW-5477: [C++] Check required RapidJSON version
Author: Sutou Kouhei <kou@clear-code.com>

Closes #4447 from kou/cpp-rapidjson-version-check and squashes the following commits:

3271d8769 <Sutou Kouhei>  Check required RapidJSON version
2019-06-03 16:46:10 -05:00
Micah Kornfield cdedd85f9c ARROW-5365: [C++][CI] Enable ASAN/UBSAN in CI
This enables ASAN/UBSAN in the clang builds.  Pushing this for PR early to see if there are any comments on approach or additional checks to remove (the first two fixes where related to passing null values to memcpy).

Note the UBSAN behavior should already be configured to exclude unaligned pointer errors (I'll file a separate JIRA for fixing those).

Remaining for this PR:
* [X] Try to fix as many UBSAN/ASAN errors as possible (going to time box this to a week), and then blacklist the rest with a follow-up JIRA

CC @wesm @pitrou in case you have any early feedback

Author: Micah Kornfield <emkornfield@gmail.com>

Closes #4347 from emkornfield/use_asan and squashes the following commits:

bba5824c4 <Micah Kornfield> fix io/memory.cc asan
19ee908d7 <Micah Kornfield> handle signed and unsigned enum loading in parquet to support windows
dc300d4cb <Micah Kornfield> add back asan
05467be2f <Micah Kornfield> ubsan stuff
2019-06-03 12:05:35 -05:00
Sutou Kouhei d8bf1948ff ARROW-5256: [C++] Add support for LLVM 7.1
LLVM 7.1.0 was released to fix https://llvm.org/PR39427 . It needs
ABI breakage. So 7.1.0 isn't 7.0.2. No other big changes exist between 7.1.0
and 7.0.1. So we can support both LLVM 7.1 and 7.0.

LLVM 7.1.0 is tested in building deb packages. Changed under
dev/tasks/linux-packages/ are for running test in building deb
packages.

We can't run tests for deb packages of Ubuntu 16.04. Because Ubuntu 16.04's
packages are old. So dev/tasks/linux-packages/debian.ubuntu-xenial/ is created.
It's based on dev/tasks/linux-packages/debian/ before we change.

Author: Sutou Kouhei <kou@clear-code.com>

Closes #4453 from kou/cpp-llvm-7.1 and squashes the following commits:

6dbb9f3be <Sutou Kouhei>  Add support for LLVM 7.1
2019-06-03 11:35:18 -05:00
John Muehlhausen 7bd9ad236d ARROW-5395: [C++] Utilize stream EOS in File format
We currently do not write EOS at the end of a Message stream inside the File format.  As a result, the file cannot be parsed sequentially.  This change prepares for other implementations or future reference features that parse a File sequentially... i.e. without access to seek().

Author: John Muehlhausen <jmuehlhausen@kershnertrading.com>

Closes #4372 from jgm-ktg/master and squashes the following commits:

2ce546cc3 <John Muehlhausen> remove JS/Java for separate JIRA issues
350177829 <John Muehlhausen> ARROW-5395: Python test case
9e83053d0 <John Muehlhausen> incorporate first suggestions for writing EOS in File
901dfeab0 <John Muehlhausen> ARROW-5395: Utilize stream EOS in File format
2019-06-03 10:22:50 -05:00
Wes McKinney 10ed2565c3 ARROW-4504: [C++] Reduce number of C++ unit test executables from 128 to 82
This yields approximately 15% net improvement in build time when building with msbuild and `/MP` on a quad-core desktop. Parallel test execution times on Linux/macOS should be unaffected -- I took care to only combine executables where it made sense and where execution time was already very fast (100s of milliseconds or less)

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

Closes #4442 from wesm/ARROW-4504 and squashes the following commits:

35b81f63a <Wes McKinney> Revert changes to io/CMakeLists.txt
19beb21b7 <Wes McKinney> Merge unit test objects to get down to 78 unit tests total
2019-06-03 10:21:25 -05:00
Robin Kåveland Hansen 5f84c9c713 ARROW-5430: [Python] Raise ArrowInvalid for pyints larger than int64
Previously, this case would cause ArrowException: Unknown error, but ArrowInvalid makes more sense and is more likely to be dealt with by callers of pyarrow.array.

Author: Robin Kåveland Hansen <Robin.Kaveland.Hansen@posten.no>

Closes #4440 from kaaveland/master and squashes the following commits:

b95aa0253 <Robin Kåveland Hansen> ARROW-5430:  Raise ArrowInvalid for pyints larger than int64
2019-06-03 16:12:21 +02:00
Antoine Pitrou 518df0c149 ARROW-2835: [C++] Make file position undefined after ReadAt()
Seeking is required when calling an implicitly-positioned operation such as Read() after ReadAt().

Author: Antoine Pitrou <antoine@python.org>

Closes #4417 from pitrou/ARROW-2835-read-at-seek and squashes the following commits:

d74c60eea <Antoine Pitrou> ARROW-2835:  Make file position undefined after ReadAt()
2019-06-03 14:31:43 +02:00
Antoine Pitrou 4d60c8c0aa ARROW-5441: [C++] Implement FindArrowFlight.cmake
Also make Python Flight support compatible with PYARROW_BUNDLE_ARROW_CPP.

Author: Antoine Pitrou <antoine@python.org>

Closes #4415 from pitrou/ARROW-5441-find-arrow-flight and squashes the following commits:

c40fdcf91 <Antoine Pitrou> ARROW-5441:  Implement FindArrowFlight.cmake
2019-06-03 09:59:50 +02:00
Wes McKinney aa18d257d0 ARROW-5289: [C++] Move arrow/util/concatenate* to arrow/array
The array/ subfolder is a more natural place to organize algorithms and other code relating to manipulating columnar array objects

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

Closes #4445 from wesm/ARROW-5289 and squashes the following commits:

002dfc987 <Wes McKinney> Move arrow/util/concatenate* to arrow/array
2019-05-31 23:11:20 -07:00
Wes McKinney a6da5e9819 ARROW-4159: [C++] Build with -Wdocumentation when using clang and BUILD_WARNING_LEVEL=CHECKIN
This will help prevent Doxygen-related build failures

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

Closes #4441 from wesm/ARROW-4159 and squashes the following commits:

a019c1484 <Wes McKinney> Build with -Wdocumentation on clang
2019-05-31 16:30:07 -05:00
Renat Valiullin 0054ef3bbd ARROW-5433: [C++][Parquet] Improve parquet-reader columns information, strip trailing whitespace from test case
Author: Renat Valiullin <rip.nsk@gmail.com>

Closes #4403 from rip-nsk/ARROW-5433 and squashes the following commits:

2daadd94c <Renat Valiullin> replace column name by column path and better type information
2019-05-31 13:52:15 -05:00
Antoine Pitrou dbeab70863 ARROW-3294: [C++][Flight] Support Flight on Windows
Author: Antoine Pitrou <antoine@python.org>

Closes #4410 from pitrou/ARROW-3294-flight-windows and squashes the following commits:

bd4979b33 <Antoine Pitrou> ARROW-3294:  Support Flight on Windows
2019-05-31 10:29:18 -05:00
Wes McKinney ff2ee42092 PARQUET-1422: [C++] Use common Arrow IO interfaces throughout codebase
This is a long overdue unification of platform code that wasn't possible until after the monorepo merge that occurred last year. This should also permit us to take a more consistent approach with regards to asynchronous IO.

A backwards compatibility layer is provided for the now deprecated `parquet::RandomAccessSource` and `parquet::OutputStream` classes.

Some incidental changes were required to get things to work:

* ARROW-5428: Adding a "read extent" option to BufferedInputStream to limit the extent of bytes read from the underlying raw stream
* `arrow::io::InputStream::Peek` needed to have its API changed to return Status, because of the next point
* `arrow::io::BufferedOutputStream::Peek` will expand the buffer if a Peek is requested that is larger than the buffer. The idea is that it should be possible to "look ahead" in the stream without altering the stream position. This is needed as part of finding the next data header (which can be large or small depending on statistics size, etc.) in a Parquet stream
* Added a `[]` operator to `Buffer` to facilitate testing
* Some continued "flattening" of the "parquet/util" directory to be simpler

Some outstanding questions:

* The Parquet reader and writer classes assumed exclusive ownership of the file handles, and they are closed when the Parquet file is closed. Arrow files are shared, and so calling `Close` is not appropriate. I've attempted to preserve this logic by having Close called in the destructors of the wrapper classes in `parquet/deprecated_io.h`

An issue I ran into

* Changes in https://github.com/apache/arrow/commit/d82ac407fab1d4b28669b8f7a940f88d39dfd874 introduced a unit test with meaningful trailing whitespace, which my editor strips away. I've commented out the offending test and will have to open a JIRA about fixing

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

Closes #4404 from wesm/parquet-use-arrow-io and squashes the following commits:

f010a8ec5 <Wes McKinney> Add missing PARQUET_EXPORT macros
50f7b921d <Wes McKinney> Add missing PARQUET_EXPORT
3b27ac262 <Wes McKinney> Follow changes in c_glib, fix Doxygen warning
7c1ae55c3 <Wes McKinney> ReadableFile::Peek now returns NotImplemented
cc7789e8f <Wes McKinney> Fix unit tests
b6e173922 <Wes McKinney> Allow unbounded peeks in BufferedInputStream
cd2a3cd70 <Wes McKinney> Add unit tests for legacy Parquet input/output wrappers
e03f07d65 <Wes McKinney> remove outdated comment
4c40bf2e1 <Wes McKinney> Adapt Python bindings
769974a6e <Wes McKinney> Tests passing again
1886de841 <Wes McKinney> column_writer more similar to before
7efc1aca6 <Wes McKinney> Fix one bug
30f1f4d62 <Wes McKinney> Get things compiling again, but tests are broken
4efb4e707 <Wes McKinney> Implement expanding-peek logic, change signature of InputStream::Peak to be able to return Status
db1877e8c <Wes McKinney> More progress toward compilation, port over parquet::BufferedInputStream unit tests
b05a71213 <Wes McKinney> More refactoring
66be1af04 <Wes McKinney> Port more code, add basic wrapper implementation for legacy IO interfaces
59143ddec <Wes McKinney> Start a bit of refactoring/consolidation in prep for using Arrow IO interfaces
2019-05-31 10:13:12 -05:00
Wes McKinney 823510c837 ARROW-5453: [C++] Update to cmake-format=0.5.2 and pin again
I think we need to put cmake-format back into the doghouse until we observe a period of stability in the formatting algorithm

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

Closes #4423 from wesm/ARROW-5453 and squashes the following commits:

40c4f8a43 <Wes McKinney> Update to cmake-format=0.5.2 and pin again
2019-05-30 21:09:14 -05:00
Wes McKinney c39db9977d ARROW-5403: [C++] Use GTest shared libraries with BUNDLED build, always use BUNDLED with MSVC
Without this change, failed assertions do not cause failed unit tests on Windows as Antoine had discovered today.

The conda-forge test package seems unusable in shared library form so I'm forcing BUNDLED builds on MSVC (if not otherwise specified) and removing the hacks in the docs and Appveyor to pass `-DGTest_SOURCE=BUNDLED`

After this change the static CRT Windows tests do not work anymore (because gtest.dll has its own copy of the static CRT, which leads to conflicts), so we will have to explore testing the static CRT build as follow up work. See ARROW-5426

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

Closes #4380 from wesm/gtest-windows-dll and squashes the following commits:

515f75b0 <Wes McKinney> Only set GTest_SOURCE to BUNDLED on MSVC if not passed explicitly
8678632d <Wes McKinney> Revert more unwanted cmake changes
c88d125d <Wes McKinney> Revert unwanted cmake-format changes
ac73ae37 <Wes McKinney> Disable static CRT build
c83c7d63 <Wes McKinney> Use gtest shared lib
2019-05-30 18:55:38 -05:00
Nuno Sucena Almeida 21e8785811 ARROW-5446: [C++][CMake] Install arrow/util/config.h into CMAKE_INSTALL_INCLUDEDIR
Author: Nuno Sucena Almeida <288957+slug@users.noreply.github.com>

Closes #4387 from slug/config-install-fix and squashes the following commits:

bacfdaf27 <Nuno Sucena Almeida> config install dir
2019-05-30 12:22:10 -05:00
Antoine Pitrou 30b4736073 ARROW-5378: [C++] Local filesystem implementation
Author: Antoine Pitrou <antoine@python.org>

Closes #4379 from pitrou/ARROW-5378-local-filesystem and squashes the following commits:

c36e3dc8b <Antoine Pitrou> ARROW-5378:  Local filesystem implementation
2019-05-30 12:12:22 -05:00
François Saint-Jacques 20961b72ce ARROW-5269: [C++][Archery] Mark relevant benchmarks as regression
The goal of this change is to mark benchmarks candidate for automated regression checks. Some benchmarks were refactored for various reasons:

- Code deduplication where needed
- Uniform input size for benchmarks in the same suite, usually to minimize the effect of cache hierarchy.
- Favor external repetitions over manual repetitions and mintime when possible.
- Add cmake ARROW_BUILD_BENCHMARKS_REFERENCE to toggle reference benchmarks.
- Remove default benchmark filter of `^Regression`.
- Remove `BM_` prefix from benchmark names
- Fixes and addons to `archery` to support the `--pdb` option for debugging and add support for benchmarks reported as `items_per_seconds`.
- Adds `archery benchmark list` sub-command to list suites and benchmarks

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

Closes #4285 from fsaintjacques/ARROW-5269-regression-candidates and squashes the following commits:

83780304d <François Saint-Jacques> Address comments
4a570ab90 <François Saint-Jacques> Reformat
a9ecffd98 <François Saint-Jacques> address comments
d8e779aab <François Saint-Jacques> Reformat
8334c68f7 <François Saint-Jacques> Remove BM_ benchmark prefix
5cebe2c23 <François Saint-Jacques> Normalize benchmarks
908f05a5b <François Saint-Jacques> Change default repetitions to 10 instead of 20
ffe723f05 <François Saint-Jacques> Add `benchmark list` sub-command.
e0876474b <François Saint-Jacques> Refactor JSON benchmarks
a7b4f5f50 <François Saint-Jacques> Improve archery benchmark support
bea76ed0e <François Saint-Jacques> Refactor csv benchmarks
f207974c0 <François Saint-Jacques> Refactor CompareFilter benchmarks
b7911df3d <François Saint-Jacques> Refactor Bitmap benchmarks
1b5135ebd <François Saint-Jacques> Refactor Builder benchmarks
2019-05-30 17:19:52 +02:00
Gidon Gershinsky f199a77c10 PARQUET-1517: [C++] Crypto package updates to match the final spec
An initial version of crypto package is merged. This PR updates the crypto code to

conform the signed off specification (wire protocol updates, signature tag creation, AAD support, etc)
improve performance by extending cipher lifecycle to file writing/reading - instead of creating cipher on each encrypt/decrypt operation

Author: Gidon Gershinsky <gg5070@gmail.com>
Author: Revital1 Eres <eres@iris-tes-cloud.sl.cloud9.ibm.com>
Author: Gidon Gershinsky <gidon@il.ibm.com>
Author: Revital Sur <eres@il.ibm.com>
Author: thamht4190 <thamht01188@gmail.com>
Author: ggershinsky <ggershinsky@users.noreply.github.com>

Closes #3520 from ggershinsky/p1517-crypto-pack-updates and squashes the following commits:

21ce9d097 <ggershinsky> Merge pull request #6 from revital76/review_comments
ef970e3d8 <Revital1 Eres> Fix broken line
3ffd60645 <Revital1 Eres> Change comment in encryption_internal.h
b570e8e9b <Revital1 Eres> Fixes following Gidon's comments
535d0e28c <Revital1 Eres> Delete encryption_internal.cc from CMakeLists.txt
9be898eb3 <Revital1 Eres> Address review comments
e784d9d9c <Gidon Gershinsky> cipher wipe out
abd76a622 <thamht4190> fix build issue on MacOS
24795fae1 <Gidon Gershinsky> ctr fixes
6c599e936 <thamht4190> fix code style
9fa9ef665 <Gidon Gershinsky> rm old method
9f68cab27 <Gidon Gershinsky> encryption size delta
4d832d66b <Gidon Gershinsky> stateful encryptor objects
73c8235ea <Revital Sur> Fix indentation in crypto.h and crypto.cc
333045b79 <Revital Sur> Add functions for AAD calculation and adjust code for API changes
aa7b2abd5 <Gidon Gershinsky> params order
1a9972538 <Gidon Gershinsky> cast fix
dfe98ee7c <Gidon Gershinsky> signed footer encryption
8961544bb <Gidon Gershinsky> CTR IV fix
7ecdade4f <Gidon Gershinsky> iv comment and buffer length
8e7fe9021 <Gidon Gershinsky> set or check ciphertext length
03ede654f <Gidon Gershinsky> iv changes and buffer length
2019-05-29 09:57:07 -05:00
Antoine Pitrou 1643c1ecb3 ARROW-5419: [C++] Allow recognizing empty strings as null strings in CSV files
Author: Antoine Pitrou <antoine@python.org>

Closes #4396 from pitrou/ARROW-5419-csv-empty-null-strings and squashes the following commits:

cb086d1c <Antoine Pitrou> ARROW-5419:  Allow recognizing empty strings as null strings in CSV files
2019-05-28 23:22:28 -07:00
shengjun.li 49714fb5a3 ARROW-5283: [C++][Plasma] Erase object id in client when abort object
Author: shengjun.li <shengjun.li@zilliz.com>

Closes #4272 from shengjun1985/master and squashes the following commits:

126a60e35 <shengjun.li> Add a comment.
f7113c2cc <shengjun.li> ARROW-5283:  erase object id in client when abort object
2019-05-28 19:06:03 -07:00
Deepak Majeti 2d7838ebf6 ARROW-4302: [C++] Add OpenSSL to C++ build toolchain (#4384) 2019-05-28 08:02:49 +05:30
Antoine Pitrou 8b0318a11b ARROW-5413: [C++] Skip UTF8 BOM in CSV files
Author: Antoine Pitrou <antoine@python.org>

Closes #4392 from pitrou/ARROW-5413-csv-skip-bom and squashes the following commits:

12f8d1d3 <Antoine Pitrou> ARROW-5413:  Skip UTF8 BOM in CSV files
2019-05-28 05:55:58 +09:00
TP Boudreau 38b1ddfb7f PARQUET-1411: [C++] Add parameterized logical annotations to Parquet metadata
This PR updates the parquet-cpp implementation to use parameterized logical type annotations as requested in [PARQUET-1411](https://issues.apache.org/jira/browse/PARQUET-1411).  The primary contributions are:

1. Amend the parquet.thrift file consistent with the Parquet format repository to allow Thrift to recognize and serialize a new LogicalType
2. Introduce and integrate a LogicalAnnotation class (and subclasses) in the parquet-cpp library to handle functionality related to this new attribute
3. Expand the public API to include construction functions for GroupNode and PrimitiveNode schema classes that accept the new LogicalAnnotation parameter
4. Add basic unit and integration tests for the new code.

Some (hopefully time saving) notes for reviewers:

- The center of gravity for the PR is the LogicalAnnotation class, so it might be best to start by having a look at it's interface in types.h

- LogicalType would have been a more natural name for this class, but unfortunately that was already in use (in the public API) for the concept Thrift calls "converted type".  Here's a refresher chart of some relevant concepts and their names in the code:

| Concept | Thrift realization | Parquet-CPP realization |
|---------|--------------------|-------------------------|
| Physical storage type | enum Type | enum parquet::Type::type |
| Converted type | enum ConvertedType; struct parquet::format::ConvertedType | enum parquet::LogicalType::type; struct parquet::schema::DecimalMetadata|
| Logical annotation | union LogicalType; struct parquet::format::LogicalType | class parquet::LogicalAnnotation (enum parquet::LogicalAnnotation::Type) |

- After this change, the LogicalAnnotation member (stored in Node.logical_annotation_) is the primary controller of logical typing in the library.  To simplify backward compatibility tasks, the existing converted type/decimal metadata pair is retained and populated at construction with compatible values (where possible).

- While new Make() functions are introduced to accomodate schema node construction with the new annotations, of course the existing corresponding public API functions accepting converted types are retained.  The maintainers might wish to consider deprecating those functions.

- As required by the parquet format specification, after this change, both the converted and logical types are serialized; the new logical type (if present) takes precedence on deserialization, but the legacy converted type is still recognized in the absence of a logical type.

>The existing converted type INTERVAL has no corresponding logical type in the parquet.thrift definition, so it can only be serialized as a converted type.  As with any other element in which only converted type information is present, upon deserialization an equivalent logical annotation is instantiated and it is treated internally as any other type.

- There are several ancillary functions, such as printing and equivalence checking, in which the converted types are still used; in most cases these fallbacks and double-checks are probably redundant.  Note, however, that in the JSON output *both* converted and logical types are intentionally emitted, on the assumption that consumers might be relying on the current format as part of a quasi-public API.  The maintainers may wish to consider deprecating the converted type fields there as well.

I'm far from an expert in the Parquet data format or it's implementing libraries, so I may have misunderstood or omitted things; all corrections or recommendations are obviously welcome.

Author: TP Boudreau <tpboudreau@gmail.com>

Closes #4185 from tpboudreau/PARQUET-1411 and squashes the following commits:

00ef84d2b <TP Boudreau> Widen access to implementation classes
fdfbf87fc <TP Boudreau> Include logical annotation in method ColumnDescriptor::ToString()
a5e2386b2 <TP Boudreau> Add and integrate logical annotations for schema nodes
2019-05-27 15:02:41 -05:00
Wes McKinney f82af62dfd ARROW-5349: [C++][Parquet] Add method to set file path in a parquet::FileMetaData instance
This is an RFC based on the discussion ongoing. If this seems like the accepted approach I'll add a Python unit test

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

Closes #4386 from wesm/parquet-metadata-set-file-path and squashes the following commits:

e77cf7a8a <Wes McKinney> Add method to set file path in a parquet::FileMetaData instance
2019-05-26 14:22:27 +02:00
Renat Valiullin d82ac407fa PARQUET-1586: [C++] Add --dump options to parquet-reader tool to dump def/rep levels
Author: Renat Valiullin <rip.nsk@gmail.com>

Closes #4385 from rip-nsk/PARQUET-1586 and squashes the following commits:

2d5c9e38f <Renat Valiullin> fixes for lint
1e370238b <Renat Valiullin> fix lint
a7bcacee3 <Renat Valiullin> parquet-reader --dump
2019-05-26 14:21:27 +02:00
Micah Kornfield 21e9d74b95 ARROW-5245: [CI][C++] Unpin cmake format (current version is 5.1)
It looks like some  formatting has changed going from 4 to 5.  For the most part it looks more readable, but I'm not sure.

Author: Micah Kornfield <emkornfield@gmail.com>

Closes #4388 from emkornfield/unpin_cmake and squashes the following commits:

e2d48fd2f <Micah Kornfield> run cmake format and turn off autosort
c965fc994 <Micah Kornfield> ARROW-5245:  Unpin cmake format
2019-05-26 14:15:50 +02:00
Wes McKinney d20640deb0 PARQUET-1243: [C++] Throw more informative exception when reading a length-0 Parquet file
Author: Wes McKinney <wesm+git@apache.org>

Closes #4240 from wesm/PARQUET-1243 and squashes the following commits:

dd61458b5 <Wes McKinney> clang-format
75ee6ef01 <Wes McKinney> Print expected size of standard file footer, use consistent style for constants in parquet/file_reader.cc
3b3f47523 <Wes McKinney> Raise a better exception when reading a length-0 Parquet file
2019-05-24 13:07:00 -05:00
Anatoly Myachev 863b926b61 ARROW-653: [Python / C++] Add debugging function to print an array's buffer contents in hexadecimal
Author: Anatoly Myachev <anatoly.myachev@intel.com>

Closes #4310 from anmyachev/print_func and squashes the following commits:

d3236d7be <Anatoly Myachev> added doc-strings
fea82b9e8 <Anatoly Myachev> added a byte > 128
ebdf126cf <Anatoly Myachev> changed: 'e' -> 'E' in expected hex string
c4bf288b9 <Anatoly Myachev> added test 'ToHexString' func in c++ part
0f472357d <Anatoly Myachev> removed unnecessary headers
dc9b58921 <Anatoly Myachev> added 'test_buffer_hex' in 'python/pyarrow/tests/test_io.py'
a2de6b21d <Anatoly Myachev> using HexEncode; renamed 'ToHexString' -> 'hex' in pyarrow.Buffer
7af18471e <Anatoly Myachev> renamed function 'print' -> 'ToHexString'; this func returns std::string now
7d945eb55 <Anatoly Myachev> added 'print' method to Buffer class
2019-05-24 08:58:37 -05:00
Benjamin Kietzman 9fcc12fc09 ARROW-5404: [C++] force usage of nonstd::sv_lite::string_view instead of std::string_view
Otherwise libraries built with C++11 enabled can have ABI conflicts when built against applications built with C++ >= 17

Author: Benjamin Kietzman <bengilgit@gmail.com>

Closes #4378 from bkietz/5404-nonstdstring-view-conflicts-with-stdstri and squashes the following commits:

4ff84802b <Benjamin Kietzman> force usage of nonstd::sv_lite::string_view instead of std::string_view
2019-05-23 10:54:55 -05:00
Wes McKinney 31319128d2 [C++] Fix clang-7 warning from unused lambda capture 2019-05-23 09:01:13 -05:00
David Li c18251e900 ARROW-4651: [Flight] Use URIs instead of host/port pair
I haven't changed the client/server construction interfaces to really take advantage of this. I would rather follow up with creating builders instead, as proposed, as that would be cleaner than special-casing the logic in the current constructors.

Author: David Li <li.davidm96@gmail.com>

Closes #4047 from lihalite/flight-uris and squashes the following commits:

870f6ebb8 <David Li> Add more builder options for Java Flight servers
5c127631b <David Li> Make Python Flight bindings more complete
675acc9bc <David Li> Introduce builder for C++ Flight servers
474419667 <David Li> Use builder for Flight server in Java
460442cea <David Li> Use URIs for Flight locations
2019-05-22 13:02:00 -05:00
Deepak Majeti 8f5df459c7 ARROW-5218: [C++] Improve build when third-party library locations are specified
Changes:
1) When searching for third-party libraries:
Look at only `#_ROOT` location if specified else check 1) `pkg_check_modules` and 2) check all other CMake paths

2) Build Uriparser only when Flight is built.
3) Find Backtrace only when specified.

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

Closes #4207 from majetideepak/ARROW-5218 and squashes the following commits:

b8b623d12 <Deepak Majeti> cmake-format
468b99d89 <Deepak Majeti> Fix Failures
35cb57590 <Deepak Majeti> Improve Backtrace
b91bd0558 <Deepak Majeti> Improve UriParser
50b67cae9 <Deepak Majeti> improve FindThrift
e40120bd3 <Deepak Majeti> Improve FindLz4
4ec33d410 <Deepak Majeti> Improve FindZSTD
68d01c522 <Deepak Majeti> fix ThirdpartyToolchain
3065723e4 <Deepak Majeti> Improve Brotli
2019-05-22 09:40:58 -05:00
Antoine Pitrou 1c4d4333ec ARROW-5389: [C++] Add Temporary Directory facility
Author: Antoine Pitrou <antoine@python.org>

Closes #4364 from pitrou/ARROW-5389-temp-dir-api and squashes the following commits:

a7668038c <Antoine Pitrou> Inclure share.h
2655f1a16 <Antoine Pitrou> Try to fix MinGW
372f087de <Antoine Pitrou> Improve random name generation
b56f32cd1 <Antoine Pitrou> Try to fix socket length exceeded issue on Travis-CI
74dcf50be <Antoine Pitrou> ARROW-5389:  Add Temporary Directory facility
2019-05-22 11:08:30 +02:00
shyam 7a9ba6178d PARQUET-1402: [C++] Parquet files with dictionary page offset as 0 is not readable
…adable

pyarrow needs to handle dictionary page offset = 0 as a special case to be compatible with java parquet reader.

Author: shyam <shyam@dremio.com>

Closes #4359 from shyambits2004/5322 and squashes the following commits:

f47762ab0 <shyam> Parquet files with dictionary page offset as 0 is not readable
2019-05-21 11:53:51 -05:00
Krisztián Szűcs 68329e728c ARROW-5325: [Archery][Benchmark] Output properly formatted jsonlines from benchmark diff cli command
Author: Krisztián Szűcs <szucs.krisztian@gmail.com>

Closes #4274 from kszucs/hook-test and squashes the following commits:

2be809892 <Krisztián Szűcs> remove arm intrinsics headers
3c8deb184 <Krisztián Szűcs> __ARM_NEON__ is legacy
20e485000 <Krisztián Szűcs> clang-format
55d2c77f1 <Krisztián Szűcs> intrinsics
29bded608 <Krisztián Szűcs> clang format
f1f4f9203 <Krisztián Szűcs> remove intrinsics include
35f64689a <Krisztián Szűcs> arm intrinsics
de8389d1e <Krisztián Szűcs> write line separator to output properly formatted jsonlines
2019-05-21 16:16:56 +02:00
Micah Kornfield cee3fc62a7 ARROW-5362: [C++] Fix compression test memory usage
Author: Micah Kornfield <emkornfield@gmail.com>

Closes #4335 from emkornfield/fix_compression_tests and squashes the following commits:

86ddd9963 <Micah Kornfield> revert cmopressed size
e37f8ad55 <Micah Kornfield> Change back to using resize
9b51c5809 <Micah Kornfield> ARROW-5362: Fix compression test memory usage
2019-05-21 12:23:53 +02:00
Wes McKinney 2d4fe0153c PARQUET-1583: [C++] Remove superfluous parquet::Vector class
This class which is a syntactic sugar layer on `arrow::ResizableBuffer` was only being used in one place, for dictionary decoding. I don't think we need to maintain this, and it also features possible instantiated template symbol issues

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

Closes #4354 from wesm/PARQUET-1583 and squashes the following commits:

24535175 <Wes McKinney> lint
29af0799 <Wes McKinney> Remove superfluous parquet::Vector class
2019-05-21 08:38:09 +02:00
Micah Kornfield 5870080667 PARQUET-1582: [C++] Add ToString method to ColumnDescriptor
Author: Micah Kornfield <emkornfield@gmail.com>
Author: Micah Kornfield <micahk@google.com>

Closes #4338 from emkornfield/add_debug_string and squashes the following commits:

25980a37a <Micah Kornfield> Add unit test
9568a6744 <Micah Kornfield> Add ToString method to ColumnDescripotor
2019-05-20 16:41:37 -05:00
Kouhei Sutou 2b4ca01898 ARROW-5369: [C++] Add support for glog on Windows
Windows doesn't have sigaction() but has signal().

glog also uses signal():
https://github.com/google/glog/blob/master/src/signalhandler.cc#L390

Author: Kouhei Sutou <kou@clear-code.com>

Closes #4342 from kou/cpp-support-glob-on-windows and squashes the following commits:

779cfa7af <Kouhei Sutou> Disable glog on AppVeyor
216d2da8c <Kouhei Sutou>  Add support for glog on Windows
2019-05-20 16:37:17 -05:00
Kouhei Sutou bbe239d0e0 ARROW-5368: [C++] Disable jemalloc by default with MinGW
Because we can't run autogen.sh from cmake.

We can use jemalloc installed by pacman but we can't use it. Because
we always use bundled jemalloc for now.

Author: Kouhei Sutou <kou@clear-code.com>

Closes #4341 from kou/cpp-mingw-disable-jemalloc-by-default and squashes the following commits:

e107efbd <Kouhei Sutou>  Disable jemalloc by default with MinGW
2019-05-21 06:22:13 +09:00
Antoine Pitrou e643845dc4 ARROW-5260: [Python] Fix crash when deserializating from components in another process
Author: Antoine Pitrou <antoine@python.org>

Closes #4267 from pitrou/ARROW-5260-from-components-other-process and squashes the following commits:

bc56aa668 <Antoine Pitrou> ARROW-5260:  Fix crash when deserializating from components in another process
2019-05-20 18:58:33 +02:00