Skip to content
This repository has been archived by the owner on May 10, 2024. It is now read-only.

PARQUET-679: Local Windows build and Appveyor support #313

Closed
wants to merge 1 commit into from

Conversation

maxhora
Copy link
Contributor

@maxhora maxhora commented Apr 26, 2017

No description provided.

CMakeLists.txt Outdated
@@ -661,11 +669,16 @@ if (PARQUET_BUILD_SHARED)
endif()

if (PARQUET_BUILD_STATIC)
if (MSVC)
set(LIB_NAME_STATIC parquet_static)

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?

@wesm
Copy link
Member

wesm commented Apr 27, 2017

I asked ASF Infra to turn on Appveyor https://issues.apache.org/jira/browse/INFRA-14020

Copy link
Member

@wesm wesm left a 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()
Copy link
Member

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
Copy link
Member

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
Copy link
Member

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
```
Copy link
Member

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
Copy link
Member

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?

Copy link
Contributor Author

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

Copy link
Member

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 =)

Copy link
Contributor Author

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!

@@ -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]);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use std::vector here

@@ -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();
Copy link
Member

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

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]);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

std::vector

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]);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

std::vector

@@ -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]);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

std::vector

@@ -31,8 +31,13 @@
#undef UNLIKELY
#endif

#ifdef _MSC_VER
#define LIKELY(expr) 0
Copy link
Member

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right! thanks

@maxhora maxhora force-pushed the PARQUET-679 branch 5 times, most recently from 90b81d3 to a606a7d Compare April 29, 2017 16:34
Copy link
Member

@wesm wesm left a 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?

@asfgit asfgit closed this in e414012 May 2, 2017
@maxhora
Copy link
Contributor Author

maxhora commented May 2, 2017

@wesm , yes, some unit tests are failing on Windows

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants