Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
8592ff3
update generated format flatbuffers
trxcllnt Nov 9, 2017
9d8fef9
split DateVector into Date32 and Date64 types
trxcllnt Nov 9, 2017
c45718e
support new DictionaryBatch isDelta flag
trxcllnt Nov 9, 2017
141194e
use fieldNode.length as vector length
trxcllnt Nov 9, 2017
4a34247
export Row type
trxcllnt Nov 9, 2017
3ff7138
Add bool, date, time, timestamp, and ARROW-1693 workaround in reader
trxcllnt Nov 9, 2017
0cd31ab
add generate-arrows script to tests
trxcllnt Nov 9, 2017
eefc256
remove old test arrows, add new generated test arrows
trxcllnt Nov 9, 2017
8549706
update cli args to execute partial test runs for debugging
trxcllnt Nov 9, 2017
407b9f5
update reader/table tests for new generated arrows
trxcllnt Nov 9, 2017
d4ff57a
update test snapshots
trxcllnt Nov 9, 2017
5eee3ea
add integration tests to compare how JS reads cpp vs. java arrows
trxcllnt Nov 9, 2017
ba984c6
update dependencies
trxcllnt Nov 12, 2017
c60305d
refactor: flatten vector folder, add more types
trxcllnt Nov 12, 2017
4166a9f
hard-code reader to Arrow spec and ignore field layout metadata
trxcllnt Nov 12, 2017
6d2c03d
clean arrows folders before regenerating test data
trxcllnt Nov 12, 2017
8d44dcd
update tests
trxcllnt Nov 12, 2017
d4399a8
update integration tests, add custom jest vector matcher
trxcllnt Nov 12, 2017
562eba7
update test snapshots
trxcllnt Nov 12, 2017
fd68d51
always increment validity buffer index while reading
trxcllnt Nov 12, 2017
44889fb
report errors generating test arrows
trxcllnt Nov 12, 2017
a6d3c83
enable integration tests
trxcllnt Nov 12, 2017
de7d96a
regenerate test arrows from master
trxcllnt Nov 12, 2017
e67a66a
remove/ignore test snapshots (getting too big)
trxcllnt Nov 12, 2017
02fb300
compare iterator results in integration tests
trxcllnt Nov 12, 2017
be73c91
add BinaryVector, change ListVector to always return an Array
trxcllnt Nov 12, 2017
1f00496
rename FixedWidthListVector to FixedWidthNumericVector
trxcllnt Nov 12, 2017
14d4896
stringify Struct Array cells
trxcllnt Nov 12, 2017
1d814d0
excise test data csvs
trxcllnt Nov 12, 2017
c087f48
generate test data in build scripts
trxcllnt Nov 12, 2017
d51793d
run tests on src folder for accurate jest coverage statistics
trxcllnt Nov 12, 2017
cb142f1
add npm release script, remove unused package scripts
trxcllnt Nov 12, 2017
3c52587
re-enable node_js job in travis
trxcllnt Nov 12, 2017
49ac339
allow unrecognized cli args in gulpfile
trxcllnt Nov 13, 2017
c8125d2
Update readme to reflect new Table.from signature
trxcllnt Nov 14, 2017
7e3be57
Copy license.txt and notice.txt into target dirs from arrow root.
trxcllnt Nov 14, 2017
d0b61f4
add validate package script back in, make npm-release.sh suitable for…
trxcllnt Nov 14, 2017
3391623
move js license to top-level license.txt
trxcllnt Nov 14, 2017
cc74456
resolve LICENSE.txt conflict
trxcllnt Nov 18, 2017
0cdb74e
Add a cli arg to integration_test.py generate test JSON files for JS
trxcllnt Nov 19, 2017
9f19568
Generate test files when the test run if they don't exist
trxcllnt Nov 19, 2017
19136fb
remove test data files in favor of auto-generating them in CI
trxcllnt Nov 19, 2017
1f6a81b
add missing mkdirp for test json data
trxcllnt Nov 19, 2017
0882d8e
separate JS unit tests from integration tests in CI
trxcllnt Nov 19, 2017
224e041
Remove hard-coded file name to prevent primitive JSON file from being…
wesm Nov 19, 2017
fd3ed47
Uppercase hex values
wesm Nov 19, 2017
c83a700
Hack until ARROW-1837 resolved. Constrain unsigned integers max to si…
wesm Nov 19, 2017
c72134a
compile JS source in integration tests
trxcllnt Nov 19, 2017
4811129
Add support for reading Arrow buffers < MetadataVersion 4
trxcllnt Nov 20, 2017
019e8e2
update closure compiler with full support for ESModules, and remove c…
trxcllnt Nov 20, 2017
5660eb3
Use openjdk8 for integration tests, jdk7 for main Java CI job
wesm Nov 20, 2017
14be77f
fix Date64Vector TypedArray, enable datetime integration tests
trxcllnt Nov 20, 2017
5972349
update performance tests to use generated test data
trxcllnt Nov 20, 2017
57c7df4
remove arrow files from perf tests
trxcllnt Nov 20, 2017
f907d5a
fix aggressive closure-compiler mangling in the ES5 UMD bundle
trxcllnt Nov 20, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 11 additions & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ matrix:
- $TRAVIS_BUILD_DIR/ci/travis_script_manylinux.sh
- language: java
os: linux
jdk: openjdk8
jdk: openjdk7
script:
- $TRAVIS_BUILD_DIR/ci/travis_script_java.sh
- language: java
Expand All @@ -103,23 +103,24 @@ matrix:
- language: java
os: linux
env: ARROW_TEST_GROUP=integration
jdk: openjdk7
jdk: openjdk8
before_script:
- source $TRAVIS_BUILD_DIR/ci/travis_install_clang_tools.sh
- export CC="clang-4.0"
- export CXX="clang++-4.0"
- nvm install node
- $TRAVIS_BUILD_DIR/ci/travis_lint.sh
- $TRAVIS_BUILD_DIR/ci/travis_before_script_js.sh
- $TRAVIS_BUILD_DIR/ci/travis_before_script_cpp.sh
script:
- $TRAVIS_BUILD_DIR/ci/travis_script_integration.sh
# TODO(wesm): Re-enable after issues in ARROW-1409 resolved
# - language: node_js
# os: linux
# node_js: node
# before_script:
# - $TRAVIS_BUILD_DIR/ci/travis_before_script_js.sh
# script:
# - $TRAVIS_BUILD_DIR/ci/travis_script_js.sh
- language: node_js
os: linux
node_js: node
before_script:
- $TRAVIS_BUILD_DIR/ci/travis_before_script_js.sh
script:
- $TRAVIS_BUILD_DIR/ci/travis_script_js.sh
- compiler: gcc
language: cpp
os: linux
Expand Down
95 changes: 95 additions & 0 deletions LICENSE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -457,3 +457,98 @@ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

--------------------------------------------------------------------------------

This project includes code from the Boost project

Boost Software License - Version 1.0 - August 17th, 2003

Permission is hereby granted, free of charge, to any person or organization
obtaining a copy of the software and accompanying documentation covered by
this license (the "Software") to use, reproduce, display, distribute,
execute, and transmit the Software, and to prepare derivative works of the
Software, and to permit third-parties to whom the Software is furnished to
do so, all subject to the following:

The copyright notices in the Software and this entire statement, including
the above license grant, this restriction and the following disclaimer,
must be included in all copies of the Software, in whole or in part, and
all derivative works of the Software, unless such copies or derivative
works are solely in the form of machine-executable object code generated by
a source language processor.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.

--------------------------------------------------------------------------------

This project includes code from the mapbox/variant project, BSD 3-clause
license

Copyright (c) MapBox
All rights reserved.

Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:

- Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice, this
list of conditions and the following disclaimer in the documentation and/or
other materials provided with the distribution.
- Neither the name "MapBox" nor the names of its contributors may be
used to endorse or promote products derived from this software without
specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

--------------------------------------------------------------------------------

This project includes code from the FlatBuffers project

Copyright 2014 Google Inc.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

--------------------------------------------------------------------------------

This project includes code from the tslib project

Copyright 2015 Microsoft Corporation. All rights reserved.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
19 changes: 19 additions & 0 deletions ci/travis_script_integration.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,22 @@ conda install -y pip numpy six
python integration_test.py --debug

popd

pushd $ARROW_JS_DIR

# lint and compile JS source
npm run lint
npm run build
# create initial test data
npm run test:createTestData
# run once to write the snapshots
npm test -- -t ts -u --integration
# run again to test all builds against the snapshots
npm test -- --integration
# run tests against source to generate coverage data
npm run test:coverage -- --integration
# Uncomment to upload to coveralls
# cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js;


popd
15 changes: 7 additions & 8 deletions ci/travis_script_js.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,15 @@
# specific language governing permissions and limitations
# under the License.

set -e
set -ex

JS_DIR=${TRAVIS_BUILD_DIR}/js
source $TRAVIS_BUILD_DIR/ci/travis_env_common.sh

pushd $JS_DIR
pushd $ARROW_JS_DIR

npm run validate

