-
Notifications
You must be signed in to change notification settings - Fork 193
PARQUET-679: Local Windows build and Appveyor support #313
Conversation
CMakeLists.txt
Outdated
@@ -661,11 +669,16 @@ if (PARQUET_BUILD_SHARED) | |||
endif() | |||
|
|||
if (PARQUET_BUILD_STATIC) | |||
if (MSVC) | |||
set(LIB_NAME_STATIC parquet_static) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use PARQUET_LIB_NAME
instead?
I asked ASF Infra to turn on Appveyor https://issues.apache.org/jira/browse/INFRA-14020 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
awesome! minor comments and some questions about licensing re: snappy build files
CMakeLists.txt
Outdated
add_library(parquet_static STATIC $<TARGET_OBJECTS:parquet_objlib>) | ||
set_target_properties(parquet_static | ||
PROPERTIES | ||
LIBRARY_OUTPUT_DIRECTORY "${BUILD_OUTPUT_ROOT_DIRECTORY}" | ||
OUTPUT_NAME "parquet") | ||
OUTPUT_NAME ${LIB_NAME_STATIC}) | ||
target_link_libraries(parquet_static | ||
LINK_PUBLIC ${LIBPARQUET_INTERFACE_LINK_LIBS}) | ||
endif() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you adapt the Arrow function for doing this, maybe a little more reusable / readable? https://github.com/apache/arrow/blob/master/cpp/cmake_modules/BuildUtils.cmake#L85
README.md
Outdated
@@ -265,3 +269,5 @@ coveralls -t $PARQUET_CPP_COVERAGE_TOKEN --gcov-options '\-l' -r $PARQUET_ROOT - | |||
|
|||
Note that `gcov` throws off artifacts from the STL, so I excluded my toolchain | |||
root stored in `$NATIVE_TOOLCHAIN` to avoid a cluttered coverage report. | |||
|
|||
[1]: https://github.com/apache/parquet-cpp/blob/master/Windows.md |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Create a docs
directory for this?
Windows.md
Outdated
|
||
## Fast setup of building requirements with conda and conda-forge | ||
|
||
To not waste a lot of time to setup the thirdparty build dependecies for |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some might disagree that it's a waste of time, but it's indeed convenient, so "A convenient and tested way to set up thirdparty dependencies is to use the conda package manager."
Windows.md
Outdated
|
||
```shell | ||
conda config --add channels conda-forge | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of using conda config
, pass -c conda-forge
to conda create
Windows.md
Outdated
Now, you can bootstrap a build environment | ||
|
||
```shell | ||
conda create -n parquet-dev cmake git boost curl zlib |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you install boost-cpp
instead of boost
, it will not pull in a separate Python install. Do we also need Snappy here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Snappy is required, but we don't have Windows build yet in conda-forge
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is Snappy for Windows available in defaults (repo.continuum.io)? Support I could look myself =)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right, it's available in defaults, going to add it too, thank you!
src/parquet/encoding-internal.h
Outdated
@@ -852,8 +852,8 @@ class DeltaLengthByteArrayDecoder : public Decoder<ByteArrayType> { | |||
|
|||
virtual int Decode(ByteArray* buffer, int max_values) { | |||
max_values = std::min(max_values, num_values_); | |||
int lengths[max_values]; | |||
len_decoder_.Decode(lengths, max_values); | |||
std::unique_ptr<int[]> lengths(new int[max_values]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use std::vector
here
src/parquet/util/cpu-info.h
Outdated
@@ -73,7 +75,7 @@ class CpuInfo { | |||
/// Returns the model name of the cpu (e.g. Intel i7-2600) | |||
static std::string model_name(); | |||
|
|||
static bool initialized() { return initialized_; } | |||
static bool initialized(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's better to inline these if possible
src/parquet/util/rle-test.cc
Outdated
const uint64_t mod = bit_width == 64 ? 1 : 1LL << bit_width; | ||
|
||
uint8_t buffer[len]; | ||
BitWriter writer(buffer, len); | ||
std::unique_ptr<uint8_t[]> buffer(new uint8_t[len]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
std::vector
src/parquet/util/rle-test.cc
Outdated
const int len = RleEncoder::MinBufferSize(bit_width); | ||
uint8_t buffer[len]; | ||
int len = RleEncoder::MinBufferSize(bit_width); | ||
std::unique_ptr<uint8_t[]> buffer(new uint8_t[len]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
std::vector
tools/parquet-scan.cc
Outdated
@@ -71,7 +71,7 @@ int main(int argc, char** argv) { | |||
} | |||
} | |||
|
|||
int64_t total_rows[num_columns]; | |||
std::unique_ptr<int64_t[]> total_rows(new int64_t[num_columns]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
std::vector
src/parquet/util/compiler-util.h
Outdated
@@ -31,8 +31,13 @@ | |||
#undef UNLIKELY | |||
#endif | |||
|
|||
#ifdef _MSC_VER | |||
#define LIKELY(expr) 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should just "return" expr again, otherwise the statement would always be evaluated as false.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are right! thanks
90b81d3
to
a606a7d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1. I suppose the unit tests don't pass yet?
@wesm , yes, some unit tests are failing on Windows |
No description provided.