This is an automated email from the ASF dual-hosted git repository. wesm pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/arrow.git
The following commit(s) were added to refs/heads/master by this push: new cb22487 ARROW-5765: [C++] Fix TestDictionary.Validate in release mode, add docker-compose job for testing C++ release build cb22487 is described below commit cb224870e2dfe3c12fe3de06d04986c49f69ba7d Author: Wes McKinney <wesm+...@apache.org> AuthorDate: Thu Jun 27 22:25:32 2019 -0500 ARROW-5765: [C++] Fix TestDictionary.Validate in release mode, add docker-compose job for testing C++ release build This was exposed by ARROW-5145 https://github.com/apache/arrow/commit/f77c3427ca801597b572fb197b92b0133269049b I also added a docker-compose job for testing the release build nightly at least in Crossbow on https://github.com/ursa-labs/crossbow Author: Wes McKinney <wesm+...@apache.org> Closes #4730 from wesm/ARROW-5765 and squashes the following commits: d49f9be25 <Wes McKinney> Add check as death test cc9ca13ec <Wes McKinney> Remove checks that cannot be run in either DEBUG or RELEASE builds 96141e81a <Wes McKinney> Add missing task configuration 90a22de0b <Wes McKinney> Fix TestDictionary.Validate in release mode --- cpp/src/arrow/array-dict-test.cc | 27 ++++++--------------------- dev/tasks/tests.yml | 10 ++++++++++ docker-compose.yml | 14 ++++++++++++++ 3 files changed, 30 insertions(+), 21 deletions(-) diff --git a/cpp/src/arrow/array-dict-test.cc b/cpp/src/arrow/array-dict-test.cc index 4d57ee3..16d8aac 100644 --- a/cpp/src/arrow/array-dict-test.cc +++ b/cpp/src/arrow/array-dict-test.cc @@ -856,27 +856,12 @@ TEST(TestDictionary, Validate) { // Only checking index type for now ASSERT_OK(ValidateArray(*arr)); -#ifdef NDEBUG - std::shared_ptr<Array> null_dict_arr = - std::make_shared<DictionaryArray>(dict_type, indices, nullptr); - - // Only checking index type for now - ASSERT_RAISES(Invalid, ValidateArray(*null_dict_arr)); -#endif - - // TODO(wesm) In ARROW-1199, there is now a DCHECK to compare the indices - // type with the dict_type. How can we test for this? - - // std::shared_ptr<Array> indices2; - // vector<float> indices2_values = {1., 2., 0., 0., 2., 0.}; - // ArrayFromVector<FloatType, float>(is_valid, indices2_values, &indices2); - - // std::shared_ptr<Array> indices3; - // vector<int64_t> indices3_values = {1, 2, 0, 0, 2, 0}; - // ArrayFromVector<Int64Type, int64_t>(is_valid, indices3_values, &indices3); - // std::shared_ptr<Array> arr2 = std::make_shared<DictionaryArray>(dict_type, indices2); - // std::shared_ptr<Array> arr3 = std::make_shared<DictionaryArray>(dict_type, indices3); - // ASSERT_OK(ValidateArray(*arr3)); + ASSERT_DEATH( + { + std::shared_ptr<Array> null_dict_arr = + std::make_shared<DictionaryArray>(dict_type, indices, nullptr); + }, + ""); } TEST(TestDictionary, FromArray) { diff --git a/dev/tasks/tests.yml b/dev/tasks/tests.yml index 634e252..2c424fa 100644 --- a/dev/tasks/tests.yml +++ b/dev/tasks/tests.yml @@ -24,6 +24,7 @@ groups: - docker-cpp - docker-cpp-alpine - docker-cpp-cmake32 + - docker-cpp-release - docker-c_glib - docker-go - docker-python-2.7 @@ -104,6 +105,15 @@ tasks: - docker-compose build cpp - docker-compose run cpp + docker-cpp-release: + ci: circle + platform: linux + template: docker-tests/circle.linux.yml + params: + commands: + - docker-compose build cpp + - docker-compose run cpp-release + docker-cpp-alpine: ci: circle platform: linux diff --git a/docker-compose.yml b/docker-compose.yml index 7b46c58..2fa5ab4 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -118,6 +118,20 @@ services: PARQUET_TEST_DATA: /arrow/cpp/submodules/parquet-testing/data volumes: *ubuntu-volumes + cpp-release: + # Usage: + # docker-compose build cpp + # docker-compose run cpp-release + image: arrow:cpp + shm_size: 2G + build: + context: . + dockerfile: cpp/Dockerfile + environment: + ARROW_BUILD_TYPE: release + PARQUET_TEST_DATA: /arrow/cpp/submodules/parquet-testing/data + volumes: *ubuntu-volumes + cpp-static-only: # Usage: # docker-compose build cpp