# Uncomment to use coveralls
# npm run test:coverage
# cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js;
npm run lint
npm run build
# run the non-snapshot unit tests
npm test

popd
56 changes: 43 additions & 13 deletions integration/integration_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
import subprocess
import tempfile
import uuid
import errno

import numpy as np

Expand Down Expand Up @@ -198,9 +199,18 @@ def __init__(self, name, is_signed, bit_width, nullable=True,
self.min_value = min_value
self.max_value = max_value

@property
def numpy_type(self):
return ('int' if self.is_signed else 'uint') + str(self.bit_width)
def _get_generated_data_bounds(self):
signed_iinfo = np.iinfo('int' + str(self.bit_width))
if self.is_signed:
min_value, max_value = signed_iinfo.min, signed_iinfo.max
else:
# ARROW-1837 Remove this hack and restore full unsigned integer
# range
min_value, max_value = 0, signed_iinfo.max

lower_bound = max(min_value, self.min_value)
upper_bound = min(max_value, self.max_value)
return lower_bound, upper_bound

def _get_type(self):
return OrderedDict([
Expand All @@ -210,9 +220,7 @@ def _get_type(self):
])

def generate_column(self, size, name=None):
iinfo = np.iinfo(self.numpy_type)
lower_bound = max(iinfo.min, self.min_value)
upper_bound = min(iinfo.max, self.max_value)
lower_bound, upper_bound = self._get_generated_data_bounds()
return self.generate_range(size, lower_bound, upper_bound, name=name)

def generate_range(self, size, lower, upper, name=None):
Expand Down Expand Up @@ -521,7 +529,7 @@ def get_json(self):
class BinaryColumn(PrimitiveColumn):

def _encode_value(self, x):
return frombytes(binascii.hexlify(x))
return frombytes(binascii.hexlify(x).upper())

def _get_buffers(self):
offset = 0
Expand Down Expand Up @@ -785,7 +793,7 @@ def _generate_file(name, fields, batch_sizes, dictionaries=None):
return JsonFile(name, schema, batches, dictionaries)


def generate_primitive_case(batch_sizes):
def generate_primitive_case(batch_sizes, name='primitive'):
types = ['bool', 'int8', 'int16', 'int32', 'int64',
'uint8', 'uint16', 'uint32', 'uint64',
'float32', 'float64', 'binary', 'utf8']
Expand All @@ -796,7 +804,7 @@ def generate_primitive_case(batch_sizes):
fields.append(get_field(type_ + "_nullable", type_, True))
fields.append(get_field(type_ + "_nonnullable", type_, False))

return _generate_file("primitive", fields, batch_sizes)
return _generate_file(name, fields, batch_sizes)


def generate_decimal_case():
Expand Down Expand Up @@ -874,8 +882,8 @@ def _temp_path():
return

file_objs = [
generate_primitive_case([7, 10]),
generate_primitive_case([0, 0, 0]),
generate_primitive_case([17, 20], name='primitive'),
generate_primitive_case([0, 0, 0], name='primitive_zerolength'),
generate_decimal_case(),
generate_datetime_case(),
generate_nested_case(),
Expand Down Expand Up @@ -1079,11 +1087,33 @@ def run_all_tests(debug=False):
print('-- All tests passed!')


def write_js_test_json(directory):
generate_nested_case().write(os.path.join(directory, 'nested.json'))
generate_decimal_case().write(os.path.join(directory, 'decimal.json'))
generate_datetime_case().write(os.path.join(directory, 'datetime.json'))
(generate_dictionary_case()
.write(os.path.join(directory, 'dictionary.json')))
(generate_primitive_case([7, 10])
.write(os.path.join(directory, 'primitive.json')))
(generate_primitive_case([0, 0, 0])
.write(os.path.join(directory, 'primitive-empty.json')))


if __name__ == '__main__':
parser = argparse.ArgumentParser(description='Arrow integration test CLI')
parser.add_argument('--write_generated_json', dest='generated_json_path',
action='store', default=False,
help='Generate test JSON')
parser.add_argument('--debug', dest='debug', action='store_true',
default=False,
help='Run executables in debug mode as relevant')

args = parser.parse_args()
run_all_tests(debug=args.debug)
if args.generated_json_path:
try:
os.makedirs(args.generated_json_path)
except OSError as e:
if e.errno != errno.EEXIST:
raise
write_js_test_json(args.generated_json_path)
else:
run_all_tests(debug=args.debug)
5 changes: 5 additions & 0 deletions js/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -83,3 +83,8 @@ package-lock.json
# compilation targets
dist
targets

# test data files
test/data/
# jest snapshots (too big)
test/__snapshots__/
Loading